Fix opcode lengths for execute and loads for wasm-interpreter
This off-by-1 error surfaces when the load/store opcodes take up 2 bytes, which is the case for v128.load and v128.store SIMD operations. Bug: v8:9015 Change-Id: Ife17375ed3450a95399b326bc6415dbc3ed3773b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1769480 Commit-Queue: Zhi An Ng <zhin@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#63405}
This commit is contained in:
parent
b8cdfe5565
commit
14f1796f04
@ -1676,7 +1676,7 @@ class ThreadImpl {
|
||||
converter<ctype, mtype>{}(ReadLittleEndianValue<mtype>(addr)));
|
||||
|
||||
Push(result);
|
||||
*len = 1 + imm.length;
|
||||
*len += imm.length;
|
||||
|
||||
if (FLAG_trace_wasm_memory) {
|
||||
MemoryTracingInfo info(imm.offset + index, false, rep);
|
||||
@ -1702,7 +1702,7 @@ class ThreadImpl {
|
||||
return false;
|
||||
}
|
||||
WriteLittleEndianValue<mtype>(addr, converter<mtype, ctype>{}(val));
|
||||
*len = 1 + imm.length;
|
||||
*len += imm.length;
|
||||
|
||||
if (FLAG_trace_wasm_memory) {
|
||||
MemoryTracingInfo info(imm.offset + index, true, rep);
|
||||
|
@ -2882,7 +2882,7 @@ WASM_SIMD_TEST(SimdF32x4SetGlobal) {
|
||||
CHECK_EQ(GetScalar(global, 3), 65.0f);
|
||||
}
|
||||
|
||||
WASM_SIMD_COMPILED_TEST(SimdLoadStoreLoad) {
|
||||
WASM_SIMD_TEST(SimdLoadStoreLoad) {
|
||||
WasmRunner<int32_t> r(execution_tier, lower_simd);
|
||||
int32_t* memory =
|
||||
r.builder().AddMemoryElems<int32_t>(kWasmPageSize / sizeof(int32_t));
|
||||
|
Loading…
Reference in New Issue
Block a user