summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm-interpreter.h9
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);
};