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

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

Issue 2385393002: [wasm] Implement I32x4ReplaceLane, I32x4Add, I32x4Sub. (Closed)
Patch Set: Fix check 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..a9ff0bd778fc086917c8019d5b98d238481d0308 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -1131,6 +1131,43 @@ const Operator* CommonOperatorBuilder::ResizeMergeOrPhi(const Operator* op,
}
}
+const Operator* CommonOperatorBuilder::Int32x4ExtractLane(int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 4);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kInt32x4ExtractLane, Operator::kPure, // opcode
+ "Int32x4ExtractLane", // name
+ 1, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Int32x4ReplaceLane(int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 4);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kInt32x4ReplaceLane, Operator::kPure, // opcode
+ "Int32x4ReplaceLane", // name
+ 2, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Float32x4ExtractLane(
+ int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 4);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kFloat32x4ExtractLane, Operator::kPure, // opcode
+ "Float32x4ExtractLane", // name
+ 1, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Float32x4ReplaceLane(
+ int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 4);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kFloat32x4ReplaceLane, Operator::kPure, // opcode
+ "Float32x4ReplaceLane", // name
+ 2, 0, 0, 1, 0, 0, // counts
+ lane_number); // 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