From 961d4ce2e64c1c0d84f6ea860d29e16685c557d2 Mon Sep 17 00:00:00 2001 From: Zhao Jiazhong Date: Wed, 22 Apr 2020 06:52:49 -0400 Subject: [PATCH] [mips][wasm-simd][liftoff] Implement fp min/max Port 9f41a58417cbda011913a3f70d510e414de61c19 https://crrev.com/c/2151999 Change-Id: I58b02bebe3802a4c4a66df331913a742a083de9f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2160688 Reviewed-by: Zhi An Ng Commit-Queue: Zhao Jiazhong Cr-Commit-Position: refs/heads/master@{#67325} --- .../baseline/mips/liftoff-assembler-mips.h | 20 ++++++++++++ .../mips64/liftoff-assembler-mips64.h | 32 +++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/wasm/baseline/mips/liftoff-assembler-mips.h b/src/wasm/baseline/mips/liftoff-assembler-mips.h index df144a13ff..a2934719a6 100644 --- a/src/wasm/baseline/mips/liftoff-assembler-mips.h +++ b/src/wasm/baseline/mips/liftoff-assembler-mips.h @@ -2050,6 +2050,16 @@ void LiftoffAssembler::emit_f32x4_div(LiftoffRegister dst, LiftoffRegister lhs, bailout(kSimd, "emit_f32x4_div"); } +void LiftoffAssembler::emit_f32x4_min(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + bailout(kSimd, "emit_f32x4_min"); +} + +void LiftoffAssembler::emit_f32x4_max(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + bailout(kSimd, "emit_f32x4_max"); +} + void LiftoffAssembler::emit_f64x2_abs(LiftoffRegister dst, LiftoffRegister src) { // TODO(mips): Support this on loongson 3a4000. Currently, the main MIPS @@ -2106,6 +2116,16 @@ void LiftoffAssembler::emit_f64x2_div(LiftoffRegister dst, LiftoffRegister lhs, bailout(kSimd, "emit_f64x2_div"); } +void LiftoffAssembler::emit_f64x2_min(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + bailout(kSimd, "emit_f64x2_min"); +} + +void LiftoffAssembler::emit_f64x2_max(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + bailout(kSimd, "emit_f64x2_max"); +} + void LiftoffAssembler::emit_i8x16_sconvert_i16x8(LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) { diff --git a/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/src/wasm/baseline/mips64/liftoff-assembler-mips64.h index 1ed1e34cf9..6132168a29 100644 --- a/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +++ b/src/wasm/baseline/mips64/liftoff-assembler-mips64.h @@ -1880,6 +1880,22 @@ void LiftoffAssembler::emit_f32x4_div(LiftoffRegister dst, LiftoffRegister lhs, bailout(kSimd, "emit_f32x4_div"); } +void LiftoffAssembler::emit_f32x4_min(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + // TODO(mips): Support this on loongson 3a4000. Currently, the main MIPS + // CPU, Loongson 3a3000 does not support MSA(simd128), but the upcoming + // 3a4000 support MSA. + bailout(kSimd, "emit_f32x4_min"); +} + +void LiftoffAssembler::emit_f32x4_max(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + // TODO(mips): Support this on loongson 3a4000. Currently, the main MIPS + // CPU, Loongson 3a3000 does not support MSA(simd128), but the upcoming + // 3a4000 support MSA. + bailout(kSimd, "emit_f32x4_max"); +} + void LiftoffAssembler::emit_f64x2_abs(LiftoffRegister dst, LiftoffRegister src) { // TODO(mips): Support this on loongson 3a4000. Currently, the main MIPS @@ -1936,6 +1952,22 @@ void LiftoffAssembler::emit_f64x2_div(LiftoffRegister dst, LiftoffRegister lhs, bailout(kSimd, "emit_f64x2_div"); } +void LiftoffAssembler::emit_f64x2_min(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + // TODO(mips): Support this on loongson 3a4000. Currently, the main MIPS + // CPU, Loongson 3a3000 does not support MSA(simd128), but the upcoming + // 3a4000 support MSA. + bailout(kSimd, "emit_f64x2_min"); +} + +void LiftoffAssembler::emit_f64x2_max(LiftoffRegister dst, LiftoffRegister lhs, + LiftoffRegister rhs) { + // TODO(mips): Support this on loongson 3a4000. Currently, the main MIPS + // CPU, Loongson 3a3000 does not support MSA(simd128), but the upcoming + // 3a4000 support MSA. + bailout(kSimd, "emit_f64x2_max"); +} + void LiftoffAssembler::emit_i8x16_sconvert_i16x8(LiftoffRegister dst, LiftoffRegister lhs, LiftoffRegister rhs) {