Commit 63f5cecf authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

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

Bug: v8:9909
Change-Id: I8beaa9a430c86c00311e5cc713c2870d2a588ab8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2149712Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67157}
parent 34e5a0b5
......@@ -1651,7 +1651,8 @@ void LiftoffAssembler::emit_f64x2_replace_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_f64x2_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "f64x2_abs");
vabs(dst.low_fp(), src.low_fp());
vabs(dst.high_fp(), src.high_fp());
}
void LiftoffAssembler::emit_f64x2_neg(LiftoffRegister dst,
......@@ -1711,7 +1712,7 @@ void LiftoffAssembler::emit_f32x4_replace_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_f32x4_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "f32x4_abs");
vabs(liftoff::GetSimd128Register(dst), liftoff::GetSimd128Register(src));
}
void LiftoffAssembler::emit_f32x4_neg(LiftoffRegister dst,
......@@ -2168,17 +2169,20 @@ void LiftoffAssembler::emit_i16x8_rounding_average_u(LiftoffRegister dst,
void LiftoffAssembler::emit_i8x16_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "i8x16_abs");
vabs(Neon8, liftoff::GetSimd128Register(dst),
liftoff::GetSimd128Register(src));
}
void LiftoffAssembler::emit_i16x8_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "i16x8_abs");
vabs(Neon16, liftoff::GetSimd128Register(dst),
liftoff::GetSimd128Register(src));
}
void LiftoffAssembler::emit_i32x4_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "i32x4_abs");
vabs(Neon32, liftoff::GetSimd128Register(dst),
liftoff::GetSimd128Register(src));
}
void LiftoffAssembler::StackCheck(Label* ool_code, Register limit_address) {
......
......@@ -1107,7 +1107,7 @@ void LiftoffAssembler::emit_f64x2_replace_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_f64x2_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "f64x2_abs");
Fabs(dst.fp().V2D(), src.fp().V2D());
}
void LiftoffAssembler::emit_f64x2_neg(LiftoffRegister dst,
......@@ -1163,7 +1163,7 @@ void LiftoffAssembler::emit_f32x4_replace_lane(LiftoffRegister dst,
void LiftoffAssembler::emit_f32x4_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "f32x4_abs");
Fabs(dst.fp().V4S(), src.fp().V4S());
}
void LiftoffAssembler::emit_f32x4_neg(LiftoffRegister dst,
......@@ -1547,17 +1547,17 @@ void LiftoffAssembler::emit_i16x8_rounding_average_u(LiftoffRegister dst,
void LiftoffAssembler::emit_i8x16_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "i8x16_abs");
Abs(dst.fp().V16B(), src.fp().V16B());
}
void LiftoffAssembler::emit_i16x8_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "i16x8_abs");
Abs(dst.fp().V8H(), src.fp().V8H());
}
void LiftoffAssembler::emit_i32x4_abs(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "i32x4_abs");
Abs(dst.fp().V4S(), src.fp().V4S());
}
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