diff options
author | Alon Zakai <azakai@google.com> | 2024-11-08 09:06:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 09:06:26 -0800 |
commit | b30067658459ca167e58fe0dee9d85ea6100c223 (patch) | |
tree | e8ee522c5ba46ade6e9426cc9aedf420d5c2ff80 /src/wasm-interpreter.h | |
parent | 12ef2030ad2e7ceb5d208d4a24f25142d8a5f556 (diff) | |
download | binaryen-b30067658459ca167e58fe0dee9d85ea6100c223.tar.gz binaryen-b30067658459ca167e58fe0dee9d85ea6100c223.tar.bz2 binaryen-b30067658459ca167e58fe0dee9d85ea6100c223.zip |
[wasm64] Fix 32-bit address computation in execution of SIMDLoadExtend (#7068)
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index fb3501252..f3471cfa8 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -3692,11 +3692,14 @@ public: WASM_UNREACHABLE("invalid op"); }; auto memorySize = info.instance->getMemorySize(info.name); + auto addressType = curr->ptr->type; auto fillLanes = [&](auto lanes, size_t laneBytes) { for (auto& lane : lanes) { - lane = loadLane(info.instance->getFinalAddress( - curr, Literal(uint32_t(src)), laneBytes, memorySize)); - src = Address(uint32_t(src) + laneBytes); + auto ptr = Literal::makeFromInt64(src, addressType); + lane = loadLane( + info.instance->getFinalAddress(curr, ptr, laneBytes, memorySize)); + src = + ptr.add(Literal::makeFromInt32(laneBytes, addressType)).getUnsigned(); } return Literal(lanes); }; |