diff options
author | Ben Smith <binjimin@gmail.com> | 2017-05-22 16:02:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-22 16:02:59 -0700 |
commit | 694f33237cc40e3460cc2d9709b37c367232f76d (patch) | |
tree | e6f346f2bead063c082f93786f9d5484747bf2cf /src/binary-reader-objdump.cc | |
parent | 27a3f8fac98751ce3b7f040a6d6d01d3dde5bcd5 (diff) | |
download | wabt-694f33237cc40e3460cc2d9709b37c367232f76d.tar.gz wabt-694f33237cc40e3460cc2d9709b37c367232f76d.tar.bz2 wabt-694f33237cc40e3460cc2d9709b37c367232f76d.zip |
Fix disassembly of 64-bit values in wasmdump (#446)
Also change formatting of uint32_t operands (`i32.const`, `grow_memory`, `current_memory`) to `%u`.
Fixes #445.
Diffstat (limited to 'src/binary-reader-objdump.cc')
-rw-r--r-- | src/binary-reader-objdump.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc index 30e97d72..854b061a 100644 --- a/src/binary-reader-objdump.cc +++ b/src/binary-reader-objdump.cc @@ -309,7 +309,7 @@ Result BinaryReaderObjdumpDisassemble::OnOpcodeIndex(Index value) { Result BinaryReaderObjdumpDisassemble::OnOpcodeUint32(uint32_t value) { Offset immediate_len = state->offset - current_opcode_offset; - LogOpcode(data, immediate_len, "%#x", value); + LogOpcode(data, immediate_len, "%u", value); return Result::Ok; } @@ -322,7 +322,7 @@ Result BinaryReaderObjdumpDisassemble::OnOpcodeUint32Uint32(uint32_t value, Result BinaryReaderObjdumpDisassemble::OnOpcodeUint64(uint64_t value) { Offset immediate_len = state->offset - current_opcode_offset; - LogOpcode(data, immediate_len, "%d", value); + LogOpcode(data, immediate_len, "%" PRId64, value); return Result::Ok; } |