Commit 429d80fa authored by Zhi An Ng's avatar Zhi An Ng Committed by Commit Bot

[wasm-simd] Add wasm-simd-post-mvp flag check for load store lane

Move the simd post mvp flag check into caller, instead of only checking
in the default case. This allows us to check *all* opcodes to see if
they are post-mvp or not. Before this change, we missed the check for
load and store lanes.

Bug: v8:10975,chromium:1149078
Change-Id: Id3cff8169ef5137f54a49d28291698139116e8a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543170Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71272}
parent 2781d585
......@@ -3050,6 +3050,9 @@ class WasmFullDecoder : public WasmDecoder<validate> {
this->pc_, &opcode_length);
if (!VALIDATE(this->ok())) return 0;
trace_msg->AppendOpcode(full_opcode);
if (!CheckSimdPostMvp(full_opcode)) {
return 0;
}
return DecodeSimdOpcode(full_opcode, opcode_length);
}
......@@ -3605,9 +3608,6 @@ class WasmFullDecoder : public WasmDecoder<validate> {
case kExprS128Const:
return SimdConstOp(opcode_length);
default: {
if (!CheckSimdPostMvp(opcode)) {
return 0;
}
const FunctionSig* sig = WasmOpcodes::Signature(opcode);
if (!VALIDATE(sig != nullptr)) {
this->DecodeError("invalid simd opcode");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment