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

Unified Diff: src/compiler/common-operator.cc

Issue 2385393002: [wasm] Implement I32x4ReplaceLane, I32x4Add, I32x4Sub. (Closed)
Patch Set: Add lanes as compile time constants Created 4 years 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/common-operator.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
index 9ce6f71a0f9949bb9b4ddc04ee2e76ed1e2f413f..c03ac4fd71ecbeb4c398f9b3d7b4589abbf8afc6 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -1131,6 +1131,29 @@ const Operator* CommonOperatorBuilder::ResizeMergeOrPhi(const Operator* op,
}
}
+const Operator* CommonOperatorBuilder::Int32x4ExtractLane(int32_t value) {
titzer 2016/12/05 09:40:08 Can we call this lane_number?
gdeepti 2016/12/06 01:10:08 Done.
+ return new (zone()) Operator1<int32_t>( // --
titzer 2016/12/05 09:40:08 Can we get a DCHECK that 0 <= lane_number < 4?
gdeepti 2016/12/06 01:10:08 Done.
+ IrOpcode::kInt32x4ExtractLane, Operator::kPure, // opcode
+ "Int32x4ExtractLane", // name
+ 1, 0, 0, 1, 0, 0, // counts
+ value); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Int32x4ReplaceLane(int32_t value) {
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kInt32x4ReplaceLane, Operator::kPure, // opcode
+ "Int32x4ReplaceLane", // name
+ 2, 0, 0, 1, 0, 0, // counts
+ value); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Float32x4ExtractLane(int32_t value) {
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kFloat32x4ExtractLane, Operator::kPure, // opcode
+ "Float32x4ExtractLane", // name
+ 1, 0, 0, 1, 0, 0, // counts
+ value); // parameter
+}
const FrameStateFunctionInfo*
CommonOperatorBuilder::CreateFrameStateFunctionInfo(
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698