Index: src/compiler/mips64/code-generator-mips64.cc |
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc |
index 916bcbcaea253245dbf4a046b0b1e6b631fe19e5..5250541efd7e1987971b8e639d5dce6411584f15 100644 |
--- a/src/compiler/mips64/code-generator-mips64.cc |
+++ b/src/compiler/mips64/code-generator-mips64.cc |
@@ -2181,6 +2181,107 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
__ ftrunc_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); |
break; |
} |
+ case kMips64I32x4Neg: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero); |
+ __ subv_w(i.OutputSimd128Register(), kSimd128RegZero, |
+ i.InputSimd128Register(0)); |
+ break; |
+ } |
+ case kMips64I32x4LtS: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ clt_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
+ case kMips64I32x4LeS: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ cle_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
+ case kMips64I32x4LtU: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ clt_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
+ case kMips64I32x4LeU: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ cle_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
+ case kMips64I16x8Splat: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ fill_h(i.OutputSimd128Register(), i.InputRegister(0)); |
+ break; |
+ } |
+ case kMips64I16x8ExtractLane: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ copy_s_h(i.OutputRegister(), i.InputSimd128Register(0), |
+ i.InputInt8(1)); |
+ break; |
+ } |
+ case kMips64I16x8ReplaceLane: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ Simd128Register src = i.InputSimd128Register(0); |
+ Simd128Register dst = i.OutputSimd128Register(); |
+ if (!src.is(dst)) { |
+ __ move_v(dst, src); |
+ } |
+ __ insert_h(dst, i.InputInt8(1), i.InputRegister(2)); |
+ break; |
+ } |
+ case kMips64I16x8Neg: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero); |
+ __ subv_h(i.OutputSimd128Register(), kSimd128RegZero, |
+ i.InputSimd128Register(0)); |
+ break; |
+ } |
+ case kMips64I16x8Shl: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ slli_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputInt4(1)); |
+ break; |
+ } |
+ case kMips64I16x8ShrS: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ srai_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputInt4(1)); |
+ break; |
+ } |
+ case kMips64I16x8ShrU: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ srli_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputInt4(1)); |
+ break; |
+ } |
+ case kMips64I16x8Add: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ addv_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
+ case kMips64I16x8AddSaturateS: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ adds_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
+ case kMips64I16x8Sub: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ subv_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
+ case kMips64I16x8SubSaturateS: { |
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
+ __ subs_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
+ i.InputSimd128Register(1)); |
+ break; |
+ } |
} |
return kSuccess; |
} // NOLINT(readability/fn_size) |