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

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

Issue 2584863002: [Turbofan] Add native ARM support for basic SIMD 32x4 operations. (Closed)
Patch Set: Fix Arm compile. 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/instruction-selector.cc ('k') | src/wasm/wasm-macro-gen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 7843ba6b63d6003d4915e85889260c93366401d0..f81278509c0cc4167785a6ee97eba437bab0fc89 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -3235,21 +3235,45 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
const NodeVector& inputs) {
has_simd_ = true;
switch (opcode) {
+ case wasm::kExprF32x4Splat:
+ return graph()->NewNode(jsgraph()->machine()->CreateFloat32x4(),
+ inputs[0], inputs[0], inputs[0], inputs[0]);
+ case wasm::kExprF32x4FromInt32x4:
+ return graph()->NewNode(jsgraph()->machine()->Float32x4FromInt32x4(),
+ inputs[0]);
+ case wasm::kExprF32x4FromUint32x4:
+ return graph()->NewNode(jsgraph()->machine()->Float32x4FromUint32x4(),
+ inputs[0]);
+ case wasm::kExprF32x4Add:
+ return graph()->NewNode(jsgraph()->machine()->Float32x4Add(), inputs[0],
+ inputs[1]);
+ case wasm::kExprF32x4Sub:
+ return graph()->NewNode(jsgraph()->machine()->Float32x4Sub(), inputs[0],
+ inputs[1]);
case wasm::kExprI32x4Splat:
return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0],
inputs[0], inputs[0], inputs[0]);
+ case wasm::kExprI32x4FromFloat32x4:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4FromFloat32x4(),
+ inputs[0]);
+ case wasm::kExprUi32x4FromFloat32x4:
+ return graph()->NewNode(jsgraph()->machine()->Uint32x4FromFloat32x4(),
+ inputs[0]);
case wasm::kExprI32x4Add:
return graph()->NewNode(jsgraph()->machine()->Int32x4Add(), inputs[0],
inputs[1]);
case wasm::kExprI32x4Sub:
return graph()->NewNode(jsgraph()->machine()->Int32x4Sub(), inputs[0],
inputs[1]);
- case wasm::kExprF32x4Splat:
- return graph()->NewNode(jsgraph()->machine()->CreateFloat32x4(),
- inputs[0], inputs[0], inputs[0], inputs[0]);
- case wasm::kExprF32x4Add:
- return graph()->NewNode(jsgraph()->machine()->Float32x4Add(), inputs[0],
+ case wasm::kExprI32x4Eq:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4Equal(), inputs[0],
inputs[1]);
+ case wasm::kExprI32x4Ne:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4NotEqual(),
+ inputs[0], inputs[1]);
+ case wasm::kExprS32x4Select:
+ return graph()->NewNode(jsgraph()->machine()->Simd32x4Select(), inputs[0],
+ inputs[1], inputs[2]);
default:
return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
}
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/wasm/wasm-macro-gen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698