summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/binary-reader-objdump.cc4
-rw-r--r--test/dump/basic.txt2
-rw-r--r--test/dump/basic_dump_only.txt2
-rw-r--r--test/dump/block.txt2
-rw-r--r--test/dump/br-loop-inner-expr.txt8
-rw-r--r--test/dump/br-loop-inner.txt4
-rw-r--r--test/dump/br-loop.txt2
-rw-r--r--test/dump/brif.txt2
-rw-r--r--test/dump/brtable.txt6
-rw-r--r--test/dump/call.txt2
-rw-r--r--test/dump/callimport.txt2
-rw-r--r--test/dump/const.txt12
-rw-r--r--test/dump/expr-br.txt2
-rw-r--r--test/dump/expr-brif.txt4
-rw-r--r--test/dump/if-then-else-list.txt10
-rw-r--r--test/dump/if-then-list.txt2
-rw-r--r--test/dump/if.txt4
-rw-r--r--test/dump/no-canonicalize.txt4
-rw-r--r--test/dump/return.txt2
-rw-r--r--test/dump/select.txt12
-rw-r--r--test/link/export.txt4
-rw-r--r--test/link/function_calls_incremental.txt2
-rw-r--r--test/link/incremental.txt2
-rw-r--r--test/link/interp.txt2
-rw-r--r--test/link/names.txt4
25 files changed, 51 insertions, 51 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;
}
diff --git a/test/dump/basic.txt b/test/dump/basic.txt
index c1307ee8..9088b07c 100644
--- a/test/dump/basic.txt
+++ b/test/dump/basic.txt
@@ -96,7 +96,7 @@ Code Disassembly:
000026: 41 00 | i32.const 0
000028: 41 00 | i32.const 0
00002a: 28 02 00 | i32.load 2 0
- 00002d: 41 01 | i32.const 0x1
+ 00002d: 41 01 | i32.const 1
00002f: 6a | i32.add
000030: 36 02 00 | i32.store 2 0
000033: 20 00 | get_local 0
diff --git a/test/dump/basic_dump_only.txt b/test/dump/basic_dump_only.txt
index 16a0009f..4f056884 100644
--- a/test/dump/basic_dump_only.txt
+++ b/test/dump/basic_dump_only.txt
@@ -22,7 +22,7 @@ Code Disassembly:
000026: 41 00 | i32.const 0
000028: 41 00 | i32.const 0
00002a: 28 02 00 | i32.load 2 0
- 00002d: 41 01 | i32.const 0x1
+ 00002d: 41 01 | i32.const 1
00002f: 6a | i32.add
000030: 36 02 00 | i32.store 2 0
000033: 20 00 | get_local 0
diff --git a/test/dump/block.txt b/test/dump/block.txt
index ef2a90d0..4ed168cb 100644
--- a/test/dump/block.txt
+++ b/test/dump/block.txt
@@ -76,7 +76,7 @@ Code Disassembly:
000022: 0b | end
000023 func[1]:
000025: 02 7f | block i32
- 000027: 41 01 | i32.const 0x1
+ 000027: 41 01 | i32.const 1
000029: 0b | end
00002a: 0b | end
;;; STDOUT ;;)
diff --git a/test/dump/br-loop-inner-expr.txt b/test/dump/br-loop-inner-expr.txt
index 04da5d98..32a0b0db 100644
--- a/test/dump/br-loop-inner-expr.txt
+++ b/test/dump/br-loop-inner-expr.txt
@@ -77,16 +77,16 @@ Code Disassembly:
000016 func[0]:
000018: 02 7f | block i32
00001a: 03 7f | loop i32
- 00001c: 41 01 | i32.const 0x1
+ 00001c: 41 01 | i32.const 1
00001e: 04 40 | if
000020: 0c 01 | br 1
000022: 0b | end
- 000023: 41 03 | i32.const 0x3
+ 000023: 41 03 | i32.const 3
000025: 04 40 | if
- 000027: 41 04 | i32.const 0x4
+ 000027: 41 04 | i32.const 4
000029: 0c 02 | br 2
00002b: 0b | end
- 00002c: 41 05 | i32.const 0x5
+ 00002c: 41 05 | i32.const 5
00002e: 0b | end
00002f: 0b | end
000030: 0b | end
diff --git a/test/dump/br-loop-inner.txt b/test/dump/br-loop-inner.txt
index 74a080a3..82b45d87 100644
--- a/test/dump/br-loop-inner.txt
+++ b/test/dump/br-loop-inner.txt
@@ -63,11 +63,11 @@ Code Disassembly:
000015 func[0]:
000017: 02 40 | block
000019: 03 40 | loop
- 00001b: 41 01 | i32.const 0x1
+ 00001b: 41 01 | i32.const 1
00001d: 04 40 | if
00001f: 0c 02 | br 2
000021: 0b | end
- 000022: 41 02 | i32.const 0x2
+ 000022: 41 02 | i32.const 2
000024: 04 40 | if
000026: 0c 01 | br 1
000028: 0b | end
diff --git a/test/dump/br-loop.txt b/test/dump/br-loop.txt
index 7003be39..cfaeff6a 100644
--- a/test/dump/br-loop.txt
+++ b/test/dump/br-loop.txt
@@ -53,7 +53,7 @@ Code Disassembly:
000015 func[0]:
000017: 03 40 | loop
- 000019: 41 01 | i32.const 0x1
+ 000019: 41 01 | i32.const 1
00001b: 04 40 | if
00001d: 0c 01 | br 1
00001f: 0b | end
diff --git a/test/dump/brif.txt b/test/dump/brif.txt
index 7393fa11..05ea0b8f 100644
--- a/test/dump/brif.txt
+++ b/test/dump/brif.txt
@@ -48,7 +48,7 @@ Code Disassembly:
000015 func[0]:
000017: 02 40 | block
- 000019: 41 01 | i32.const 0x1
+ 000019: 41 01 | i32.const 1
00001b: 0d 00 | br_if 0
00001d: 0b | end
00001e: 0b | end
diff --git a/test/dump/brtable.txt b/test/dump/brtable.txt
index c62cd922..31b8f1eb 100644
--- a/test/dump/brtable.txt
+++ b/test/dump/brtable.txt
@@ -87,14 +87,14 @@ Code Disassembly:
00001d: 41 00 | i32.const 0
00001f: 0e 02 00 01 00 | br_table
000024: 0b | end
- 000025: 41 01 | i32.const 0x1
+ 000025: 41 01 | i32.const 1
000027: 1a | drop
- 000028: 41 02 | i32.const 0x2
+ 000028: 41 02 | i32.const 2
00002a: 1a | drop
00002b: 0c 01 | br 1
00002d: 0b | end
00002e: 0b | end
- 00002f: 41 03 | i32.const 0x3
+ 00002f: 41 03 | i32.const 3
000031: 1a | drop
000032: 0b | end
;;; STDOUT ;;)
diff --git a/test/dump/call.txt b/test/dump/call.txt
index ba30f3f5..1b15cec7 100644
--- a/test/dump/call.txt
+++ b/test/dump/call.txt
@@ -43,7 +43,7 @@ call.wasm: file format wasm 0x1
Code Disassembly:
000016 func[0]:
- 000018: 41 01 | i32.const 0x1
+ 000018: 41 01 | i32.const 1
00001a: 10 00 | call 0
00001c: 0b | end
;;; STDOUT ;;)
diff --git a/test/dump/callimport.txt b/test/dump/callimport.txt
index 5ebbb482..01b00121 100644
--- a/test/dump/callimport.txt
+++ b/test/dump/callimport.txt
@@ -73,7 +73,7 @@ callimport.wasm: file format wasm 0x1
Code Disassembly:
000029 func[1]:
- 00002b: 41 01 | i32.const 0x1
+ 00002b: 41 01 | i32.const 1
00002d: 43 00 00 00 40 | f32.const 0x1p+1
000032: 10 00 | call 0
000034: 1a | drop
diff --git a/test/dump/const.txt b/test/dump/const.txt
index 33ab3d2a..8b85a2a4 100644
--- a/test/dump/const.txt
+++ b/test/dump/const.txt
@@ -230,21 +230,21 @@ Code Disassembly:
000016 func[0]:
000019: 41 00 | i32.const 0
00001b: 1a | drop
- 00001c: 41 80 80 80 80 78 | i32.const 0x80000000
+ 00001c: 41 80 80 80 80 78 | i32.const 2147483648
000022: 1a | drop
- 000023: 41 7f | i32.const 0xffffffff
+ 000023: 41 7f | i32.const 4294967295
000025: 1a | drop
- 000026: 41 80 80 80 80 78 | i32.const 0x80000000
+ 000026: 41 80 80 80 80 78 | i32.const 2147483648
00002c: 1a | drop
- 00002d: 41 7f | i32.const 0xffffffff
+ 00002d: 41 7f | i32.const 4294967295
00002f: 1a | drop
000030: 42 00 | i64.const 0
000032: 1a | drop
- 000033: 42 80 80 80 80 80 80 80 80 80 | i64.const 0
+ 000033: 42 80 80 80 80 80 80 80 80 80 | i64.const -9223372036854775808
00003e: 1a | drop
00003f: 42 7f | i64.const -1
000041: 1a | drop
- 000042: 42 80 80 80 80 80 80 80 80 80 | i64.const 0
+ 000042: 42 80 80 80 80 80 80 80 80 80 | i64.const -9223372036854775808
00004d: 1a | drop
00004e: 42 7f | i64.const -1
000050: 1a | drop
diff --git a/test/dump/expr-br.txt b/test/dump/expr-br.txt
index 16e6fddc..38233ee1 100644
--- a/test/dump/expr-br.txt
+++ b/test/dump/expr-br.txt
@@ -50,7 +50,7 @@ Code Disassembly:
000016 func[0]:
000018: 02 7f | block i32
- 00001a: 41 01 | i32.const 0x1
+ 00001a: 41 01 | i32.const 1
00001c: 0c 00 | br 0
00001e: 0b | end
00001f: 0b | end
diff --git a/test/dump/expr-brif.txt b/test/dump/expr-brif.txt
index a918138a..bd80fe47 100644
--- a/test/dump/expr-brif.txt
+++ b/test/dump/expr-brif.txt
@@ -57,11 +57,11 @@ Code Disassembly:
000016 func[0]:
000018: 02 7f | block i32
- 00001a: 41 2a | i32.const 0x2a
+ 00001a: 41 2a | i32.const 42
00001c: 41 00 | i32.const 0
00001e: 0d 00 | br_if 0
000020: 1a | drop
- 000021: 41 1d | i32.const 0x1d
+ 000021: 41 1d | i32.const 29
000023: 0b | end
000024: 0b | end
;;; STDOUT ;;)
diff --git a/test/dump/if-then-else-list.txt b/test/dump/if-then-else-list.txt
index 6c85c1ec..9ca82274 100644
--- a/test/dump/if-then-else-list.txt
+++ b/test/dump/if-then-else-list.txt
@@ -66,16 +66,16 @@ if-then-else-list.wasm: file format wasm 0x1
Code Disassembly:
000015 func[0]:
- 000017: 41 01 | i32.const 0x1
+ 000017: 41 01 | i32.const 1
000019: 04 40 | if
- 00001b: 41 02 | i32.const 0x2
+ 00001b: 41 02 | i32.const 2
00001d: 1a | drop
- 00001e: 41 03 | i32.const 0x3
+ 00001e: 41 03 | i32.const 3
000020: 1a | drop
000021: 05 | else
- 000022: 41 04 | i32.const 0x4
+ 000022: 41 04 | i32.const 4
000024: 1a | drop
- 000025: 41 05 | i32.const 0x5
+ 000025: 41 05 | i32.const 5
000027: 1a | drop
000028: 0b | end
000029: 0b | end
diff --git a/test/dump/if-then-list.txt b/test/dump/if-then-list.txt
index 63ab7cea..fc0d7248 100644
--- a/test/dump/if-then-list.txt
+++ b/test/dump/if-then-list.txt
@@ -48,7 +48,7 @@ if-then-list.wasm: file format wasm 0x1
Code Disassembly:
000015 func[0]:
- 000017: 41 01 | i32.const 0x1
+ 000017: 41 01 | i32.const 1
000019: 04 40 | if
00001b: 01 | nop
00001c: 01 | nop
diff --git a/test/dump/if.txt b/test/dump/if.txt
index a23ba630..04e68964 100644
--- a/test/dump/if.txt
+++ b/test/dump/if.txt
@@ -85,7 +85,7 @@ if.wasm: file format wasm 0x1
Code Disassembly:
000016 func[0]:
- 000018: 41 01 | i32.const 0x1
+ 000018: 41 01 | i32.const 1
00001a: 04 40 | if
00001c: 01 | nop
00001d: 0b | end
@@ -98,7 +98,7 @@ Code Disassembly:
00002e: 1a | drop
00002f: 0b | end
000030 func[1]:
- 000032: 41 01 | i32.const 0x1
+ 000032: 41 01 | i32.const 1
000034: 04 40 | if
000036: 0f | return
000037: 05 | else
diff --git a/test/dump/no-canonicalize.txt b/test/dump/no-canonicalize.txt
index 19453c72..a9439e13 100644
--- a/test/dump/no-canonicalize.txt
+++ b/test/dump/no-canonicalize.txt
@@ -159,13 +159,13 @@ Code Disassembly:
00007f: 0b | end
000080 func[2]:
000086: 20 00 | get_local 0
- 000088: 41 01 | i32.const 0x1
+ 000088: 41 01 | i32.const 1
00008a: 6a | i32.add
00008b: 1a | drop
00008c: 0b | end
00008d func[3]:
000093: 20 00 | get_local 0
- 000095: 41 02 | i32.const 0x2
+ 000095: 41 02 | i32.const 2
000097: 6c | i32.mul
000098: 1a | drop
000099: 0b | end
diff --git a/test/dump/return.txt b/test/dump/return.txt
index c46482e6..8bdb3815 100644
--- a/test/dump/return.txt
+++ b/test/dump/return.txt
@@ -55,7 +55,7 @@ return.wasm: file format wasm 0x1
Code Disassembly:
00001a func[0]:
- 00001c: 41 2a | i32.const 0x2a
+ 00001c: 41 2a | i32.const 42
00001e: 0f | return
00001f: 0b | end
000020 func[1]:
diff --git a/test/dump/select.txt b/test/dump/select.txt
index f819454e..5fbde1e7 100644
--- a/test/dump/select.txt
+++ b/test/dump/select.txt
@@ -88,24 +88,24 @@ select.wasm: file format wasm 0x1
Code Disassembly:
000015 func[0]:
- 000017: 41 02 | i32.const 0x2
- 000019: 41 03 | i32.const 0x3
- 00001b: 41 01 | i32.const 0x1
+ 000017: 41 02 | i32.const 2
+ 000019: 41 03 | i32.const 3
+ 00001b: 41 01 | i32.const 1
00001d: 1b | select
00001e: 1a | drop
00001f: 42 02 | i64.const 2
000021: 42 03 | i64.const 3
- 000023: 41 01 | i32.const 0x1
+ 000023: 41 01 | i32.const 1
000025: 1b | select
000026: 1a | drop
000027: 43 00 00 00 40 | f32.const 0x1p+1
00002c: 43 00 00 40 40 | f32.const 0x1.8p+1
- 000031: 41 01 | i32.const 0x1
+ 000031: 41 01 | i32.const 1
000033: 1b | select
000034: 1a | drop
000035: 44 00 00 00 00 00 00 00 40 | f64.const 0x1p+1
00003e: 44 00 00 00 00 00 00 08 40 | f64.const 0x1.8p+1
- 000047: 41 01 | i32.const 0x1
+ 000047: 41 01 | i32.const 1
000049: 1b | select
00004a: 1a | drop
00004b: 0b | end
diff --git a/test/link/export.txt b/test/link/export.txt
index 2b3b2fdd..fd5bca28 100644
--- a/test/link/export.txt
+++ b/test/link/export.txt
@@ -44,12 +44,12 @@ Custom:
Code Disassembly:
000032 func[0]:
- 000034: 41 01 | i32.const 0x1
+ 000034: 41 01 | i32.const 1
000036: 10 80 80 80 80 00 | call 0
000037: R_FUNC_INDEX_LEB 0
00003c: 0b | end
00003d func[1]:
- 00003f: 41 02 | i32.const 0x2
+ 00003f: 41 02 | i32.const 2
000041: 10 81 80 80 80 00 | call 1
000042: R_FUNC_INDEX_LEB 1
000047: 0b | end
diff --git a/test/link/function_calls_incremental.txt b/test/link/function_calls_incremental.txt
index 39e36d94..b7825a6a 100644
--- a/test/link/function_calls_incremental.txt
+++ b/test/link/function_calls_incremental.txt
@@ -83,7 +83,7 @@ Code Disassembly:
0000a3: 43 00 00 80 3f | f32.const 0x1p+0
0000a8: 10 82 80 80 80 00 | call 2
0000a9: R_FUNC_INDEX_LEB 2
- 0000ae: 41 0a | i32.const 0xa
+ 0000ae: 41 0a | i32.const 10
0000b0: 10 85 80 80 80 00 | call 5
0000b1: R_FUNC_INDEX_LEB 5
0000b6: 0b | end
diff --git a/test/link/incremental.txt b/test/link/incremental.txt
index c19a4316..1269c23e 100644
--- a/test/link/incremental.txt
+++ b/test/link/incremental.txt
@@ -111,7 +111,7 @@ Code Disassembly:
0000dd: 43 00 00 80 3f | f32.const 0x1p+0
0000e2: 10 82 80 80 80 00 | call 2
0000e3: R_FUNC_INDEX_LEB 2
- 0000e8: 41 0a | i32.const 0xa
+ 0000e8: 41 0a | i32.const 10
0000ea: 10 85 80 80 80 00 | call 5
0000eb: R_FUNC_INDEX_LEB 5
0000f0: 0b | end
diff --git a/test/link/interp.txt b/test/link/interp.txt
index 0b4690c6..93c6176f 100644
--- a/test/link/interp.txt
+++ b/test/link/interp.txt
@@ -97,7 +97,7 @@ Code Disassembly:
000093: 0f | return
000094: 0b | end
000095 func[3]:
- 000097: 41 2a | i32.const 0x2a
+ 000097: 41 2a | i32.const 42
000099: 0f | return
00009a: 0b | end
00009b func[4]:
diff --git a/test/link/names.txt b/test/link/names.txt
index aa616aa1..e5681cb3 100644
--- a/test/link/names.txt
+++ b/test/link/names.txt
@@ -70,7 +70,7 @@ Custom:
Code Disassembly:
00007d <$name1>:
- 00007f: 41 01 | i32.const 0x1
+ 00007f: 41 01 | i32.const 1
000081: 10 86 80 80 80 00 | call 6 <$name3>
000082: R_FUNC_INDEX_LEB 6 <$name3>
000087: 0b | end
@@ -82,7 +82,7 @@ Code Disassembly:
000093 func[5]:
000095: 0b | end
000096 <$name3>:
- 000098: 41 02 | i32.const 0x2
+ 000098: 41 02 | i32.const 2
00009a: 10 86 80 80 80 00 | call 6 <$name3>
00009b: R_FUNC_INDEX_LEB 6 <$name3>
0000a0: 0b | end