Commit aa001dce authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd] Fix generation of s128.store

s128.store should be in the list for generating kStmt, not kWasmS128.
No regression test added because the generated JS file is not helpful
for this bug - the failed assertion is in the fuzzer, not the engine.

Bug: chromium:1061049
Change-Id: I44092fa10c57aeeb34f1c6c5a7d655def31a7363
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101927Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66692}
parent 37ef629a
......@@ -178,6 +178,9 @@ class WasmGenerator {
// TODO(eholk): make this function constexpr once gcc supports it
static uint8_t max_alignment(WasmOpcode memop) {
switch (memop) {
case kExprS128LoadMem:
case kExprS128StoreMem:
return 4;
case kExprI64LoadMem:
case kExprF64LoadMem:
case kExprI64StoreMem:
......@@ -614,6 +617,7 @@ void WasmGenerator::Generate<ValueType::kStmt>(DataRange* data) {
&WasmGenerator::memop<kExprI64AtomicStore8U, ValueType::kI64>,
&WasmGenerator::memop<kExprI64AtomicStore16U, ValueType::kI64>,
&WasmGenerator::memop<kExprI64AtomicStore32U, ValueType::kI64>,
&WasmGenerator::memop<kExprS128StoreMem, ValueType::kS128>,
&WasmGenerator::drop,
......@@ -1053,8 +1057,7 @@ void WasmGenerator::Generate<ValueType::kS128>(DataRange* data) {
&WasmGenerator::simd_op<kExprF64x2Add, ValueType::kS128,
ValueType::kS128>,
&WasmGenerator::memop<kExprS128LoadMem>,
&WasmGenerator::memop<kExprS128StoreMem, ValueType::kS128>};
&WasmGenerator::memop<kExprS128LoadMem>};
GenerateOneOf(alternatives, data);
}
......
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