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

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

For ARM, factor the code sequence out into a macro-assembler function to
allow sharing between TurboFan and Liftoff.

Bug: v8:11215
Change-Id: Ib337e3f3dd90174b71a9bcd951b3779275c7465c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648820
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72380}
parent 7f91017a
......@@ -2640,6 +2640,15 @@ void TurboAssembler::I64x2BitMask(Register dst, QwNeonRegister src) {
add(dst, dst, Operand(tmp, LSL, 1));
}
void TurboAssembler::I64x2Eq(QwNeonRegister dst, QwNeonRegister src1,
QwNeonRegister src2) {
UseScratchRegisterScope temps(this);
Simd128Register scratch = temps.AcquireQ();
vceq(Neon32, dst, src1, src2);
vrev64(Neon32, scratch, dst);
vand(dst, dst, scratch);
}
} // namespace internal
} // namespace v8
......
......@@ -569,6 +569,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// instructions. These helpers allow us to define the optimal code sequence,
// and be used in both TurboFan and Liftoff.
void I64x2BitMask(Register dst, QwNeonRegister src);
void I64x2Eq(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
private:
// Compare single values and then load the fpscr flags to a register.
......
......@@ -2429,13 +2429,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
break;
}
case kArmI64x2Eq: {
Simd128Register dst = i.OutputSimd128Register();
UseScratchRegisterScope temps(tasm());
Simd128Register scratch = temps.AcquireQ();
__ vceq(Neon32, dst, i.InputSimd128Register(0),
i.InputSimd128Register(1));
__ vrev64(Neon32, scratch, dst);
__ vand(dst, dst, scratch);
__ I64x2Eq(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kArmI32x4Eq: {
......
......@@ -3707,7 +3707,8 @@ void LiftoffAssembler::emit_i32x4_ge_u(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i64x2_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i64x2.eq");
I64x2Eq(liftoff::GetSimd128Register(dst), liftoff::GetSimd128Register(lhs),
liftoff::GetSimd128Register(rhs));
}
void LiftoffAssembler::emit_f32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
......
......@@ -2718,7 +2718,7 @@ void LiftoffAssembler::emit_i32x4_ge_u(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i64x2_eq(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i64x2.eq");
Cmeq(dst.fp().V2D(), lhs.fp().V2D(), rhs.fp().V2D());
}
void LiftoffAssembler::emit_f32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
......
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