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

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: Cleanup Created 4 years, 5 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 fe773630ec024c3dbd48f6af849fe0a096e285b2..0a959fad8c6f29f8bcda3f8fe5d1a6d6f493bc7d 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) {
titzer 2016/07/08 14:16:03 Is it possible to make the prefix part of the main
gdeepti 2016/07/11 09:50:34 Done.
+ // 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