Skip to content

Commit 6780262

Browse files
authored
[wasm-objdump] Print i64 values as unsigned (#2344)
This matches the behaviour of i32 printing. Ref: #2342
1 parent 2428315 commit 6780262

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/binary-reader-objdump.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ Result BinaryReaderObjdumpDisassemble::OnOpcodeUint64(uint64_t value) {
853853
if (!in_function_body) {
854854
return Result::Ok;
855855
}
856-
LogOpcode("%" PRId64, value);
856+
LogOpcode("%" PRIu64, value);
857857
return Result::Ok;
858858
}
859859

test/dump/const.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ Code Disassembly:
242242
00002f: 1a | drop
243243
000030: 42 00 | i64.const 0
244244
000032: 1a | drop
245-
000033: 42 80 80 80 80 80 80 80 80 | i64.const -9223372036854775808
245+
000033: 42 80 80 80 80 80 80 80 80 | i64.const 9223372036854775808
246246
00003c: 80 7f |
247247
00003e: 1a | drop
248-
00003f: 42 7f | i64.const -1
248+
00003f: 42 7f | i64.const 18446744073709551615
249249
000041: 1a | drop
250-
000042: 42 80 80 80 80 80 80 80 80 | i64.const -9223372036854775808
250+
000042: 42 80 80 80 80 80 80 80 80 | i64.const 9223372036854775808
251251
00004b: 80 7f |
252252
00004d: 1a | drop
253-
00004e: 42 7f | i64.const -1
253+
00004e: 42 7f | i64.const 18446744073709551615
254254
000050: 1a | drop
255255
000051: 43 00 00 00 00 | f32.const 0x0p+0
256256
000056: 1a | drop

0 commit comments

Comments
 (0)