Commit 07b3e980 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

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

Bug: v8:10993
Change-Id: Id767016fe0ecc3357a5f5c106b82e0c1e52b9209
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477734
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70585}
parent 8e57ef9f
...@@ -2924,7 +2924,18 @@ void LiftoffAssembler::emit_i32x4_max_u(LiftoffRegister dst, ...@@ -2924,7 +2924,18 @@ void LiftoffAssembler::emit_i32x4_max_u(LiftoffRegister dst,
void LiftoffAssembler::emit_i32x4_dot_i16x8_s(LiftoffRegister dst, void LiftoffAssembler::emit_i32x4_dot_i16x8_s(LiftoffRegister dst,
LiftoffRegister lhs, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "i32x4_dot_i16x8_s"); QwNeonRegister dest = liftoff::GetSimd128Register(dst);
QwNeonRegister left = liftoff::GetSimd128Register(lhs);
QwNeonRegister right = liftoff::GetSimd128Register(rhs);
UseScratchRegisterScope temps(this);
Simd128Register scratch = temps.AcquireQ();
vmull(NeonS16, scratch, left.low(), right.low());
vpadd(Neon32, dest.low(), scratch.low(), scratch.high());
vmull(NeonS16, scratch, left.high(), right.high());
vpadd(Neon32, dest.high(), scratch.low(), scratch.high());
} }
void LiftoffAssembler::emit_i16x8_splat(LiftoffRegister dst, void LiftoffAssembler::emit_i16x8_splat(LiftoffRegister dst,
......
...@@ -2006,7 +2006,12 @@ void LiftoffAssembler::emit_i32x4_max_u(LiftoffRegister dst, ...@@ -2006,7 +2006,12 @@ void LiftoffAssembler::emit_i32x4_max_u(LiftoffRegister dst,
void LiftoffAssembler::emit_i32x4_dot_i16x8_s(LiftoffRegister dst, void LiftoffAssembler::emit_i32x4_dot_i16x8_s(LiftoffRegister dst,
LiftoffRegister lhs, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "i32x4_dot_i16x8_s"); UseScratchRegisterScope scope(this);
VRegister tmp1 = scope.AcquireV(kFormat4S);
VRegister tmp2 = scope.AcquireV(kFormat4S);
Smull(tmp1, lhs.fp().V4H(), rhs.fp().V4H());
Smull2(tmp2, lhs.fp().V8H(), rhs.fp().V8H());
Addp(dst.fp().V4S(), tmp1, tmp2);
} }
void LiftoffAssembler::emit_i16x8_splat(LiftoffRegister dst, void LiftoffAssembler::emit_i16x8_splat(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