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

Unified Diff: src/wasm/ast-decoder.cc

Issue 1991143002: Convert SIMD wasm ops to runtime function calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review changes Created 4 years, 6 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/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index 833b33538ab554b5fbc74bca4f1dc72c2c4d86eb..009cdc54f71bc390115480ea08e83435514c12cb 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -522,6 +522,8 @@ class WasmFullDecoder : public WasmDecoder {
return builder_->Float32Constant(0);
case kAstF64:
return builder_->Float64Constant(0);
+ case kAstS128:
+ return builder_->DefaultS128Value();
default:
UNREACHABLE();
return nullptr;
@@ -589,6 +591,14 @@ class WasmFullDecoder : public WasmDecoder {
while (true) { // decoding loop.
unsigned len = 1;
WasmOpcode opcode = static_cast<WasmOpcode>(*pc_);
+ if (opcode == kSimdPrefix) {
+ // TODO(gdeepti): Piggybacking on unop/binop works for now, but this
+ // should be its own function to be able to parse more complex opcodes.
+ len++;
+ byte simd_index = *(pc_ + 1);
+ opcode = static_cast<WasmOpcode>(opcode << 8 | simd_index);
+ }
+
TRACE(" @%-6d #%02x:%-20s|", startrel(pc_), opcode,
WasmOpcodes::ShortOpcodeName(opcode));

Powered by Google App Engine
This is Rietveld 408576698