Index: src/wasm/ast-decoder.cc |
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc |
index 02d1db5bdad3b38998b0fd5b11e75c6202c58eab..025ccdf1d7bfc0d2c159e511600b0d313cf0fa9b 100644 |
--- a/src/wasm/ast-decoder.cc |
+++ b/src/wasm/ast-decoder.cc |
@@ -32,6 +32,9 @@ namespace wasm { |
#endif |
#define CHECK_PROTOTYPE_OPCODE(flag) \ |
+ if (module_ && module_->origin == kAsmJsOrigin) { \ |
+ error("Opcode not supported for asmjs modules"); \ |
+ } \ |
if (!FLAG_##flag) { \ |
error("Invalid opcode (enable with --" #flag ")"); \ |
break; \ |
@@ -500,7 +503,7 @@ class WasmFullDecoder : public WasmDecoder { |
case kAstF64: |
return builder_->Float64Constant(0); |
case kAstS128: |
- return builder_->DefaultS128Value(); |
+ return builder_->CreateS128Value(0); |
default: |
UNREACHABLE(); |
return nullptr; |