summaryrefslogtreecommitdiff
path: root/lld/wasm
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2023-01-04 11:28:55 -0800
committerSam Clegg <sbc@chromium.org>2023-01-10 03:11:05 -0800
commitff8e0ed9308c45d23572f0726abf652b295de56b (patch)
tree81255301527ff110cc2629c8d589732fb0f8a1d3 /lld/wasm
parentf085d089f9db37f8a3d0e3d15c5a478574a4327d (diff)
downloadllvm-ff8e0ed9308c45d23572f0726abf652b295de56b.tar.gz
[lld][WebAssembly] Fix memory.fill argument in 64-bit mode
This only effects folks building with wasm64 + shared memory which is not currently a supported configuration in emscripten or any other wasm toolchain. Differential Revision: https://reviews.llvm.org/D141005
Diffstat (limited to 'lld/wasm')
-rw-r--r--lld/wasm/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index 06bf45830563..36005037cd17 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -1226,7 +1226,7 @@ void Writer::createInitMemoryFunction() {
if (s->isBss) {
writeI32Const(os, 0, "fill value");
- writeI32Const(os, s->size, "memory region size");
+ writePtrConst(os, s->size, is64, "memory region size");
writeU8(os, WASM_OPCODE_MISC_PREFIX, "bulk-memory prefix");
writeUleb128(os, WASM_OPCODE_MEMORY_FILL, "memory.fill");
writeU8(os, 0, "memory index immediate");