Commit 4ac48b60 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][liftoff][arm][arm64] Implement sub for Liftoff

Bug: v8:9909
Change-Id: Ica1cb36e7e071e5755009d57a0f03080b74bbf8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108743Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66795}
parent 765053dc
......@@ -1574,7 +1574,8 @@ void LiftoffAssembler::emit_f64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_f64x2_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f64x2sub");
vsub(dst.low_fp(), lhs.low_fp(), rhs.low_fp());
vsub(dst.high_fp(), lhs.high_fp(), rhs.high_fp());
}
void LiftoffAssembler::emit_f32x4_splat(LiftoffRegister dst,
......@@ -1598,7 +1599,9 @@ void LiftoffAssembler::emit_f32x4_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_f32x4_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f32x4sub");
vsub(liftoff::GetSimd128Register(dst.low_fp()),
liftoff::GetSimd128Register(lhs.low_fp()),
liftoff::GetSimd128Register(rhs.low_fp()));
}
void LiftoffAssembler::emit_i64x2_splat(LiftoffRegister dst,
......@@ -1627,7 +1630,9 @@ void LiftoffAssembler::emit_i64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i64x2_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i64x2sub");
vsub(Neon64, liftoff::GetSimd128Register(dst.low_fp()),
liftoff::GetSimd128Register(lhs.low_fp()),
liftoff::GetSimd128Register(rhs.low_fp()));
}
void LiftoffAssembler::emit_i32x4_splat(LiftoffRegister dst,
......@@ -1651,7 +1656,9 @@ void LiftoffAssembler::emit_i32x4_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i32x4_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i32x4sub");
vsub(Neon32, liftoff::GetSimd128Register(dst.low_fp()),
liftoff::GetSimd128Register(lhs.low_fp()),
liftoff::GetSimd128Register(rhs.low_fp()));
}
void LiftoffAssembler::emit_i16x8_splat(LiftoffRegister dst,
......@@ -1668,7 +1675,9 @@ void LiftoffAssembler::emit_i16x8_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i16x8_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i16x8sub");
vsub(Neon16, liftoff::GetSimd128Register(dst.low_fp()),
liftoff::GetSimd128Register(lhs.low_fp()),
liftoff::GetSimd128Register(rhs.low_fp()));
}
void LiftoffAssembler::emit_i16x8_extract_lane_u(LiftoffRegister dst,
......@@ -1713,7 +1722,9 @@ void LiftoffAssembler::emit_i8x16_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i8x16_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i8x16sub");
vsub(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) {
......
......@@ -1102,7 +1102,7 @@ void LiftoffAssembler::emit_f64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_f64x2_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f64x2sub");
Fsub(dst.fp().V2D(), lhs.fp().V2D(), rhs.fp().V2D());
}
void LiftoffAssembler::emit_f32x4_splat(LiftoffRegister dst,
......@@ -1123,7 +1123,7 @@ void LiftoffAssembler::emit_f32x4_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_f32x4_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "f32x4sub");
Fsub(dst.fp().V4S(), lhs.fp().V4S(), rhs.fp().V4S());
}
void LiftoffAssembler::emit_i64x2_splat(LiftoffRegister dst,
......@@ -1144,7 +1144,7 @@ void LiftoffAssembler::emit_i64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i64x2_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i64x2sub");
Sub(dst.fp().V2D(), lhs.fp().V2D(), rhs.fp().V2D());
}
void LiftoffAssembler::emit_i32x4_splat(LiftoffRegister dst,
......@@ -1165,7 +1165,7 @@ void LiftoffAssembler::emit_i32x4_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i32x4_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i32x4sub");
Sub(dst.fp().V4S(), lhs.fp().V4S(), rhs.fp().V4S());
}
void LiftoffAssembler::emit_i16x8_splat(LiftoffRegister dst,
......@@ -1192,7 +1192,7 @@ void LiftoffAssembler::emit_i16x8_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i16x8_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i16x8sub");
Sub(dst.fp().V8H(), lhs.fp().V8H(), rhs.fp().V8H());
}
void LiftoffAssembler::emit_i8x16_splat(LiftoffRegister dst,
......@@ -1219,7 +1219,7 @@ void LiftoffAssembler::emit_i8x16_add(LiftoffRegister dst, LiftoffRegister lhs,
void LiftoffAssembler::emit_i8x16_sub(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "i8x16sub");
Sub(dst.fp().V16B(), lhs.fp().V16B(), rhs.fp().V16B());
}
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