Commit c490c73d authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][liftoff][arm][arm64] Implement eq

Bug: v8:9909
Change-Id: Ib94db390f70ddaa7eafb5af77023b1024c2b96b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151168Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67181}
parent a46d8d1a
......@@ -2131,27 +2131,46 @@ void LiftoffAssembler::emit_i8x16_max_u(LiftoffRegister dst,
void LiftoffAssembler::emit_i8x16_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i8x16_eq");
vceq(Neon8, liftoff::GetSimd128Register(dst),
liftoff::GetSimd128Register(lhs), liftoff::GetSimd128Register(rhs));
}
void LiftoffAssembler::emit_i16x8_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i16x8_eq");
vceq(Neon16, liftoff::GetSimd128Register(dst),
liftoff::GetSimd128Register(lhs), liftoff::GetSimd128Register(rhs));
}
void LiftoffAssembler::emit_i32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i32x4_eq");
vceq(Neon32, liftoff::GetSimd128Register(dst),
liftoff::GetSimd128Register(lhs), liftoff::GetSimd128Register(rhs));
}
void LiftoffAssembler::emit_f32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f32x4_eq");
vceq(liftoff::GetSimd128Register(dst), liftoff::GetSimd128Register(lhs),
liftoff::GetSimd128Register(rhs));
}
void LiftoffAssembler::emit_f64x2_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f64x2_eq");
QwNeonRegister dest = liftoff::GetSimd128Register(dst);
QwNeonRegister left = liftoff::GetSimd128Register(lhs);
QwNeonRegister right = liftoff::GetSimd128Register(rhs);
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
mov(scratch, Operand(0));
VFPCompareAndSetFlags(left.low(), right.low());
mov(scratch, Operand(-1), LeaveCC, eq);
vmov(dest.low(), scratch, scratch);
mov(scratch, Operand(0));
VFPCompareAndSetFlags(left.high(), right.high());
mov(scratch, Operand(-1), LeaveCC, eq);
vmov(dest.high(), scratch, scratch);
}
void LiftoffAssembler::emit_i8x16_rounding_average_u(LiftoffRegister dst,
......
......@@ -1511,27 +1511,27 @@ void LiftoffAssembler::emit_i8x16_max_u(LiftoffRegister dst,
void LiftoffAssembler::emit_i8x16_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i8x16_eq");
Cmeq(dst.fp().V16B(), lhs.fp().V16B(), rhs.fp().V16B());
}
void LiftoffAssembler::emit_i16x8_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i16x8_eq");
Cmeq(dst.fp().V8H(), lhs.fp().V8H(), rhs.fp().V8H());
}
void LiftoffAssembler::emit_i32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i32x4_eq");
Cmeq(dst.fp().V4S(), lhs.fp().V4S(), rhs.fp().V4S());
}
void LiftoffAssembler::emit_f32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f32x4_eq");
Fcmeq(dst.fp().V4S(), lhs.fp().V4S(), rhs.fp().V4S());
}
void LiftoffAssembler::emit_f64x2_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f64x2_eq");
Fcmeq(dst.fp().V2D(), lhs.fp().V2D(), rhs.fp().V2D());
}
void LiftoffAssembler::emit_i8x16_rounding_average_u(LiftoffRegister dst,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment