Commit 5e828c7d authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][liftoff][arm64] Implement integer narrowing

In the reland, https://crrev.com/c/2157799, I accidentally left out the
arm64 implementation. This adds it.

R=clemensb@chromium.org

Bug: v8:9909
Change-Id: I0e36f85402cd86ed7adaace43e7ec88f9aaad659
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2161566Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67341}
parent cd31f11d
......@@ -1606,25 +1606,57 @@ void LiftoffAssembler::emit_s128_xor(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i8x16_sconvert_i16x8(LiftoffRegister dst,
LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i8x16_sconvert_i16x8");
UseScratchRegisterScope temps(this);
VRegister tmp = temps.AcquireV(kFormat8H);
VRegister right = rhs.fp().V8H();
if (dst == rhs) {
Mov(tmp, right);
right = tmp;
}
Sqxtn(dst.fp().V8B(), lhs.fp().V8H());
Sqxtn2(dst.fp().V16B(), right);
}
void LiftoffAssembler::emit_i8x16_uconvert_i16x8(LiftoffRegister dst,
LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i8x16_uconvert_i16x8");
UseScratchRegisterScope temps(this);
VRegister tmp = temps.AcquireV(kFormat8H);
VRegister right = rhs.fp().V8H();
if (dst == rhs) {
Mov(tmp, right);
right = tmp;
}
Sqxtun(dst.fp().V8B(), lhs.fp().V8H());
Sqxtun2(dst.fp().V16B(), right);
}
void LiftoffAssembler::emit_i16x8_sconvert_i32x4(LiftoffRegister dst,
LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i16x8_sconvert_i32x4");
UseScratchRegisterScope temps(this);
VRegister tmp = temps.AcquireV(kFormat4S);
VRegister right = rhs.fp().V4S();
if (dst == rhs) {
Mov(tmp, right);
right = tmp;
}
Sqxtn(dst.fp().V4H(), lhs.fp().V4S());
Sqxtn2(dst.fp().V8H(), right);
}
void LiftoffAssembler::emit_i16x8_uconvert_i32x4(LiftoffRegister dst,
LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i16x8_uconvert_i32x4");
UseScratchRegisterScope temps(this);
VRegister tmp = temps.AcquireV(kFormat4S);
VRegister right = rhs.fp().V4S();
if (dst == rhs) {
Mov(tmp, right);
right = tmp;
}
Sqxtun(dst.fp().V4H(), lhs.fp().V4S());
Sqxtun2(dst.fp().V8H(), right);
}
void LiftoffAssembler::emit_i16x8_sconvert_i8x16_low(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