[PATCH] D141005: [lld][WebAssembly] Fix memory.fill argument in 64-bit mode
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 03:11:21 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGff8e0ed9308c: [lld][WebAssembly] Fix memory.fill argument in 64-bit mode (authored by sbc100).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141005/new/
https://reviews.llvm.org/D141005
Files:
lld/test/wasm/data-segments.ll
lld/wasm/Writer.cpp
Index: lld/wasm/Writer.cpp
===================================================================
--- lld/wasm/Writer.cpp
+++ lld/wasm/Writer.cpp
@@ -1226,7 +1226,7 @@
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");
Index: lld/test/wasm/data-segments.ll
===================================================================
--- lld/test/wasm/data-segments.ll
+++ lld/test/wasm/data-segments.ll
@@ -222,7 +222,7 @@
; PIC-DIS-NEXT: global.get 1
; PIC-DIS-NEXT: [[PTR]].add
; DIS-NEXT: i32.const 0
-; DIS-NEXT: i32.const 10000
+; DIS-NEXT: [[PTR]].const 10000
; DIS-NEXT: memory.fill 0
; NOPIC-DIS-NEXT: [[PTR]].const 11064
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141005.487734.patch
Type: text/x-patch
Size: 1058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230110/ac9d26eb/attachment.bin>
More information about the llvm-commits
mailing list