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

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

Issue 2916093002: [ia32][wasm] Support AVX instructions for I32x4Splat/ReplaceLane/ExtractLane (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ia32/code-generator-ia32.cc
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc
index 7363f93ab742d5f77297ee9b2ed91e28925002c8..1aba6b103f2dd9520b1d2e764180acd0a4138249 100644
--- a/src/compiler/ia32/code-generator-ia32.cc
+++ b/src/compiler/ia32/code-generator-ia32.cc
@@ -1892,16 +1892,17 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
case kIA32I32x4Splat: {
XMMRegister dst = i.OutputSimd128Register();
- __ movd(dst, i.InputOperand(0));
- __ pshufd(dst, dst, 0x0);
+ __ Movd(dst, i.InputOperand(0));
+ __ Pshufd(dst, dst, 0x0);
break;
}
case kIA32I32x4ExtractLane: {
__ Pextrd(i.OutputRegister(), i.InputSimd128Register(0), i.InputInt8(1));
break;
}
- case kIA32I32x4ReplaceLane: {
- __ Pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1));
+ case kSSEI32x4ReplaceLane: {
+ CpuFeatureScope sse_scope(masm(), SSE4_1);
+ __ pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1));
break;
}
case kSSEI32x4Add: {
@@ -1912,6 +1913,12 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ psubd(i.OutputSimd128Register(), i.InputOperand(1));
break;
}
+ case kAVXI32x4ReplaceLane: {
+ CpuFeatureScope avx_scope(masm(), AVX);
+ __ vpinsrd(i.OutputSimd128Register(), i.InputSimd128Register(0),
+ i.InputOperand(2), i.InputInt8(1));
+ break;
+ }
case kAVXI32x4Add: {
CpuFeatureScope avx_scope(masm(), AVX);
__ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0),
« no previous file with comments | « no previous file | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698