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

Unified Diff: src/compiler/ia32/instruction-selector-ia32.cc

Issue 2695613004: Add several SIMD opcodes to IA32 (Closed)
Patch Set: Adjust Pextrd and use pinsrd instead of Pinsrd Created 3 years, 10 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
Index: src/compiler/ia32/instruction-selector-ia32.cc
diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc
index 44cb7ef899f2cd795d98a5768f29df7ba858de43..862bf6ac5cbc38883acf4d468b0e93d2a0d42c7a 100644
--- a/src/compiler/ia32/instruction-selector-ia32.cc
+++ b/src/compiler/ia32/instruction-selector-ia32.cc
@@ -861,7 +861,9 @@ void InstructionSelector::VisitWord32Ror(Node* node) {
V(Float32Mul, kAVXFloat32Mul, kSSEFloat32Mul) \
V(Float64Mul, kAVXFloat64Mul, kSSEFloat64Mul) \
V(Float32Div, kAVXFloat32Div, kSSEFloat32Div) \
- V(Float64Div, kAVXFloat64Div, kSSEFloat64Div)
+ V(Float64Div, kAVXFloat64Div, kSSEFloat64Div) \
+ V(Int32x4Add, kAVXInt32x4Add, kSSEInt32x4Add) \
+ V(Int32x4Sub, kAVXInt32x4Sub, kSSEInt32x4Sub)
#define FLOAT_UNOP_LIST(V) \
V(Float32Abs, kAVXFloat32Abs, kSSEFloat32Abs) \
@@ -1704,6 +1706,25 @@ void InstructionSelector::VisitAtomicStore(Node* node) {
Emit(code, 0, nullptr, input_count, inputs);
}
+void InstructionSelector::VisitCreateInt32x4(Node* node) {
+ VisitRO(this, node, kIA32Int32x4Create);
+}
+
+void InstructionSelector::VisitInt32x4ExtractLane(Node* node) {
+ IA32OperandGenerator g(this);
+ int32_t lane = OpParameter<int32_t>(node);
+ Emit(kIA32Int32x4ExtractLane, g.DefineAsRegister(node),
+ g.UseRegister(node->InputAt(0)), g.UseImmediate(lane));
+}
+
+void InstructionSelector::VisitInt32x4ReplaceLane(Node* node) {
+ IA32OperandGenerator g(this);
+ int32_t lane = OpParameter<int32_t>(node);
+ Emit(kIA32Int32x4ReplaceLane, g.DefineSameAsFirst(node),
+ g.UseRegister(node->InputAt(0)), g.UseImmediate(lane),
+ g.Use(node->InputAt(1)));
+}
+
// static
MachineOperatorBuilder::Flags
InstructionSelector::SupportedMachineOperatorFlags() {

Powered by Google App Engine
This is Rietveld 408576698