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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 2300753005: [wasm] fix Simd ExtractLane to take immediate instead of param (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 35e78b6aa2a617ad7241d5e2b33e10419e8dc920..b82fbcaae025f4de34b60ddb76e498f77b6d9b11 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2890,9 +2890,6 @@ Node* WasmGraphBuilder::DefaultS128Value() {
Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
const NodeVector& inputs) {
switch (opcode) {
- case wasm::kExprI32x4ExtractLane:
- return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(),
- inputs[0], inputs[1]);
case wasm::kExprI32x4Splat:
return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0],
inputs[0], inputs[0], inputs[0]);
@@ -2901,6 +2898,17 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
}
}
+Node* WasmGraphBuilder::SimdExtractLane(wasm::WasmOpcode opcode, uint8_t lane,
+ Node* input) {
+ switch (opcode) {
+ case wasm::kExprI32x4ExtractLane:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), input,
+ Int32Constant(lane));
+ default:
+ return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
+ }
+}
+
gdeepti 2016/09/01 00:52:52 This can be merged into the function above by taki
aseemgarg 2016/09/02 22:40:12 I'm not keen on having a single function as there
static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag,
Isolate* isolate, Handle<Code> code,
const char* message, uint32_t index,
« no previous file with comments | « src/compiler/wasm-compiler.h ('k') | src/wasm/ast-decoder.cc » ('j') | src/wasm/ast-decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698