Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: src/compiler/mips/code-generator-mips.cc

Issue 2780713003: MIPS[64]: Support for some SIMD operations (3) (Closed)
Patch Set: rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips/code-generator-mips.cc
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
index 1a94d66eed2833c518adbd6bfd3a17ce6f559f6f..9cd1c62d53121ebddc69cd7db0f7ddb32c35ea92 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -1674,6 +1674,74 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ ffint_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0));
break;
}
+ case kMipsI32x4Mul: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ mulv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputSimd128Register(1));
+ break;
+ }
+ case kMipsI32x4MaxS: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ max_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputSimd128Register(1));
+ break;
+ }
+ case kMipsI32x4MinS: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ min_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputSimd128Register(1));
+ break;
+ }
+ case kMipsI32x4Eq: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ ceq_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputSimd128Register(1));
+ break;
+ }
+ case kMipsI32x4Ne: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ Simd128Register dst = i.OutputSimd128Register();
+ __ ceq_w(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
+ __ nor_v(dst, dst, dst);
+ break;
+ }
+ case kMipsI32x4Shl: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ slli_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputInt5(1));
+ break;
+ }
+ case kMipsI32x4ShrS: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ srai_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputInt5(1));
+ break;
+ }
+ case kMipsI32x4ShrU: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ srli_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputInt5(1));
+ break;
+ }
+ case kMipsI32x4MaxU: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ max_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputSimd128Register(1));
+ break;
+ }
+ case kMipsI32x4MinU: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ __ min_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputSimd128Register(1));
+ break;
+ }
+ case kMipsS32x4Select: {
+ CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
+ DCHECK(i.OutputSimd128Register().is(i.InputSimd128Register(0)));
+ __ bsel_v(i.OutputSimd128Register(), i.InputSimd128Register(2),
+ i.InputSimd128Register(1));
+ break;
+ }
}
return kSuccess;
} // NOLINT(readability/fn_size)
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698