Commit 817ba0a2 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

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

Implement f64x2.add, i64x2.add, i8x16.add on ARM and ARM64.

Bug: v8:9909
Change-Id: Id41bb3c02c1873e1380463264a3e5fd31949c949
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2103107
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66733}
parent 64759d44
...@@ -1567,7 +1567,8 @@ void LiftoffAssembler::emit_f64x2_extract_lane(LiftoffRegister dst, ...@@ -1567,7 +1567,8 @@ void LiftoffAssembler::emit_f64x2_extract_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_f64x2_add(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_f64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "f64x2add"); vadd(dst.low_fp(), lhs.low_fp(), rhs.low_fp());
vadd(dst.high_fp(), lhs.high_fp(), rhs.high_fp());
} }
void LiftoffAssembler::emit_f32x4_splat(LiftoffRegister dst, void LiftoffAssembler::emit_f32x4_splat(LiftoffRegister dst,
...@@ -1604,7 +1605,9 @@ void LiftoffAssembler::emit_i64x2_extract_lane(LiftoffRegister dst, ...@@ -1604,7 +1605,9 @@ void LiftoffAssembler::emit_i64x2_extract_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_i64x2_add(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_i64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "i64x2add"); vadd(Neon64, liftoff::GetSimd128Register(dst.low_fp()),
liftoff::GetSimd128Register(lhs.low_fp()),
liftoff::GetSimd128Register(rhs.low_fp()));
} }
void LiftoffAssembler::emit_i32x4_splat(LiftoffRegister dst, void LiftoffAssembler::emit_i32x4_splat(LiftoffRegister dst,
...@@ -1668,7 +1671,9 @@ void LiftoffAssembler::emit_i8x16_extract_lane_s(LiftoffRegister dst, ...@@ -1668,7 +1671,9 @@ void LiftoffAssembler::emit_i8x16_extract_lane_s(LiftoffRegister dst,
void LiftoffAssembler::emit_i8x16_add(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_i8x16_add(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "i8x16add"); vadd(Neon8, liftoff::GetSimd128Register(dst.low_fp()),
liftoff::GetSimd128Register(lhs.low_fp()),
liftoff::GetSimd128Register(rhs.low_fp()));
} }
void LiftoffAssembler::StackCheck(Label* ool_code, Register limit_address) { void LiftoffAssembler::StackCheck(Label* ool_code, Register limit_address) {
......
...@@ -1097,7 +1097,7 @@ void LiftoffAssembler::emit_f64x2_extract_lane(LiftoffRegister dst, ...@@ -1097,7 +1097,7 @@ void LiftoffAssembler::emit_f64x2_extract_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_f64x2_add(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_f64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "f64x2add"); Fadd(dst.fp().V2D(), lhs.fp().V2D(), rhs.fp().V2D());
} }
void LiftoffAssembler::emit_f32x4_splat(LiftoffRegister dst, void LiftoffAssembler::emit_f32x4_splat(LiftoffRegister dst,
...@@ -1129,7 +1129,7 @@ void LiftoffAssembler::emit_i64x2_extract_lane(LiftoffRegister dst, ...@@ -1129,7 +1129,7 @@ void LiftoffAssembler::emit_i64x2_extract_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_i64x2_add(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_i64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "i64x2add"); Add(dst.fp().V2D(), lhs.fp().V2D(), rhs.fp().V2D());
} }
void LiftoffAssembler::emit_i32x4_splat(LiftoffRegister dst, void LiftoffAssembler::emit_i32x4_splat(LiftoffRegister dst,
...@@ -1189,7 +1189,7 @@ void LiftoffAssembler::emit_i8x16_extract_lane_s(LiftoffRegister dst, ...@@ -1189,7 +1189,7 @@ void LiftoffAssembler::emit_i8x16_extract_lane_s(LiftoffRegister dst,
void LiftoffAssembler::emit_i8x16_add(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_i8x16_add(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) { LiftoffRegister rhs) {
bailout(kSimd, "i8x16add"); Add(dst.fp().V16B(), lhs.fp().V16B(), rhs.fp().V16B());
} }
void LiftoffAssembler::StackCheck(Label* ool_code, Register limit_address) { void LiftoffAssembler::StackCheck(Label* ool_code, Register limit_address) {
......
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