summaryrefslogtreecommitdiff
path: root/test/dump
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-03-02 17:37:47 -0800
committerBen Smith <binji@chromium.org>2016-03-04 11:24:58 -0800
commit2ca5d5ca13594633758b554510c30957a47abdd4 (patch)
tree7b85bb1363c573508c33b686a3ccf506f6369d76 /test/dump
parent627c2ba1fadbd7097039098042f06b4600bc7316 (diff)
downloadwabt-2ca5d5ca13594633758b554510c30957a47abdd4.tar.gz
wabt-2ca5d5ca13594633758b554510c30957a47abdd4.tar.bz2
wabt-2ca5d5ca13594633758b554510c30957a47abdd4.zip
store i32.const and i64.const as signed-LEB128
Diffstat (limited to 'test/dump')
-rw-r--r--test/dump/basic.txt16
-rw-r--r--test/dump/binary.txt238
-rw-r--r--test/dump/block.txt6
-rw-r--r--test/dump/br-block-named.txt6
-rw-r--r--test/dump/br-block.txt6
-rw-r--r--test/dump/br-loop-inner-expr.txt20
-rw-r--r--test/dump/br-loop-inner.txt10
-rw-r--r--test/dump/br-loop.txt6
-rw-r--r--test/dump/brif-loop.txt6
-rw-r--r--test/dump/brif.txt6
-rw-r--r--test/dump/call.txt6
-rw-r--r--test/dump/callimport.txt6
-rw-r--r--test/dump/callindirect-after-import.txt6
-rw-r--r--test/dump/callindirect.txt10
-rw-r--r--test/dump/cast.txt21
-rw-r--r--test/dump/compare.txt305
-rw-r--r--test/dump/const.txt165
-rw-r--r--test/dump/convert.txt12
-rw-r--r--test/dump/dedupe-sig.txt23
-rw-r--r--test/dump/expr-br.txt6
-rw-r--r--test/dump/expr-brif.txt14
-rw-r--r--test/dump/if-then-else-list.txt24
-rw-r--r--test/dump/if-then-list.txt6
-rw-r--r--test/dump/if.txt16
-rw-r--r--test/dump/load-aligned.txt128
-rw-r--r--test/dump/load.txt64
-rw-r--r--test/dump/result.txt41
-rw-r--r--test/dump/return.txt6
-rw-r--r--test/dump/select.txt63
-rw-r--r--test/dump/setlocal-param.txt39
-rw-r--r--test/dump/setlocal.txt51
-rw-r--r--test/dump/store-aligned.txt313
-rw-r--r--test/dump/store.txt105
-rw-r--r--test/dump/tableswitch-implicit-block.txt6
-rw-r--r--test/dump/tableswitch.txt20
-rw-r--r--test/dump/unary.txt53
36 files changed, 899 insertions, 930 deletions
diff --git a/test/dump/basic.txt b/test/dump/basic.txt
index 0738c1bf..85a3a6c3 100644
--- a/test/dump/basic.txt
+++ b/test/dump/basic.txt
@@ -27,15 +27,15 @@
0000017: 0000 ; func body size
0000019: 33 ; OPCODE_I32_STORE_MEM
000001a: 00 ; store access byte
-000001b: 09 ; OPCODE_I8_CONST
-000001c: 00 ; u8 literal
+000001b: 0a ; OPCODE_I32_CONST
+000001c: 00 ; i32 literal
000001d: 40 ; OPCODE_I32_ADD
000001e: 2a ; OPCODE_I32_LOAD_MEM
000001f: 00 ; load access byte
-0000020: 09 ; OPCODE_I8_CONST
-0000021: 00 ; u8 literal
-0000022: 09 ; OPCODE_I8_CONST
-0000023: 01 ; u8 literal
+0000020: 0a ; OPCODE_I32_CONST
+0000021: 00 ; i32 literal
+0000022: 0a ; OPCODE_I32_CONST
+0000023: 01 ; i32 literal
0000024: 40 ; OPCODE_I32_ADD
0000025: 0e ; OPCODE_GET_LOCAL
0000026: 00 ; remapped local index
@@ -53,7 +53,7 @@
0000033: 00 ; \0
;; dump
0000000: 0061 736d 0a00 0000 0001 0101 0101 0201
-0000010: 0101 0201 0000 0010 0033 0009 0040 2a00
-0000020: 0900 0901 400e 000e 0109 0100 0032 0000
+0000010: 0101 0201 0000 0010 0033 000a 0040 2a00
+0000020: 0a00 0a01 400e 000e 0109 0100 0032 0000
0000030: 0006 6600
;;; STDOUT ;;)
diff --git a/test/dump/binary.txt b/test/dump/binary.txt
index 7b9cb16c..f953bd1d 100644
--- a/test/dump/binary.txt
+++ b/test/dump/binary.txt
@@ -118,34 +118,34 @@
000001d: 4a ; OPCODE_I32_SHL
000001e: 4b ; OPCODE_I32_SHR_U
000001f: 4c ; OPCODE_I32_SHR_S
-0000020: 09 ; OPCODE_I8_CONST
-0000021: 00 ; u8 literal
-0000022: 09 ; OPCODE_I8_CONST
-0000023: 00 ; u8 literal
-0000024: 09 ; OPCODE_I8_CONST
-0000025: 00 ; u8 literal
-0000026: 09 ; OPCODE_I8_CONST
-0000027: 00 ; u8 literal
-0000028: 09 ; OPCODE_I8_CONST
-0000029: 00 ; u8 literal
-000002a: 09 ; OPCODE_I8_CONST
-000002b: 00 ; u8 literal
-000002c: 09 ; OPCODE_I8_CONST
-000002d: 00 ; u8 literal
-000002e: 09 ; OPCODE_I8_CONST
-000002f: 00 ; u8 literal
-0000030: 09 ; OPCODE_I8_CONST
-0000031: 00 ; u8 literal
-0000032: 09 ; OPCODE_I8_CONST
-0000033: 00 ; u8 literal
-0000034: 09 ; OPCODE_I8_CONST
-0000035: 00 ; u8 literal
-0000036: 09 ; OPCODE_I8_CONST
-0000037: 00 ; u8 literal
-0000038: 09 ; OPCODE_I8_CONST
-0000039: 00 ; u8 literal
-000003a: 09 ; OPCODE_I8_CONST
-000003b: 00 ; u8 literal
+0000020: 0a ; OPCODE_I32_CONST
+0000021: 00 ; i32 literal
+0000022: 0a ; OPCODE_I32_CONST
+0000023: 00 ; i32 literal
+0000024: 0a ; OPCODE_I32_CONST
+0000025: 00 ; i32 literal
+0000026: 0a ; OPCODE_I32_CONST
+0000027: 00 ; i32 literal
+0000028: 0a ; OPCODE_I32_CONST
+0000029: 00 ; i32 literal
+000002a: 0a ; OPCODE_I32_CONST
+000002b: 00 ; i32 literal
+000002c: 0a ; OPCODE_I32_CONST
+000002d: 00 ; i32 literal
+000002e: 0a ; OPCODE_I32_CONST
+000002f: 00 ; i32 literal
+0000030: 0a ; OPCODE_I32_CONST
+0000031: 00 ; i32 literal
+0000032: 0a ; OPCODE_I32_CONST
+0000033: 00 ; i32 literal
+0000034: 0a ; OPCODE_I32_CONST
+0000035: 00 ; i32 literal
+0000036: 0a ; OPCODE_I32_CONST
+0000037: 00 ; i32 literal
+0000038: 0a ; OPCODE_I32_CONST
+0000039: 00 ; i32 literal
+000003a: 0a ; OPCODE_I32_CONST
+000003b: 00 ; i32 literal
000003c: 5b ; OPCODE_I64_ADD
000003d: 5c ; OPCODE_I64_SUB
000003e: 5d ; OPCODE_I64_MUL
@@ -160,101 +160,95 @@
0000047: 66 ; OPCODE_I64_SHR_U
0000048: 67 ; OPCODE_I64_SHR_S
0000049: 0b ; OPCODE_I64_CONST
-000004a: 0000 0000 0000 0000 ; u64 literal
-0000052: 0b ; OPCODE_I64_CONST
-0000053: 0000 0000 0000 0000 ; u64 literal
+000004a: 00 ; i64 literal
+000004b: 0b ; OPCODE_I64_CONST
+000004c: 00 ; i64 literal
+000004d: 0b ; OPCODE_I64_CONST
+000004e: 00 ; i64 literal
+000004f: 0b ; OPCODE_I64_CONST
+0000050: 00 ; i64 literal
+0000051: 0b ; OPCODE_I64_CONST
+0000052: 00 ; i64 literal
+0000053: 0b ; OPCODE_I64_CONST
+0000054: 00 ; i64 literal
+0000055: 0b ; OPCODE_I64_CONST
+0000056: 00 ; i64 literal
+0000057: 0b ; OPCODE_I64_CONST
+0000058: 00 ; i64 literal
+0000059: 0b ; OPCODE_I64_CONST
+000005a: 00 ; i64 literal
000005b: 0b ; OPCODE_I64_CONST
-000005c: 0000 0000 0000 0000 ; u64 literal
-0000064: 0b ; OPCODE_I64_CONST
-0000065: 0000 0000 0000 0000 ; u64 literal
-000006d: 0b ; OPCODE_I64_CONST
-000006e: 0000 0000 0000 0000 ; u64 literal
-0000076: 0b ; OPCODE_I64_CONST
-0000077: 0000 0000 0000 0000 ; u64 literal
-000007f: 0b ; OPCODE_I64_CONST
-0000080: 0000 0000 0000 0000 ; u64 literal
-0000088: 0b ; OPCODE_I64_CONST
-0000089: 0000 0000 0000 0000 ; u64 literal
-0000091: 0b ; OPCODE_I64_CONST
-0000092: 0000 0000 0000 0000 ; u64 literal
-000009a: 0b ; OPCODE_I64_CONST
-000009b: 0000 0000 0000 0000 ; u64 literal
-00000a3: 0b ; OPCODE_I64_CONST
-00000a4: 0000 0000 0000 0000 ; u64 literal
-00000ac: 0b ; OPCODE_I64_CONST
-00000ad: 0000 0000 0000 0000 ; u64 literal
-00000b5: 0b ; OPCODE_I64_CONST
-00000b6: 0000 0000 0000 0000 ; u64 literal
-00000be: 0b ; OPCODE_I64_CONST
-00000bf: 0000 0000 0000 0000 ; u64 literal
-00000c7: 75 ; OPCODE_F32_ADD
-00000c8: 76 ; OPCODE_F32_SUB
-00000c9: 77 ; OPCODE_F32_MUL
-00000ca: 78 ; OPCODE_F32_DIV
-00000cb: 79 ; OPCODE_F32_MIN
-00000cc: 7a ; OPCODE_F32_MAX
-00000cd: 7d ; OPCODE_F32_COPYSIGN
-00000ce: 0d ; OPCODE_F32_CONST
-00000cf: 0000 0000 ; f32 literal
-00000d3: 0d ; OPCODE_F32_CONST
-00000d4: 0000 0000 ; f32 literal
-00000d8: 0d ; OPCODE_F32_CONST
-00000d9: 0000 0000 ; f32 literal
-00000dd: 0d ; OPCODE_F32_CONST
-00000de: 0000 0000 ; f32 literal
-00000e2: 0d ; OPCODE_F32_CONST
-00000e3: 0000 0000 ; f32 literal
-00000e7: 0d ; OPCODE_F32_CONST
-00000e8: 0000 0000 ; f32 literal
-00000ec: 0d ; OPCODE_F32_CONST
-00000ed: 0000 0000 ; f32 literal
-00000f1: 0d ; OPCODE_F32_CONST
-00000f2: 0000 0000 ; f32 literal
-00000f6: 89 ; OPCODE_F64_ADD
-00000f7: 8a ; OPCODE_F64_SUB
-00000f8: 8b ; OPCODE_F64_MUL
-00000f9: 8c ; OPCODE_F64_DIV
-00000fa: 8d ; OPCODE_F64_MIN
-00000fb: 8e ; OPCODE_F64_MAX
-00000fc: 91 ; OPCODE_F64_COPYSIGN
-00000fd: 0c ; OPCODE_F64_CONST
-00000fe: 0000 0000 0000 0000 ; f64 literal
-0000106: 0c ; OPCODE_F64_CONST
-0000107: 0000 0000 0000 0000 ; f64 literal
-000010f: 0c ; OPCODE_F64_CONST
-0000110: 0000 0000 0000 0000 ; f64 literal
-0000118: 0c ; OPCODE_F64_CONST
-0000119: 0000 0000 0000 0000 ; f64 literal
-0000121: 0c ; OPCODE_F64_CONST
-0000122: 0000 0000 0000 0000 ; f64 literal
-000012a: 0c ; OPCODE_F64_CONST
-000012b: 0000 0000 0000 0000 ; f64 literal
-0000133: 0c ; OPCODE_F64_CONST
-0000134: 0000 0000 0000 0000 ; f64 literal
-000013c: 0c ; OPCODE_F64_CONST
-000013d: 0000 0000 0000 0000 ; f64 literal
-0000011: 3201 ; FIXUP func body size
-0000145: 06 ; WASM_BINARY_SECTION_END
+000005c: 00 ; i64 literal
+000005d: 0b ; OPCODE_I64_CONST
+000005e: 00 ; i64 literal
+000005f: 0b ; OPCODE_I64_CONST
+0000060: 00 ; i64 literal
+0000061: 0b ; OPCODE_I64_CONST
+0000062: 00 ; i64 literal
+0000063: 0b ; OPCODE_I64_CONST
+0000064: 00 ; i64 literal
+0000065: 75 ; OPCODE_F32_ADD
+0000066: 76 ; OPCODE_F32_SUB
+0000067: 77 ; OPCODE_F32_MUL
+0000068: 78 ; OPCODE_F32_DIV
+0000069: 79 ; OPCODE_F32_MIN
+000006a: 7a ; OPCODE_F32_MAX
+000006b: 7d ; OPCODE_F32_COPYSIGN
+000006c: 0d ; OPCODE_F32_CONST
+000006d: 0000 0000 ; f32 literal
+0000071: 0d ; OPCODE_F32_CONST
+0000072: 0000 0000 ; f32 literal
+0000076: 0d ; OPCODE_F32_CONST
+0000077: 0000 0000 ; f32 literal
+000007b: 0d ; OPCODE_F32_CONST
+000007c: 0000 0000 ; f32 literal
+0000080: 0d ; OPCODE_F32_CONST
+0000081: 0000 0000 ; f32 literal
+0000085: 0d ; OPCODE_F32_CONST
+0000086: 0000 0000 ; f32 literal
+000008a: 0d ; OPCODE_F32_CONST
+000008b: 0000 0000 ; f32 literal
+000008f: 0d ; OPCODE_F32_CONST
+0000090: 0000 0000 ; f32 literal
+0000094: 89 ; OPCODE_F64_ADD
+0000095: 8a ; OPCODE_F64_SUB
+0000096: 8b ; OPCODE_F64_MUL
+0000097: 8c ; OPCODE_F64_DIV
+0000098: 8d ; OPCODE_F64_MIN
+0000099: 8e ; OPCODE_F64_MAX
+000009a: 91 ; OPCODE_F64_COPYSIGN
+000009b: 0c ; OPCODE_F64_CONST
+000009c: 0000 0000 0000 0000 ; f64 literal
+00000a4: 0c ; OPCODE_F64_CONST
+00000a5: 0000 0000 0000 0000 ; f64 literal
+00000ad: 0c ; OPCODE_F64_CONST
+00000ae: 0000 0000 0000 0000 ; f64 literal
+00000b6: 0c ; OPCODE_F64_CONST
+00000b7: 0000 0000 0000 0000 ; f64 literal
+00000bf: 0c ; OPCODE_F64_CONST
+00000c0: 0000 0000 0000 0000 ; f64 literal
+00000c8: 0c ; OPCODE_F64_CONST
+00000c9: 0000 0000 0000 0000 ; f64 literal
+00000d1: 0c ; OPCODE_F64_CONST
+00000d2: 0000 0000 0000 0000 ; f64 literal
+00000da: 0c ; OPCODE_F64_CONST
+00000db: 0000 0000 0000 0000 ; f64 literal
+0000011: d000 ; FIXUP func body size
+00000e3: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0032 0140 4142 4344 4546 4748 494a 4b4c
-0000020: 0900 0900 0900 0900 0900 0900 0900 0900
-0000030: 0900 0900 0900 0900 0900 0900 5b5c 5d5e
-0000040: 5f60 6162 6364 6566 670b 0000 0000 0000
-0000050: 0000 0b00 0000 0000 0000 000b 0000 0000
-0000060: 0000 0000 0b00 0000 0000 0000 000b 0000
-0000070: 0000 0000 0000 0b00 0000 0000 0000 000b
-0000080: 0000 0000 0000 0000 0b00 0000 0000 0000
-0000090: 000b 0000 0000 0000 0000 0b00 0000 0000
-00000a0: 0000 000b 0000 0000 0000 0000 0b00 0000
-00000b0: 0000 0000 000b 0000 0000 0000 0000 0b00
-00000c0: 0000 0000 0000 0075 7677 7879 7a7d 0d00
-00000d0: 0000 000d 0000 0000 0d00 0000 000d 0000
-00000e0: 0000 0d00 0000 000d 0000 0000 0d00 0000
-00000f0: 000d 0000 0000 898a 8b8c 8d8e 910c 0000
-0000100: 0000 0000 0000 0c00 0000 0000 0000 000c
-0000110: 0000 0000 0000 0000 0c00 0000 0000 0000
-0000120: 000c 0000 0000 0000 0000 0c00 0000 0000
-0000130: 0000 000c 0000 0000 0000 0000 0c00 0000
-0000140: 0000 0000 0006
+0000010: 00d0 0040 4142 4344 4546 4748 494a 4b4c
+0000020: 0a00 0a00 0a00 0a00 0a00 0a00 0a00 0a00
+0000030: 0a00 0a00 0a00 0a00 0a00 0a00 5b5c 5d5e
+0000040: 5f60 6162 6364 6566 670b 000b 000b 000b
+0000050: 000b 000b 000b 000b 000b 000b 000b 000b
+0000060: 000b 000b 0075 7677 7879 7a7d 0d00 0000
+0000070: 000d 0000 0000 0d00 0000 000d 0000 0000
+0000080: 0d00 0000 000d 0000 0000 0d00 0000 000d
+0000090: 0000 0000 898a 8b8c 8d8e 910c 0000 0000
+00000a0: 0000 0000 0c00 0000 0000 0000 000c 0000
+00000b0: 0000 0000 0000 0c00 0000 0000 0000 000c
+00000c0: 0000 0000 0000 0000 0c00 0000 0000 0000
+00000d0: 000c 0000 0000 0000 0000 0c00 0000 0000
+00000e0: 0000 0006
;;; STDOUT ;;)
diff --git a/test/dump/block.txt b/test/dump/block.txt
index bddb3f79..1a2855df 100644
--- a/test/dump/block.txt
+++ b/test/dump/block.txt
@@ -38,12 +38,12 @@
000001d: 0000 ; func body size
000001f: 01 ; OPCODE_BLOCK
0000020: 01 ; num expressions
-0000021: 09 ; OPCODE_I8_CONST
-0000022: 01 ; u8 literal
+0000021: 0a ; OPCODE_I32_CONST
+0000022: 01 ; i32 literal
000001d: 0400 ; FIXUP func body size
0000023: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0102 0000 0001 0202
0000010: 0000 0005 0001 0300 0000 0001 0004 0001
-0000020: 0109 0106
+0000020: 010a 0106
;;; STDOUT ;;)
diff --git a/test/dump/br-block-named.txt b/test/dump/br-block-named.txt
index acf288fe..f5a04ab9 100644
--- a/test/dump/br-block-named.txt
+++ b/test/dump/br-block-named.txt
@@ -28,8 +28,8 @@
0000016: 01 ; num expressions
0000017: 01 ; OPCODE_BLOCK
0000018: 02 ; num expressions
-0000019: 09 ; OPCODE_I8_CONST
-000001a: 00 ; u8 literal
+0000019: 0a ; OPCODE_I32_CONST
+000001a: 00 ; i32 literal
000001b: 01 ; OPCODE_BLOCK
000001c: 02 ; num expressions
000001d: 06 ; OPCODE_BR
@@ -42,6 +42,6 @@
0000023: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0010 0001 0102 0101 0209 0001 0206 0000
+0000010: 0010 0001 0102 0101 020a 0001 0206 0000
0000020: 0604 0006
;;; STDOUT ;;)
diff --git a/test/dump/br-block.txt b/test/dump/br-block.txt
index 733869df..06579809 100644
--- a/test/dump/br-block.txt
+++ b/test/dump/br-block.txt
@@ -31,8 +31,8 @@
0000016: 01 ; num expressions
0000017: 01 ; OPCODE_BLOCK
0000018: 02 ; num expressions
-0000019: 09 ; OPCODE_I8_CONST
-000001a: 00 ; u8 literal
+0000019: 0a ; OPCODE_I32_CONST
+000001a: 00 ; i32 literal
000001b: 01 ; OPCODE_BLOCK
000001c: 05 ; num expressions
000001d: 06 ; OPCODE_BR
@@ -54,6 +54,6 @@
000002c: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0019 0001 0102 0101 0209 0001 0506 0000
+0000010: 0019 0001 0102 0101 020a 0001 0506 0000
0000020: 0600 0006 0100 0602 0006 0300 06
;;; STDOUT ;;)
diff --git a/test/dump/br-loop-inner-expr.txt b/test/dump/br-loop-inner-expr.txt
index 59b7bb2b..8fb5fbd3 100644
--- a/test/dump/br-loop-inner-expr.txt
+++ b/test/dump/br-loop-inner-expr.txt
@@ -24,28 +24,28 @@
0000013: 02 ; OPCODE_LOOP
0000014: 03 ; num expressions
0000015: 03 ; OPCODE_IF
-0000016: 09 ; OPCODE_I8_CONST
-0000017: 01 ; u8 literal
+0000016: 0a ; OPCODE_I32_CONST
+0000017: 01 ; i32 literal
0000018: 01 ; OPCODE_BLOCK
0000019: 01 ; num expressions
000001a: 06 ; OPCODE_BR
000001b: 01 ; break depth
000001c: 00 ; OPCODE_NOP
000001d: 03 ; OPCODE_IF
-000001e: 09 ; OPCODE_I8_CONST
-000001f: 03 ; u8 literal
+000001e: 0a ; OPCODE_I32_CONST
+000001f: 03 ; i32 literal
0000020: 01 ; OPCODE_BLOCK
0000021: 01 ; num expressions
0000022: 06 ; OPCODE_BR
0000023: 02 ; break depth
-0000024: 09 ; OPCODE_I8_CONST
-0000025: 04 ; u8 literal
-0000026: 09 ; OPCODE_I8_CONST
-0000027: 05 ; u8 literal
+0000024: 0a ; OPCODE_I32_CONST
+0000025: 04 ; i32 literal
+0000026: 0a ; OPCODE_I32_CONST
+0000027: 05 ; i32 literal
0000011: 1500 ; FIXUP func body size
0000028: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0001 0201 0000
-0000010: 0015 0002 0303 0901 0101 0601 0003 0903
-0000020: 0101 0602 0904 0905 06
+0000010: 0015 0002 0303 0a01 0101 0601 0003 0a03
+0000020: 0101 0602 0a04 0a05 06
;;; STDOUT ;;)
diff --git a/test/dump/br-loop-inner.txt b/test/dump/br-loop-inner.txt
index d0492903..40ffa8a8 100644
--- a/test/dump/br-loop-inner.txt
+++ b/test/dump/br-loop-inner.txt
@@ -23,16 +23,16 @@
0000013: 02 ; OPCODE_LOOP
0000014: 02 ; num expressions
0000015: 03 ; OPCODE_IF
-0000016: 09 ; OPCODE_I8_CONST
-0000017: 01 ; u8 literal
+0000016: 0a ; OPCODE_I32_CONST
+0000017: 01 ; i32 literal
0000018: 01 ; OPCODE_BLOCK
0000019: 01 ; num expressions
000001a: 06 ; OPCODE_BR
000001b: 02 ; break depth
000001c: 00 ; OPCODE_NOP
000001d: 03 ; OPCODE_IF
-000001e: 09 ; OPCODE_I8_CONST
-000001f: 02 ; u8 literal
+000001e: 0a ; OPCODE_I32_CONST
+000001f: 02 ; i32 literal
0000020: 01 ; OPCODE_BLOCK
0000021: 01 ; num expressions
0000022: 06 ; OPCODE_BR
@@ -42,6 +42,6 @@
0000025: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0012 0002 0203 0901 0101 0602 0003 0902
+0000010: 0012 0002 0203 0a01 0101 0602 0003 0a02
0000020: 0101 0601 0006
;;; STDOUT ;;)
diff --git a/test/dump/br-loop.txt b/test/dump/br-loop.txt
index 6b0e0976..4bb4b09a 100644
--- a/test/dump/br-loop.txt
+++ b/test/dump/br-loop.txt
@@ -21,8 +21,8 @@
0000013: 02 ; OPCODE_LOOP
0000014: 01 ; num expressions
0000015: 03 ; OPCODE_IF
-0000016: 09 ; OPCODE_I8_CONST
-0000017: 01 ; u8 literal
+0000016: 0a ; OPCODE_I32_CONST
+0000017: 01 ; i32 literal
0000018: 01 ; OPCODE_BLOCK
0000019: 01 ; num expressions
000001a: 06 ; OPCODE_BR
@@ -32,5 +32,5 @@
000001d: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 000a 0002 0103 0901 0101 0601 0006
+0000010: 000a 0002 0103 0a01 0101 0601 0006
;;; STDOUT ;;)
diff --git a/test/dump/brif-loop.txt b/test/dump/brif-loop.txt
index 2ccd20d1..2d523312 100644
--- a/test/dump/brif-loop.txt
+++ b/test/dump/brif-loop.txt
@@ -22,11 +22,11 @@
0000015: 07 ; OPCODE_BR_IF
0000016: 00 ; break depth
0000017: 00 ; OPCODE_NOP
-0000018: 09 ; OPCODE_I8_CONST
-0000019: 00 ; u8 literal
+0000018: 0a ; OPCODE_I32_CONST
+0000019: 00 ; i32 literal
0000011: 0700 ; FIXUP func body size
000001a: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0007 0002 0107 0000 0900 06
+0000010: 0007 0002 0107 0000 0a00 06
;;; STDOUT ;;)
diff --git a/test/dump/brif.txt b/test/dump/brif.txt
index 7174a04d..0bf71b2c 100644
--- a/test/dump/brif.txt
+++ b/test/dump/brif.txt
@@ -22,11 +22,11 @@
0000015: 07 ; OPCODE_BR_IF
0000016: 00 ; break depth
0000017: 00 ; OPCODE_NOP
-0000018: 09 ; OPCODE_I8_CONST
-0000019: 01 ; u8 literal
+0000018: 0a ; OPCODE_I32_CONST
+0000019: 01 ; i32 literal
0000011: 0700 ; FIXUP func body size
000001a: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0007 0001 0107 0000 0901 06
+0000010: 0007 0001 0107 0000 0a01 06
;;; STDOUT ;;)
diff --git a/test/dump/call.txt b/test/dump/call.txt
index f9a1c210..ac20bb79 100644
--- a/test/dump/call.txt
+++ b/test/dump/call.txt
@@ -19,11 +19,11 @@
0000012: 0000 ; func body size
0000014: 12 ; OPCODE_CALL_FUNCTION
0000015: 00 ; func index
-0000016: 09 ; OPCODE_I8_CONST
-0000017: 01 ; u8 literal
+0000016: 0a ; OPCODE_I32_CONST
+0000017: 01 ; i32 literal
0000012: 0400 ; FIXUP func body size
0000018: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0100 0102 0100
-0000010: 0000 0400 1200 0901 06
+0000010: 0000 0400 1200 0a01 06
;;; STDOUT ;;)
diff --git a/test/dump/callimport.txt b/test/dump/callimport.txt
index 6467c5c5..de957b77 100644
--- a/test/dump/callimport.txt
+++ b/test/dump/callimport.txt
@@ -36,8 +36,8 @@
0000021: 0000 ; func body size
0000023: 1f ; OPCODE_CALL_IMPORT
0000024: 00 ; import index
-0000025: 09 ; OPCODE_I8_CONST
-0000026: 01 ; u8 literal
+0000025: 0a ; OPCODE_I32_CONST
+0000026: 01 ; i32 literal
0000027: 0d ; OPCODE_F32_CONST
0000028: 0000 0040 ; f32 literal
000002c: 12 ; OPCODE_CALL_FUNCTION
@@ -54,6 +54,6 @@
;; dump
0000000: 0061 736d 0a00 0000 0102 0201 0103 0001
0000010: 0801 0000 2f00 0000 3300 0000 0201 0001
-0000020: 000b 001f 0009 010d 0000 0040 1200 0666
+0000020: 000b 001f 000a 010d 0000 0040 1200 0666
0000030: 6f6f 0062 6172 00
;;; STDOUT ;;)
diff --git a/test/dump/callindirect-after-import.txt b/test/dump/callindirect-after-import.txt
index cee55625..b53c5463 100644
--- a/test/dump/callindirect-after-import.txt
+++ b/test/dump/callindirect-after-import.txt
@@ -52,8 +52,8 @@
0000028: 0000 ; func body size
000002a: 13 ; OPCODE_CALL_INDIRECT
000002b: 00 ; signature index
-000002c: 09 ; OPCODE_I8_CONST
-000002d: 00 ; u8 literal
+000002c: 0a ; OPCODE_I32_CONST
+000002d: 00 ; i32 literal
000002e: 0d ; OPCODE_F32_CONST
000002f: 0000 803f ; f32 literal
0000028: 0900 ; FIXUP func body size
@@ -71,6 +71,6 @@
;; dump
0000000: 0061 736d 0a00 0000 0103 0100 0300 0100
0000010: 0008 0101 0038 0000 003c 0000 0002 0200
-0000020: 0000 0100 0000 0200 0900 1300 0900 0d00
+0000020: 0000 0100 0000 0200 0900 1300 0a00 0d00
0000030: 0080 3f05 0100 0006 666f 6f00 6261 7200
;;; STDOUT ;;)
diff --git a/test/dump/callindirect.txt b/test/dump/callindirect.txt
index 25355182..32c7e0fe 100644
--- a/test/dump/callindirect.txt
+++ b/test/dump/callindirect.txt
@@ -21,10 +21,10 @@
0000012: 0000 ; func body size
0000014: 13 ; OPCODE_CALL_INDIRECT
0000015: 00 ; signature index
-0000016: 09 ; OPCODE_I8_CONST
-0000017: 00 ; u8 literal
-0000018: 09 ; OPCODE_I8_CONST
-0000019: 00 ; u8 literal
+0000016: 0a ; OPCODE_I32_CONST
+0000017: 00 ; i32 literal
+0000018: 0a ; OPCODE_I32_CONST
+0000019: 00 ; i32 literal
0000012: 0600 ; FIXUP func body size
000001a: 05 ; WASM_BINARY_SECTION_FUNCTION_TABLE
000001b: 01 ; num function table entries
@@ -32,5 +32,5 @@
000001e: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0100 0102 0100
-0000010: 0000 0600 1300 0900 0900 0501 0000 06
+0000010: 0000 0600 1300 0a00 0a00 0501 0000 06
;;; STDOUT ;;)
diff --git a/test/dump/cast.txt b/test/dump/cast.txt
index 400d3fc7..a905f5e5 100644
--- a/test/dump/cast.txt
+++ b/test/dump/cast.txt
@@ -21,22 +21,21 @@
000000f: 0000 ; func signature index
0000011: 0000 ; func body size
0000013: ad ; OPCODE_F32_REINTERPRET_I32
-0000014: 09 ; OPCODE_I8_CONST
-0000015: 00 ; u8 literal
+0000014: 0a ; OPCODE_I32_CONST
+0000015: 00 ; i32 literal
0000016: b4 ; OPCODE_I32_REINTERPRET_F32
0000017: 0d ; OPCODE_F32_CONST
0000018: 0000 0000 ; f32 literal
000001c: b3 ; OPCODE_F64_REINTERPRET_I64
000001d: 0b ; OPCODE_I64_CONST
-000001e: 0000 0000 0000 0000 ; u64 literal
-0000026: b5 ; OPCODE_I64_REINTERPRET_F64
-0000027: 0c ; OPCODE_F64_CONST
-0000028: 0000 0000 0000 0000 ; f64 literal
-0000011: 1d00 ; FIXUP func body size
-0000030: 06 ; WASM_BINARY_SECTION_END
+000001e: 00 ; i64 literal
+000001f: b5 ; OPCODE_I64_REINTERPRET_F64
+0000020: 0c ; OPCODE_F64_CONST
+0000021: 0000 0000 0000 0000 ; f64 literal
+0000011: 1600 ; FIXUP func body size
+0000029: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 001d 00ad 0900 b40d 0000 0000 b30b 0000
-0000020: 0000 0000 0000 b50c 0000 0000 0000 0000
-0000030: 06
+0000010: 0016 00ad 0a00 b40d 0000 0000 b30b 00b5
+0000020: 0c00 0000 0000 0000 0006
;;; STDOUT ;;)
diff --git a/test/dump/compare.txt b/test/dump/compare.txt
index c678a93d..578e2d42 100644
--- a/test/dump/compare.txt
+++ b/test/dump/compare.txt
@@ -73,166 +73,157 @@
000001a: 55 ; OPCODE_I32_GT_U
000001b: 54 ; OPCODE_I32_GE_S
000001c: 56 ; OPCODE_I32_GE_U
-000001d: 09 ; OPCODE_I8_CONST
-000001e: 00 ; u8 literal
-000001f: 09 ; OPCODE_I8_CONST
-0000020: 00 ; u8 literal
-0000021: 09 ; OPCODE_I8_CONST
-0000022: 00 ; u8 literal
-0000023: 09 ; OPCODE_I8_CONST
-0000024: 00 ; u8 literal
-0000025: 09 ; OPCODE_I8_CONST
-0000026: 00 ; u8 literal
-0000027: 09 ; OPCODE_I8_CONST
-0000028: 00 ; u8 literal
-0000029: 09 ; OPCODE_I8_CONST
-000002a: 00 ; u8 literal
-000002b: 09 ; OPCODE_I8_CONST
-000002c: 00 ; u8 literal
-000002d: 09 ; OPCODE_I8_CONST
-000002e: 00 ; u8 literal
-000002f: 09 ; OPCODE_I8_CONST
-0000030: 00 ; u8 literal
-0000031: 09 ; OPCODE_I8_CONST
-0000032: 00 ; u8 literal
+000001d: 0a ; OPCODE_I32_CONST
+000001e: 00 ; i32 literal
+000001f: 0a ; OPCODE_I32_CONST
+0000020: 00 ; i32 literal
+0000021: 0a ; OPCODE_I32_CONST
+0000022: 00 ; i32 literal
+0000023: 0a ; OPCODE_I32_CONST
+0000024: 00 ; i32 literal
+0000025: 0a ; OPCODE_I32_CONST
+0000026: 00 ; i32 literal
+0000027: 0a ; OPCODE_I32_CONST
+0000028: 00 ; i32 literal
+0000029: 0a ; OPCODE_I32_CONST
+000002a: 00 ; i32 literal
+000002b: 0a ; OPCODE_I32_CONST
+000002c: 00 ; i32 literal
+000002d: 0a ; OPCODE_I32_CONST
+000002e: 00 ; i32 literal
+000002f: 0a ; OPCODE_I32_CONST
+0000030: 00 ; i32 literal
+0000031: 0a ; OPCODE_I32_CONST
+0000032: 00 ; i32 literal
0000033: 68 ; OPCODE_I64_EQ
0000034: 0b ; OPCODE_I64_CONST
-0000035: 0000 0000 0000 0000 ; u64 literal
-000003d: 0b ; OPCODE_I64_CONST
-000003e: 0000 0000 0000 0000 ; u64 literal
-0000046: 69 ; OPCODE_I64_NE
-0000047: 0b ; OPCODE_I64_CONST
-0000048: 0000 0000 0000 0000 ; u64 literal
-0000050: 0b ; OPCODE_I64_CONST
-0000051: 0000 0000 0000 0000 ; u64 literal
-0000059: 6a ; OPCODE_I64_LT_S
-000005a: 0b ; OPCODE_I64_CONST
-000005b: 0000 0000 0000 0000 ; u64 literal
+0000035: 00 ; i64 literal
+0000036: 0b ; OPCODE_I64_CONST
+0000037: 00 ; i64 literal
+0000038: 69 ; OPCODE_I64_NE
+0000039: 0b ; OPCODE_I64_CONST
+000003a: 00 ; i64 literal
+000003b: 0b ; OPCODE_I64_CONST
+000003c: 00 ; i64 literal
+000003d: 6a ; OPCODE_I64_LT_S
+000003e: 0b ; OPCODE_I64_CONST
+000003f: 00 ; i64 literal
+0000040: 0b ; OPCODE_I64_CONST
+0000041: 00 ; i64 literal
+0000042: 6c ; OPCODE_I64_LT_U
+0000043: 0b ; OPCODE_I64_CONST
+0000044: 00 ; i64 literal
+0000045: 0b ; OPCODE_I64_CONST
+0000046: 00 ; i64 literal
+0000047: 6b ; OPCODE_I64_LE_S
+0000048: 0b ; OPCODE_I64_CONST
+0000049: 00 ; i64 literal
+000004a: 0b ; OPCODE_I64_CONST
+000004b: 00 ; i64 literal
+000004c: 6d ; OPCODE_I64_LE_U
+000004d: 0b ; OPCODE_I64_CONST
+000004e: 00 ; i64 literal
+000004f: 0b ; OPCODE_I64_CONST
+0000050: 00 ; i64 literal
+0000051: 6e ; OPCODE_I64_GT_S
+0000052: 0b ; OPCODE_I64_CONST
+0000053: 00 ; i64 literal
+0000054: 0b ; OPCODE_I64_CONST
+0000055: 00 ; i64 literal
+0000056: 70 ; OPCODE_I64_GT_U
+0000057: 0b ; OPCODE_I64_CONST
+0000058: 00 ; i64 literal
+0000059: 0b ; OPCODE_I64_CONST
+000005a: 00 ; i64 literal
+000005b: 6f ; OPCODE_I64_GE_S
+000005c: 0b ; OPCODE_I64_CONST
+000005d: 00 ; i64 literal
+000005e: 0b ; OPCODE_I64_CONST
+000005f: 00 ; i64 literal
+0000060: 71 ; OPCODE_I64_GE_U
+0000061: 0b ; OPCODE_I64_CONST
+0000062: 00 ; i64 literal
0000063: 0b ; OPCODE_I64_CONST
-0000064: 0000 0000 0000 0000 ; u64 literal
-000006c: 6c ; OPCODE_I64_LT_U
-000006d: 0b ; OPCODE_I64_CONST
-000006e: 0000 0000 0000 0000 ; u64 literal
-0000076: 0b ; OPCODE_I64_CONST
-0000077: 0000 0000 0000 0000 ; u64 literal
-000007f: 6b ; OPCODE_I64_LE_S
-0000080: 0b ; OPCODE_I64_CONST
-0000081: 0000 0000 0000 0000 ; u64 literal
-0000089: 0b ; OPCODE_I64_CONST
-000008a: 0000 0000 0000 0000 ; u64 literal
-0000092: 6d ; OPCODE_I64_LE_U
-0000093: 0b ; OPCODE_I64_CONST
-0000094: 0000 0000 0000 0000 ; u64 literal
-000009c: 0b ; OPCODE_I64_CONST
-000009d: 0000 0000 0000 0000 ; u64 literal
-00000a5: 6e ; OPCODE_I64_GT_S
-00000a6: 0b ; OPCODE_I64_CONST
-00000a7: 0000 0000 0000 0000 ; u64 literal
-00000af: 0b ; OPCODE_I64_CONST
-00000b0: 0000 0000 0000 0000 ; u64 literal
-00000b8: 70 ; OPCODE_I64_GT_U
-00000b9: 0b ; OPCODE_I64_CONST
-00000ba: 0000 0000 0000 0000 ; u64 literal
-00000c2: 0b ; OPCODE_I64_CONST
-00000c3: 0000 0000 0000 0000 ; u64 literal
-00000cb: 6f ; OPCODE_I64_GE_S
-00000cc: 0b ; OPCODE_I64_CONST
-00000cd: 0000 0000 0000 0000 ; u64 literal
-00000d5: 0b ; OPCODE_I64_CONST
-00000d6: 0000 0000 0000 0000 ; u64 literal
-00000de: 71 ; OPCODE_I64_GE_U
-00000df: 0b ; OPCODE_I64_CONST
-00000e0: 0000 0000 0000 0000 ; u64 literal
-00000e8: 0b ; OPCODE_I64_CONST
-00000e9: 0000 0000 0000 0000 ; u64 literal
-00000f1: 83 ; OPCODE_F32_EQ
-00000f2: 0d ; OPCODE_F32_CONST
-00000f3: 0000 0000 ; f32 literal
-00000f7: 0d ; OPCODE_F32_CONST
-00000f8: 0000 0000 ; f32 literal
-00000fc: 84 ; OPCODE_F32_NE
-00000fd: 0d ; OPCODE_F32_CONST
-00000fe: 0000 0000 ; f32 literal
-0000102: 0d ; OPCODE_F32_CONST
-0000103: 0000 0000 ; f32 literal
-0000107: 85 ; OPCODE_F32_LT
-0000108: 0d ; OPCODE_F32_CONST
-0000109: 0000 0000 ; f32 literal
-000010d: 0d ; OPCODE_F32_CONST
-000010e: 0000 0000 ; f32 literal
-0000112: 86 ; OPCODE_F32_LE
-0000113: 0d ; OPCODE_F32_CONST
-0000114: 0000 0000 ; f32 literal
-0000118: 0d ; OPCODE_F32_CONST
-0000119: 0000 0000 ; f32 literal
-000011d: 87 ; OPCODE_F32_GT
-000011e: 0d ; OPCODE_F32_CONST
-000011f: 0000 0000 ; f32 literal
-0000123: 0d ; OPCODE_F32_CONST
-0000124: 0000 0000 ; f32 literal
-0000128: 88 ; OPCODE_F32_GE
-0000129: 0d ; OPCODE_F32_CONST
-000012a: 0000 0000 ; f32 literal
-000012e: 0d ; OPCODE_F32_CONST
-000012f: 0000 0000 ; f32 literal
-0000133: 97 ; OPCODE_F64_EQ
-0000134: 0c ; OPCODE_F64_CONST
-0000135: 0000 0000 0000 0000 ; f64 literal
-000013d: 0c ; OPCODE_F64_CONST
-000013e: 0000 0000 0000 0000 ; f64 literal
-0000146: 98 ; OPCODE_F64_NE
-0000147: 0c ; OPCODE_F64_CONST
-0000148: 0000 0000 0000 0000 ; f64 literal
-0000150: 0c ; OPCODE_F64_CONST
-0000151: 0000 0000 0000 0000 ; f64 literal
-0000159: 99 ; OPCODE_F64_LT
-000015a: 0c ; OPCODE_F64_CONST
-000015b: 0000 0000 0000 0000 ; f64 literal
-0000163: 0c ; OPCODE_F64_CONST
-0000164: 0000 0000 0000 0000 ; f64 literal
-000016c: 9a ; OPCODE_F64_LE
-000016d: 0c ; OPCODE_F64_CONST
-000016e: 0000 0000 0000 0000 ; f64 literal
-0000176: 0c ; OPCODE_F64_CONST
-0000177: 0000 0000 0000 0000 ; f64 literal
-000017f: 9b ; OPCODE_F64_GT
-0000180: 0c ; OPCODE_F64_CONST
-0000181: 0000 0000 0000 0000 ; f64 literal
-0000189: 0c ; OPCODE_F64_CONST
-000018a: 0000 0000 0000 0000 ; f64 literal
-0000192: 9c ; OPCODE_F64_GE
-0000193: 0c ; OPCODE_F64_CONST
-0000194: 0000 0000 0000 0000 ; f64 literal
-000019c: 0c ; OPCODE_F64_CONST
-000019d: 0000 0000 0000 0000 ; f64 literal
-0000011: 9201 ; FIXUP func body size
-00001a5: 06 ; WASM_BINARY_SECTION_END
+0000064: 00 ; i64 literal
+0000065: 83 ; OPCODE_F32_EQ
+0000066: 0d ; OPCODE_F32_CONST
+0000067: 0000 0000 ; f32 literal
+000006b: 0d ; OPCODE_F32_CONST
+000006c: 0000 0000 ; f32 literal
+0000070: 84 ; OPCODE_F32_NE
+0000071: 0d ; OPCODE_F32_CONST
+0000072: 0000 0000 ; f32 literal
+0000076: 0d ; OPCODE_F32_CONST
+0000077: 0000 0000 ; f32 literal
+000007b: 85 ; OPCODE_F32_LT
+000007c: 0d ; OPCODE_F32_CONST
+000007d: 0000 0000 ; f32 literal
+0000081: 0d ; OPCODE_F32_CONST
+0000082: 0000 0000 ; f32 literal
+0000086: 86 ; OPCODE_F32_LE
+0000087: 0d ; OPCODE_F32_CONST
+0000088: 0000 0000 ; f32 literal
+000008c: 0d ; OPCODE_F32_CONST
+000008d: 0000 0000 ; f32 literal
+0000091: 87 ; OPCODE_F32_GT
+0000092: 0d ; OPCODE_F32_CONST
+0000093: 0000 0000 ; f32 literal
+0000097: 0d ; OPCODE_F32_CONST
+0000098: 0000 0000 ; f32 literal
+000009c: 88 ; OPCODE_F32_GE
+000009d: 0d ; OPCODE_F32_CONST
+000009e: 0000 0000 ; f32 literal
+00000a2: 0d ; OPCODE_F32_CONST
+00000a3: 0000 0000 ; f32 literal
+00000a7: 97 ; OPCODE_F64_EQ
+00000a8: 0c ; OPCODE_F64_CONST
+00000a9: 0000 0000 0000 0000 ; f64 literal
+00000b1: 0c ; OPCODE_F64_CONST
+00000b2: 0000 0000 0000 0000 ; f64 literal
+00000ba: 98 ; OPCODE_F64_NE
+00000bb: 0c ; OPCODE_F64_CONST
+00000bc: 0000 0000 0000 0000 ; f64 literal
+00000c4: 0c ; OPCODE_F64_CONST
+00000c5: 0000 0000 0000 0000 ; f64 literal
+00000cd: 99 ; OPCODE_F64_LT
+00000ce: 0c ; OPCODE_F64_CONST
+00000cf: 0000 0000 0000 0000 ; f64 literal
+00000d7: 0c ; OPCODE_F64_CONST
+00000d8: 0000 0000 0000 0000 ; f64 literal
+00000e0: 9a ; OPCODE_F64_LE
+00000e1: 0c ; OPCODE_F64_CONST
+00000e2: 0000 0000 0000 0000 ; f64 literal
+00000ea: 0c ; OPCODE_F64_CONST
+00000eb: 0000 0000 0000 0000 ; f64 literal
+00000f3: 9b ; OPCODE_F64_GT
+00000f4: 0c ; OPCODE_F64_CONST
+00000f5: 0000 0000 0000 0000 ; f64 literal
+00000fd: 0c ; OPCODE_F64_CONST
+00000fe: 0000 0000 0000 0000 ; f64 literal
+0000106: 9c ; OPCODE_F64_GE
+0000107: 0c ; OPCODE_F64_CONST
+0000108: 0000 0000 0000 0000 ; f64 literal
+0000110: 0c ; OPCODE_F64_CONST
+0000111: 0000 0000 0000 0000 ; f64 literal
+0000011: 0601 ; FIXUP func body size
+0000119: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0092 014d 4e4f 5150 5253 5554 5609 0009
-0000020: 0009 0009 0009 0009 0009 0009 0009 0009
-0000030: 0009 0068 0b00 0000 0000 0000 000b 0000
-0000040: 0000 0000 0000 690b 0000 0000 0000 0000
-0000050: 0b00 0000 0000 0000 006a 0b00 0000 0000
-0000060: 0000 000b 0000 0000 0000 0000 6c0b 0000
-0000070: 0000 0000 0000 0b00 0000 0000 0000 006b
-0000080: 0b00 0000 0000 0000 000b 0000 0000 0000
-0000090: 0000 6d0b 0000 0000 0000 0000 0b00 0000
-00000a0: 0000 0000 006e 0b00 0000 0000 0000 000b
-00000b0: 0000 0000 0000 0000 700b 0000 0000 0000
-00000c0: 0000 0b00 0000 0000 0000 006f 0b00 0000
-00000d0: 0000 0000 000b 0000 0000 0000 0000 710b
-00000e0: 0000 0000 0000 0000 0b00 0000 0000 0000
-00000f0: 0083 0d00 0000 000d 0000 0000 840d 0000
-0000100: 0000 0d00 0000 0085 0d00 0000 000d 0000
-0000110: 0000 860d 0000 0000 0d00 0000 0087 0d00
-0000120: 0000 000d 0000 0000 880d 0000 0000 0d00
-0000130: 0000 0097 0c00 0000 0000 0000 000c 0000
-0000140: 0000 0000 0000 980c 0000 0000 0000 0000
-0000150: 0c00 0000 0000 0000 0099 0c00 0000 0000
-0000160: 0000 000c 0000 0000 0000 0000 9a0c 0000
-0000170: 0000 0000 0000 0c00 0000 0000 0000 009b
-0000180: 0c00 0000 0000 0000 000c 0000 0000 0000
-0000190: 0000 9c0c 0000 0000 0000 0000 0c00 0000
-00001a0: 0000 0000 0006
+0000010: 0006 014d 4e4f 5150 5253 5554 560a 000a
+0000020: 000a 000a 000a 000a 000a 000a 000a 000a
+0000030: 000a 0068 0b00 0b00 690b 000b 006a 0b00
+0000040: 0b00 6c0b 000b 006b 0b00 0b00 6d0b 000b
+0000050: 006e 0b00 0b00 700b 000b 006f 0b00 0b00
+0000060: 710b 000b 0083 0d00 0000 000d 0000 0000
+0000070: 840d 0000 0000 0d00 0000 0085 0d00 0000
+0000080: 000d 0000 0000 860d 0000 0000 0d00 0000
+0000090: 0087 0d00 0000 000d 0000 0000 880d 0000
+00000a0: 0000 0d00 0000 0097 0c00 0000 0000 0000
+00000b0: 000c 0000 0000 0000 0000 980c 0000 0000
+00000c0: 0000 0000 0c00 0000 0000 0000 0099 0c00
+00000d0: 0000 0000 0000 000c 0000 0000 0000 0000
+00000e0: 9a0c 0000 0000 0000 0000 0c00 0000 0000
+00000f0: 0000 009b 0c00 0000 0000 0000 000c 0000
+0000100: 0000 0000 0000 9c0c 0000 0000 0000 0000
+0000110: 0c00 0000 0000 0000 0006
;;; STDOUT ;;)
diff --git a/test/dump/const.txt b/test/dump/const.txt
index 969a90af..15f59d43 100644
--- a/test/dump/const.txt
+++ b/test/dump/const.txt
@@ -56,101 +56,100 @@
000000e: 00 ; func flags
000000f: 0000 ; func signature index
0000011: 0000 ; func body size
-0000013: 09 ; OPCODE_I8_CONST
-0000014: 00 ; u8 literal
+0000013: 0a ; OPCODE_I32_CONST
+0000014: 00 ; i32 literal
0000015: 0a ; OPCODE_I32_CONST
-0000016: 0000 0080 ; u32 literal
-000001a: 09 ; OPCODE_I8_CONST
-000001b: ff ; u8 literal
-000001c: 0a ; OPCODE_I32_CONST
-000001d: 0000 0080 ; u32 literal
-0000021: 09 ; OPCODE_I8_CONST
-0000022: ff ; u8 literal
-0000023: 0b ; OPCODE_I64_CONST
-0000024: 0000 0000 0000 0000 ; u64 literal
-000002c: 0b ; OPCODE_I64_CONST
-000002d: 0000 0000 0000 0080 ; u64 literal
-0000035: 0b ; OPCODE_I64_CONST
-0000036: ffff ffff ffff ffff ; u64 literal
-000003e: 0b ; OPCODE_I64_CONST
-000003f: 0000 0000 0000 0080 ; u64 literal
-0000047: 0b ; OPCODE_I64_CONST
-0000048: ffff ffff ffff ffff ; u64 literal
+0000016: 8080 8080 78 ; i32 literal
+000001b: 0a ; OPCODE_I32_CONST
+000001c: 7f ; i32 literal
+000001d: 0a ; OPCODE_I32_CONST
+000001e: 8080 8080 78 ; i32 literal
+0000023: 0a ; OPCODE_I32_CONST
+0000024: 7f ; i32 literal
+0000025: 0b ; OPCODE_I64_CONST
+0000026: 00 ; i64 literal
+0000027: 0b ; OPCODE_I64_CONST
+0000028: 8080 8080 8080 8080 807f ; i64 literal
+0000032: 0b ; OPCODE_I64_CONST
+0000033: 7f ; i64 literal
+0000034: 0b ; OPCODE_I64_CONST
+0000035: 8080 8080 8080 8080 807f ; i64 literal
+000003f: 0b ; OPCODE_I64_CONST
+0000040: 7f ; i64 literal
+0000041: 0d ; OPCODE_F32_CONST
+0000042: 0000 0000 ; f32 literal
+0000046: 0d ; OPCODE_F32_CONST
+0000047: 1668 a965 ; f32 literal
+000004b: 0d ; OPCODE_F32_CONST
+000004c: 4020 4f37 ; f32 literal
0000050: 0d ; OPCODE_F32_CONST
-0000051: 0000 0000 ; f32 literal
+0000051: 0000 c07f ; f32 literal
0000055: 0d ; OPCODE_F32_CONST
-0000056: 1668 a965 ; f32 literal
+0000056: 0000 c0ff ; f32 literal
000005a: 0d ; OPCODE_F32_CONST
-000005b: 4020 4f37 ; f32 literal
+000005b: 0000 c07f ; f32 literal
000005f: 0d ; OPCODE_F32_CONST
-0000060: 0000 c07f ; f32 literal
+0000060: bc0a 807f ; f32 literal
0000064: 0d ; OPCODE_F32_CONST
-0000065: 0000 c0ff ; f32 literal
+0000065: bc0a 80ff ; f32 literal
0000069: 0d ; OPCODE_F32_CONST
-000006a: 0000 c07f ; f32 literal
+000006a: bc0a 807f ; f32 literal
000006e: 0d ; OPCODE_F32_CONST
-000006f: bc0a 807f ; f32 literal
+000006f: 0000 807f ; f32 literal
0000073: 0d ; OPCODE_F32_CONST
-0000074: bc0a 80ff ; f32 literal
+0000074: 0000 80ff ; f32 literal
0000078: 0d ; OPCODE_F32_CONST
-0000079: bc0a 807f ; f32 literal
+0000079: 0000 807f ; f32 literal
000007d: 0d ; OPCODE_F32_CONST
-000007e: 0000 807f ; f32 literal
+000007e: 0000 00bf ; f32 literal
0000082: 0d ; OPCODE_F32_CONST
-0000083: 0000 80ff ; f32 literal
-0000087: 0d ; OPCODE_F32_CONST
-0000088: 0000 807f ; f32 literal
-000008c: 0d ; OPCODE_F32_CONST
-000008d: 0000 00bf ; f32 literal
-0000091: 0d ; OPCODE_F32_CONST
-0000092: db0f c940 ; f32 literal
-0000096: 0c ; OPCODE_F64_CONST
-0000097: 0000 0000 0000 0000 ; f64 literal
-000009f: 0c ; OPCODE_F64_CONST
-00000a0: b856 0e3c dd9a efbf ; f64 literal
-00000a8: 0c ; OPCODE_F64_CONST
-00000a9: 182d 4454 fb21 1940 ; f64 literal
-00000b1: 0c ; OPCODE_F64_CONST
-00000b2: 0000 0000 0000 f87f ; f64 literal
-00000ba: 0c ; OPCODE_F64_CONST
-00000bb: 0000 0000 0000 f8ff ; f64 literal
-00000c3: 0c ; OPCODE_F64_CONST
-00000c4: 0000 0000 0000 f87f ; f64 literal
-00000cc: 0c ; OPCODE_F64_CONST
-00000cd: bc0a 0000 0000 f07f ; f64 literal
-00000d5: 0c ; OPCODE_F64_CONST
-00000d6: bc0a 0000 0000 f0ff ; f64 literal
-00000de: 0c ; OPCODE_F64_CONST
-00000df: bc0a 0000 0000 f07f ; f64 literal
-00000e7: 0c ; OPCODE_F64_CONST
-00000e8: 0000 0000 0000 f07f ; f64 literal
-00000f0: 0c ; OPCODE_F64_CONST
-00000f1: 0000 0000 0000 f0ff ; f64 literal
-00000f9: 0c ; OPCODE_F64_CONST
-00000fa: 0000 0000 0000 f07f ; f64 literal
-0000102: 0c ; OPCODE_F64_CONST
-0000103: 0000 0000 0000 e0bf ; f64 literal
-000010b: 0c ; OPCODE_F64_CONST
-000010c: 182d 4454 fb21 1940 ; f64 literal
-0000011: 0101 ; FIXUP func body size
-0000114: 06 ; WASM_BINARY_SECTION_END
+0000083: db0f c940 ; f32 literal
+0000087: 0c ; OPCODE_F64_CONST
+0000088: 0000 0000 0000 0000 ; f64 literal
+0000090: 0c ; OPCODE_F64_CONST
+0000091: b856 0e3c dd9a efbf ; f64 literal
+0000099: 0c ; OPCODE_F64_CONST
+000009a: 182d 4454 fb21 1940 ; f64 literal
+00000a2: 0c ; OPCODE_F64_CONST
+00000a3: 0000 0000 0000 f87f ; f64 literal
+00000ab: 0c ; OPCODE_F64_CONST
+00000ac: 0000 0000 0000 f8ff ; f64 literal
+00000b4: 0c ; OPCODE_F64_CONST
+00000b5: 0000 0000 0000 f87f ; f64 literal
+00000bd: 0c ; OPCODE_F64_CONST
+00000be: bc0a 0000 0000 f07f ; f64 literal
+00000c6: 0c ; OPCODE_F64_CONST
+00000c7: bc0a 0000 0000 f0ff ; f64 literal
+00000cf: 0c ; OPCODE_F64_CONST
+00000d0: bc0a 0000 0000 f07f ; f64 literal
+00000d8: 0c ; OPCODE_F64_CONST
+00000d9: 0000 0000 0000 f07f ; f64 literal
+00000e1: 0c ; OPCODE_F64_CONST
+00000e2: 0000 0000 0000 f0ff ; f64 literal
+00000ea: 0c ; OPCODE_F64_CONST
+00000eb: 0000 0000 0000 f07f ; f64 literal
+00000f3: 0c ; OPCODE_F64_CONST
+00000f4: 0000 0000 0000 e0bf ; f64 literal
+00000fc: 0c ; OPCODE_F64_CONST
+00000fd: 182d 4454 fb21 1940 ; f64 literal
+0000011: f200 ; FIXUP func body size
+0000105: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0001 0109 000a 0000 0080 09ff 0a00 0000
-0000020: 8009 ff0b 0000 0000 0000 0000 0b00 0000
-0000030: 0000 0000 800b ffff ffff ffff ffff 0b00
-0000040: 0000 0000 0000 800b ffff ffff ffff ffff
-0000050: 0d00 0000 000d 1668 a965 0d40 204f 370d
-0000060: 0000 c07f 0d00 00c0 ff0d 0000 c07f 0dbc
-0000070: 0a80 7f0d bc0a 80ff 0dbc 0a80 7f0d 0000
-0000080: 807f 0d00 0080 ff0d 0000 807f 0d00 0000
-0000090: bf0d db0f c940 0c00 0000 0000 0000 000c
-00000a0: b856 0e3c dd9a efbf 0c18 2d44 54fb 2119
-00000b0: 400c 0000 0000 0000 f87f 0c00 0000 0000
-00000c0: 00f8 ff0c 0000 0000 0000 f87f 0cbc 0a00
-00000d0: 0000 00f0 7f0c bc0a 0000 0000 f0ff 0cbc
-00000e0: 0a00 0000 00f0 7f0c 0000 0000 0000 f07f
-00000f0: 0c00 0000 0000 00f0 ff0c 0000 0000 0000
-0000100: f07f 0c00 0000 0000 00e0 bf0c 182d 4454
-0000110: fb21 1940 06
+0000010: 00f2 000a 000a 8080 8080 780a 7f0a 8080
+0000020: 8080 780a 7f0b 000b 8080 8080 8080 8080
+0000030: 807f 0b7f 0b80 8080 8080 8080 8080 7f0b
+0000040: 7f0d 0000 0000 0d16 68a9 650d 4020 4f37
+0000050: 0d00 00c0 7f0d 0000 c0ff 0d00 00c0 7f0d
+0000060: bc0a 807f 0dbc 0a80 ff0d bc0a 807f 0d00
+0000070: 0080 7f0d 0000 80ff 0d00 0080 7f0d 0000
+0000080: 00bf 0ddb 0fc9 400c 0000 0000 0000 0000
+0000090: 0cb8 560e 3cdd 9aef bf0c 182d 4454 fb21
+00000a0: 1940 0c00 0000 0000 00f8 7f0c 0000 0000
+00000b0: 0000 f8ff 0c00 0000 0000 00f8 7f0c bc0a
+00000c0: 0000 0000 f07f 0cbc 0a00 0000 00f0 ff0c
+00000d0: bc0a 0000 0000 f07f 0c00 0000 0000 00f0
+00000e0: 7f0c 0000 0000 0000 f0ff 0c00 0000 0000
+00000f0: 00f0 7f0c 0000 0000 0000 e0bf 0c18 2d44
+0000100: 54fb 2119 4006
;;; STDOUT ;;)
diff --git a/test/dump/convert.txt b/test/dump/convert.txt
index 4e1baa01..0b35e5be 100644
--- a/test/dump/convert.txt
+++ b/test/dump/convert.txt
@@ -48,8 +48,8 @@
000001a: ae ; OPCODE_F64_SCONVERT_I32
000001b: a0 ; OPCODE_I32_UCONVERT_F64
000001c: af ; OPCODE_F64_UCONVERT_I32
-000001d: 09 ; OPCODE_I8_CONST
-000001e: 00 ; u8 literal
+000001d: 0a ; OPCODE_I32_CONST
+000001e: 00 ; i32 literal
000001f: a2 ; OPCODE_I64_SCONVERT_F32
0000020: aa ; OPCODE_F32_SCONVERT_I64
0000021: a4 ; OPCODE_I64_UCONVERT_F32
@@ -59,8 +59,8 @@
0000025: a5 ; OPCODE_I64_UCONVERT_F64
0000026: b1 ; OPCODE_F64_UCONVERT_I64
0000027: a6 ; OPCODE_I64_SCONVERT_I32
-0000028: 09 ; OPCODE_I8_CONST
-0000029: 00 ; u8 literal
+0000028: 0a ; OPCODE_I32_CONST
+0000029: 00 ; i32 literal
000002a: ac ; OPCODE_F32_CONVERT_F64
000002b: b2 ; OPCODE_F64_CONVERT_F32
000002c: 0d ; OPCODE_F32_CONST
@@ -69,7 +69,7 @@
0000031: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 001e 00a1 a79d a89f a99e aea0 af09 00a2
-0000020: aaa4 aba3 b0a5 b1a6 0900 acb2 0d00 0000
+0000010: 001e 00a1 a79d a89f a99e aea0 af0a 00a2
+0000020: aaa4 aba3 b0a5 b1a6 0a00 acb2 0d00 0000
0000030: 0006
;;; STDOUT ;;)
diff --git a/test/dump/dedupe-sig.txt b/test/dump/dedupe-sig.txt
index 1d7bace3..178237dd 100644
--- a/test/dump/dedupe-sig.txt
+++ b/test/dump/dedupe-sig.txt
@@ -25,19 +25,18 @@
000001c: 0000 ; func signature index
000001e: 0000 ; func body size
0000020: 0b ; OPCODE_I64_CONST
-0000021: 0000 0000 0000 0000 ; u64 literal
-000001e: 0900 ; FIXUP func body size
-0000029: 06 ; WASM_BINARY_SECTION_END
+0000021: 00 ; i64 literal
+000001e: 0200 ; FIXUP func body size
+0000022: 06 ; WASM_BINARY_SECTION_END
; import 0
-0000011: 2a00 0000 ; FIXUP import module name offset
-000002a: 666f 6f ; import module name
-000002d: 00 ; \0
-0000015: 2e00 0000 ; FIXUP import function name offset
-000002e: 6261 72 ; import function name
-0000031: 00 ; \0
+0000011: 2300 0000 ; FIXUP import module name offset
+0000023: 666f 6f ; import module name
+0000026: 00 ; \0
+0000015: 2700 0000 ; FIXUP import function name offset
+0000027: 6261 72 ; import function name
+000002a: 00 ; \0
;; dump
0000000: 0061 736d 0a00 0000 0101 0102 0108 0100
-0000010: 002a 0000 002e 0000 0002 0100 0000 0900
-0000020: 0b00 0000 0000 0000 0006 666f 6f00 6261
-0000030: 7200
+0000010: 0023 0000 0027 0000 0002 0100 0000 0200
+0000020: 0b00 0666 6f6f 0062 6172 00
;;; STDOUT ;;)
diff --git a/test/dump/expr-br.txt b/test/dump/expr-br.txt
index dcf15813..116ece34 100644
--- a/test/dump/expr-br.txt
+++ b/test/dump/expr-br.txt
@@ -21,11 +21,11 @@
0000014: 01 ; num expressions
0000015: 06 ; OPCODE_BR
0000016: 00 ; break depth
-0000017: 09 ; OPCODE_I8_CONST
-0000018: 01 ; u8 literal
+0000017: 0a ; OPCODE_I32_CONST
+0000018: 01 ; i32 literal
0000011: 0600 ; FIXUP func body size
0000019: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0001 0201 0000
-0000010: 0006 0001 0106 0009 0106
+0000010: 0006 0001 0106 000a 0106
;;; STDOUT ;;)
diff --git a/test/dump/expr-brif.txt b/test/dump/expr-brif.txt
index aec0b5b6..ba56d446 100644
--- a/test/dump/expr-brif.txt
+++ b/test/dump/expr-brif.txt
@@ -22,15 +22,15 @@
0000014: 02 ; num expressions
0000015: 07 ; OPCODE_BR_IF
0000016: 00 ; break depth
-0000017: 09 ; OPCODE_I8_CONST
-0000018: 2a ; u8 literal
-0000019: 09 ; OPCODE_I8_CONST
-000001a: 00 ; u8 literal
-000001b: 09 ; OPCODE_I8_CONST
-000001c: 1d ; u8 literal
+0000017: 0a ; OPCODE_I32_CONST
+0000018: 2a ; i32 literal
+0000019: 0a ; OPCODE_I32_CONST
+000001a: 00 ; i32 literal
+000001b: 0a ; OPCODE_I32_CONST
+000001c: 1d ; i32 literal
0000011: 0a00 ; FIXUP func body size
000001d: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0001 0201 0000
-0000010: 000a 0001 0207 0009 2a09 0009 1d06
+0000010: 000a 0001 0207 000a 2a0a 000a 1d06
;;; STDOUT ;;)
diff --git a/test/dump/if-then-else-list.txt b/test/dump/if-then-else-list.txt
index 50b01cc0..8872b4ce 100644
--- a/test/dump/if-then-else-list.txt
+++ b/test/dump/if-then-else-list.txt
@@ -19,24 +19,24 @@
000000f: 0000 ; func signature index
0000011: 0000 ; func body size
0000013: 04 ; OPCODE_IF_THEN
-0000014: 09 ; OPCODE_I8_CONST
-0000015: 01 ; u8 literal
+0000014: 0a ; OPCODE_I32_CONST
+0000015: 01 ; i32 literal
0000016: 01 ; OPCODE_BLOCK
0000017: 02 ; num expressions
-0000018: 09 ; OPCODE_I8_CONST
-0000019: 02 ; u8 literal
-000001a: 09 ; OPCODE_I8_CONST
-000001b: 03 ; u8 literal
+0000018: 0a ; OPCODE_I32_CONST
+0000019: 02 ; i32 literal
+000001a: 0a ; OPCODE_I32_CONST
+000001b: 03 ; i32 literal
000001c: 01 ; OPCODE_BLOCK
000001d: 02 ; num expressions
-000001e: 09 ; OPCODE_I8_CONST
-000001f: 04 ; u8 literal
-0000020: 09 ; OPCODE_I8_CONST
-0000021: 05 ; u8 literal
+000001e: 0a ; OPCODE_I32_CONST
+000001f: 04 ; i32 literal
+0000020: 0a ; OPCODE_I32_CONST
+0000021: 05 ; i32 literal
0000011: 0f00 ; FIXUP func body size
0000022: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 000f 0004 0901 0102 0902 0903 0102 0904
-0000020: 0905 06
+0000010: 000f 0004 0a01 0102 0a02 0a03 0102 0a04
+0000020: 0a05 06
;;; STDOUT ;;)
diff --git a/test/dump/if-then-list.txt b/test/dump/if-then-list.txt
index d9ec346e..dd147709 100644
--- a/test/dump/if-then-list.txt
+++ b/test/dump/if-then-list.txt
@@ -18,8 +18,8 @@
000000f: 0000 ; func signature index
0000011: 0000 ; func body size
0000013: 03 ; OPCODE_IF
-0000014: 09 ; OPCODE_I8_CONST
-0000015: 01 ; u8 literal
+0000014: 0a ; OPCODE_I32_CONST
+0000015: 01 ; i32 literal
0000016: 01 ; OPCODE_BLOCK
0000017: 02 ; num expressions
0000018: 00 ; OPCODE_NOP
@@ -28,5 +28,5 @@
000001a: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0007 0003 0901 0102 0000 06
+0000010: 0007 0003 0a01 0102 0000 06
;;; STDOUT ;;)
diff --git a/test/dump/if.txt b/test/dump/if.txt
index 2b1ae1f1..8a0e6fd5 100644
--- a/test/dump/if.txt
+++ b/test/dump/if.txt
@@ -20,14 +20,14 @@
000000f: 0000 ; func signature index
0000011: 0000 ; func body size
0000013: 03 ; OPCODE_IF
-0000014: 09 ; OPCODE_I8_CONST
-0000015: 01 ; u8 literal
+0000014: 0a ; OPCODE_I32_CONST
+0000015: 01 ; i32 literal
0000016: 01 ; OPCODE_BLOCK
0000017: 01 ; num expressions
0000018: 00 ; OPCODE_NOP
0000019: 04 ; OPCODE_IF_THEN
-000001a: 09 ; OPCODE_I8_CONST
-000001b: 00 ; u8 literal
+000001a: 0a ; OPCODE_I32_CONST
+000001b: 00 ; i32 literal
000001c: 01 ; OPCODE_BLOCK
000001d: 01 ; num expressions
000001e: 0d ; OPCODE_F32_CONST
@@ -42,8 +42,8 @@
000002b: 0000 ; func signature index
000002d: 0000 ; func body size
000002f: 04 ; OPCODE_IF_THEN
-0000030: 09 ; OPCODE_I8_CONST
-0000031: 01 ; u8 literal
+0000030: 0a ; OPCODE_I32_CONST
+0000031: 01 ; i32 literal
0000032: 01 ; OPCODE_BLOCK
0000033: 01 ; num expressions
0000034: 14 ; OPCODE_RETURN
@@ -54,7 +54,7 @@
0000038: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0202 0000
-0000010: 0017 0003 0901 0101 0004 0900 0101 0d00
+0000010: 0017 0003 0a01 0101 0004 0a00 0101 0d00
0000020: 0080 3f01 010d 0000 0040 0000 0009 0004
-0000030: 0901 0101 1401 0114 06
+0000030: 0a01 0101 1401 0114 06
;;; STDOUT ;;)
diff --git a/test/dump/load-aligned.txt b/test/dump/load-aligned.txt
index 986b70ad..be032c76 100644
--- a/test/dump/load-aligned.txt
+++ b/test/dump/load-aligned.txt
@@ -51,126 +51,126 @@
0000011: 0000 ; func body size
0000013: 20 ; OPCODE_I32_LOAD_MEM8_S
0000014: 00 ; load access byte
-0000015: 09 ; OPCODE_I8_CONST
-0000016: 00 ; u8 literal
+0000015: 0a ; OPCODE_I32_CONST
+0000016: 00 ; i32 literal
0000017: 20 ; OPCODE_I32_LOAD_MEM8_S
0000018: 00 ; load access byte
-0000019: 09 ; OPCODE_I8_CONST
-000001a: 00 ; u8 literal
+0000019: 0a ; OPCODE_I32_CONST
+000001a: 00 ; i32 literal
000001b: 20 ; OPCODE_I32_LOAD_MEM8_S
000001c: 00 ; load access byte
-000001d: 09 ; OPCODE_I8_CONST
-000001e: 00 ; u8 literal
+000001d: 0a ; OPCODE_I32_CONST
+000001e: 00 ; i32 literal
000001f: 20 ; OPCODE_I32_LOAD_MEM8_S
0000020: 00 ; load access byte
-0000021: 09 ; OPCODE_I8_CONST
-0000022: 00 ; u8 literal
+0000021: 0a ; OPCODE_I32_CONST
+0000022: 00 ; i32 literal
0000023: 22 ; OPCODE_I32_LOAD_MEM16_S
0000024: 80 ; load access byte
-0000025: 09 ; OPCODE_I8_CONST
-0000026: 00 ; u8 literal
+0000025: 0a ; OPCODE_I32_CONST
+0000026: 00 ; i32 literal
0000027: 22 ; OPCODE_I32_LOAD_MEM16_S
0000028: 00 ; load access byte
-0000029: 09 ; OPCODE_I8_CONST
-000002a: 00 ; u8 literal
+0000029: 0a ; OPCODE_I32_CONST
+000002a: 00 ; i32 literal
000002b: 22 ; OPCODE_I32_LOAD_MEM16_S
000002c: 00 ; load access byte
-000002d: 09 ; OPCODE_I8_CONST
-000002e: 00 ; u8 literal
+000002d: 0a ; OPCODE_I32_CONST
+000002e: 00 ; i32 literal
000002f: 22 ; OPCODE_I32_LOAD_MEM16_S
0000030: 00 ; load access byte
-0000031: 09 ; OPCODE_I8_CONST
-0000032: 00 ; u8 literal
+0000031: 0a ; OPCODE_I32_CONST
+0000032: 00 ; i32 literal
0000033: 2a ; OPCODE_I32_LOAD_MEM
0000034: 80 ; load access byte
-0000035: 09 ; OPCODE_I8_CONST
-0000036: 00 ; u8 literal
+0000035: 0a ; OPCODE_I32_CONST
+0000036: 00 ; i32 literal
0000037: 2a ; OPCODE_I32_LOAD_MEM
0000038: 80 ; load access byte
-0000039: 09 ; OPCODE_I8_CONST
-000003a: 00 ; u8 literal
+0000039: 0a ; OPCODE_I32_CONST
+000003a: 00 ; i32 literal
000003b: 2a ; OPCODE_I32_LOAD_MEM
000003c: 00 ; load access byte
-000003d: 09 ; OPCODE_I8_CONST
-000003e: 00 ; u8 literal
+000003d: 0a ; OPCODE_I32_CONST
+000003e: 00 ; i32 literal
000003f: 2a ; OPCODE_I32_LOAD_MEM
0000040: 00 ; load access byte
-0000041: 09 ; OPCODE_I8_CONST
-0000042: 00 ; u8 literal
+0000041: 0a ; OPCODE_I32_CONST
+0000042: 00 ; i32 literal
0000043: 2b ; OPCODE_I64_LOAD_MEM
0000044: 80 ; load access byte
-0000045: 09 ; OPCODE_I8_CONST
-0000046: 00 ; u8 literal
+0000045: 0a ; OPCODE_I32_CONST
+0000046: 00 ; i32 literal
0000047: 2b ; OPCODE_I64_LOAD_MEM
0000048: 80 ; load access byte
-0000049: 09 ; OPCODE_I8_CONST
-000004a: 00 ; u8 literal
+0000049: 0a ; OPCODE_I32_CONST
+000004a: 00 ; i32 literal
000004b: 2b ; OPCODE_I64_LOAD_MEM
000004c: 80 ; load access byte
-000004d: 09 ; OPCODE_I8_CONST
-000004e: 00 ; u8 literal
+000004d: 0a ; OPCODE_I32_CONST
+000004e: 00 ; i32 literal
000004f: 2b ; OPCODE_I64_LOAD_MEM
0000050: 00 ; load access byte
-0000051: 09 ; OPCODE_I8_CONST
-0000052: 00 ; u8 literal
+0000051: 0a ; OPCODE_I32_CONST
+0000052: 00 ; i32 literal
0000053: 24 ; OPCODE_I64_LOAD_MEM8_S
0000054: 00 ; load access byte
-0000055: 09 ; OPCODE_I8_CONST
-0000056: 00 ; u8 literal
+0000055: 0a ; OPCODE_I32_CONST
+0000056: 00 ; i32 literal
0000057: 24 ; OPCODE_I64_LOAD_MEM8_S
0000058: 00 ; load access byte
-0000059: 09 ; OPCODE_I8_CONST
-000005a: 00 ; u8 literal
+0000059: 0a ; OPCODE_I32_CONST
+000005a: 00 ; i32 literal
000005b: 24 ; OPCODE_I64_LOAD_MEM8_S
000005c: 00 ; load access byte
-000005d: 09 ; OPCODE_I8_CONST
-000005e: 00 ; u8 literal
+000005d: 0a ; OPCODE_I32_CONST
+000005e: 00 ; i32 literal
000005f: 24 ; OPCODE_I64_LOAD_MEM8_S
0000060: 00 ; load access byte
-0000061: 09 ; OPCODE_I8_CONST
-0000062: 00 ; u8 literal
+0000061: 0a ; OPCODE_I32_CONST
+0000062: 00 ; i32 literal
0000063: 26 ; OPCODE_I64_LOAD_MEM16_S
0000064: 80 ; load access byte
-0000065: 09 ; OPCODE_I8_CONST
-0000066: 00 ; u8 literal
+0000065: 0a ; OPCODE_I32_CONST
+0000066: 00 ; i32 literal
0000067: 26 ; OPCODE_I64_LOAD_MEM16_S
0000068: 00 ; load access byte
-0000069: 09 ; OPCODE_I8_CONST
-000006a: 00 ; u8 literal
+0000069: 0a ; OPCODE_I32_CONST
+000006a: 00 ; i32 literal
000006b: 26 ; OPCODE_I64_LOAD_MEM16_S
000006c: 00 ; load access byte
-000006d: 09 ; OPCODE_I8_CONST
-000006e: 00 ; u8 literal
+000006d: 0a ; OPCODE_I32_CONST
+000006e: 00 ; i32 literal
000006f: 26 ; OPCODE_I64_LOAD_MEM16_S
0000070: 00 ; load access byte
-0000071: 09 ; OPCODE_I8_CONST
-0000072: 00 ; u8 literal
+0000071: 0a ; OPCODE_I32_CONST
+0000072: 00 ; i32 literal
0000073: 28 ; OPCODE_I64_LOAD_MEM32_S
0000074: 80 ; load access byte
-0000075: 09 ; OPCODE_I8_CONST
-0000076: 00 ; u8 literal
+0000075: 0a ; OPCODE_I32_CONST
+0000076: 00 ; i32 literal
0000077: 28 ; OPCODE_I64_LOAD_MEM32_S
0000078: 80 ; load access byte
-0000079: 09 ; OPCODE_I8_CONST
-000007a: 00 ; u8 literal
+0000079: 0a ; OPCODE_I32_CONST
+000007a: 00 ; i32 literal
000007b: 28 ; OPCODE_I64_LOAD_MEM32_S
000007c: 00 ; load access byte
-000007d: 09 ; OPCODE_I8_CONST
-000007e: 00 ; u8 literal
+000007d: 0a ; OPCODE_I32_CONST
+000007e: 00 ; i32 literal
000007f: 28 ; OPCODE_I64_LOAD_MEM32_S
0000080: 00 ; load access byte
-0000081: 09 ; OPCODE_I8_CONST
-0000082: 00 ; u8 literal
+0000081: 0a ; OPCODE_I32_CONST
+0000082: 00 ; i32 literal
0000011: 7000 ; FIXUP func body size
0000083: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0070 0020 0009 0020 0009 0020 0009 0020
-0000020: 0009 0022 8009 0022 0009 0022 0009 0022
-0000030: 0009 002a 8009 002a 8009 002a 0009 002a
-0000040: 0009 002b 8009 002b 8009 002b 8009 002b
-0000050: 0009 0024 0009 0024 0009 0024 0009 0024
-0000060: 0009 0026 8009 0026 0009 0026 0009 0026
-0000070: 0009 0028 8009 0028 8009 0028 0009 0028
-0000080: 0009 0006
+0000010: 0070 0020 000a 0020 000a 0020 000a 0020
+0000020: 000a 0022 800a 0022 000a 0022 000a 0022
+0000030: 000a 002a 800a 002a 800a 002a 000a 002a
+0000040: 000a 002b 800a 002b 800a 002b 800a 002b
+0000050: 000a 0024 000a 0024 000a 0024 000a 0024
+0000060: 000a 0026 800a 0026 000a 0026 000a 0026
+0000070: 000a 0028 800a 0028 800a 0028 000a 0028
+0000080: 000a 0006
;;; STDOUT ;;)
diff --git a/test/dump/load.txt b/test/dump/load.txt
index d3a16bf8..95ac12dc 100644
--- a/test/dump/load.txt
+++ b/test/dump/load.txt
@@ -31,66 +31,66 @@
0000011: 0000 ; func body size
0000013: 2a ; OPCODE_I32_LOAD_MEM
0000014: 00 ; load access byte
-0000015: 09 ; OPCODE_I8_CONST
-0000016: 00 ; u8 literal
+0000015: 0a ; OPCODE_I32_CONST
+0000016: 00 ; i32 literal
0000017: 20 ; OPCODE_I32_LOAD_MEM8_S
0000018: 00 ; load access byte
-0000019: 09 ; OPCODE_I8_CONST
-000001a: 00 ; u8 literal
+0000019: 0a ; OPCODE_I32_CONST
+000001a: 00 ; i32 literal
000001b: 22 ; OPCODE_I32_LOAD_MEM16_S
000001c: 00 ; load access byte
-000001d: 09 ; OPCODE_I8_CONST
-000001e: 00 ; u8 literal
+000001d: 0a ; OPCODE_I32_CONST
+000001e: 00 ; i32 literal
000001f: 21 ; OPCODE_I32_LOAD_MEM8_U
0000020: 00 ; load access byte
-0000021: 09 ; OPCODE_I8_CONST
-0000022: 00 ; u8 literal
+0000021: 0a ; OPCODE_I32_CONST
+0000022: 00 ; i32 literal
0000023: 23 ; OPCODE_I32_LOAD_MEM16_U
0000024: 00 ; load access byte
-0000025: 09 ; OPCODE_I8_CONST
-0000026: 00 ; u8 literal
+0000025: 0a ; OPCODE_I32_CONST
+0000026: 00 ; i32 literal
0000027: 2b ; OPCODE_I64_LOAD_MEM
0000028: 00 ; load access byte
-0000029: 09 ; OPCODE_I8_CONST
-000002a: 00 ; u8 literal
+0000029: 0a ; OPCODE_I32_CONST
+000002a: 00 ; i32 literal
000002b: 24 ; OPCODE_I64_LOAD_MEM8_S
000002c: 00 ; load access byte
-000002d: 09 ; OPCODE_I8_CONST
-000002e: 00 ; u8 literal
+000002d: 0a ; OPCODE_I32_CONST
+000002e: 00 ; i32 literal
000002f: 26 ; OPCODE_I64_LOAD_MEM16_S
0000030: 00 ; load access byte
-0000031: 09 ; OPCODE_I8_CONST
-0000032: 00 ; u8 literal
+0000031: 0a ; OPCODE_I32_CONST
+0000032: 00 ; i32 literal
0000033: 28 ; OPCODE_I64_LOAD_MEM32_S
0000034: 00 ; load access byte
-0000035: 09 ; OPCODE_I8_CONST
-0000036: 00 ; u8 literal
+0000035: 0a ; OPCODE_I32_CONST
+0000036: 00 ; i32 literal
0000037: 25 ; OPCODE_I64_LOAD_MEM8_U
0000038: 00 ; load access byte
-0000039: 09 ; OPCODE_I8_CONST
-000003a: 00 ; u8 literal
+0000039: 0a ; OPCODE_I32_CONST
+000003a: 00 ; i32 literal
000003b: 27 ; OPCODE_I64_LOAD_MEM16_U
000003c: 00 ; load access byte
-000003d: 09 ; OPCODE_I8_CONST
-000003e: 00 ; u8 literal
+000003d: 0a ; OPCODE_I32_CONST
+000003e: 00 ; i32 literal
000003f: 29 ; OPCODE_I64_LOAD_MEM32_U
0000040: 00 ; load access byte
-0000041: 09 ; OPCODE_I8_CONST
-0000042: 00 ; u8 literal
+0000041: 0a ; OPCODE_I32_CONST
+0000042: 00 ; i32 literal
0000043: 2c ; OPCODE_F32_LOAD_MEM
0000044: 00 ; load access byte
-0000045: 09 ; OPCODE_I8_CONST
-0000046: 00 ; u8 literal
+0000045: 0a ; OPCODE_I32_CONST
+0000046: 00 ; i32 literal
0000047: 2d ; OPCODE_F64_LOAD_MEM
0000048: 00 ; load access byte
-0000049: 09 ; OPCODE_I8_CONST
-000004a: 00 ; u8 literal
+0000049: 0a ; OPCODE_I32_CONST
+000004a: 00 ; i32 literal
0000011: 3800 ; FIXUP func body size
000004b: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0038 002a 0009 0020 0009 0022 0009 0021
-0000020: 0009 0023 0009 002b 0009 0024 0009 0026
-0000030: 0009 0028 0009 0025 0009 0027 0009 0029
-0000040: 0009 002c 0009 002d 0009 0006
+0000010: 0038 002a 000a 0020 000a 0022 000a 0021
+0000020: 000a 0023 000a 002b 000a 0024 000a 0026
+0000030: 000a 0028 000a 0025 000a 0027 000a 0029
+0000040: 000a 002c 000a 002d 000a 0006
;;; STDOUT ;;)
diff --git a/test/dump/result.txt b/test/dump/result.txt
index 1b59ed37..b6a6cdd8 100644
--- a/test/dump/result.txt
+++ b/test/dump/result.txt
@@ -27,35 +27,34 @@
0000014: 00 ; func flags
0000015: 0000 ; func signature index
0000017: 0000 ; func body size
-0000019: 09 ; OPCODE_I8_CONST
-000001a: 00 ; u8 literal
+0000019: 0a ; OPCODE_I32_CONST
+000001a: 00 ; i32 literal
0000017: 0200 ; FIXUP func body size
; function 1
000001b: 00 ; func flags
000001c: 0100 ; func signature index
000001e: 0000 ; func body size
0000020: 0b ; OPCODE_I64_CONST
-0000021: 0000 0000 0000 0000 ; u64 literal
-000001e: 0900 ; FIXUP func body size
+0000021: 00 ; i64 literal
+000001e: 0200 ; FIXUP func body size
; function 2
-0000029: 00 ; func flags
-000002a: 0200 ; func signature index
-000002c: 0000 ; func body size
-000002e: 0d ; OPCODE_F32_CONST
-000002f: 0000 0000 ; f32 literal
-000002c: 0500 ; FIXUP func body size
+0000022: 00 ; func flags
+0000023: 0200 ; func signature index
+0000025: 0000 ; func body size
+0000027: 0d ; OPCODE_F32_CONST
+0000028: 0000 0000 ; f32 literal
+0000025: 0500 ; FIXUP func body size
; function 3
-0000033: 00 ; func flags
-0000034: 0300 ; func signature index
-0000036: 0000 ; func body size
-0000038: 0c ; OPCODE_F64_CONST
-0000039: 0000 0000 0000 0000 ; f64 literal
-0000036: 0900 ; FIXUP func body size
-0000041: 06 ; WASM_BINARY_SECTION_END
+000002c: 00 ; func flags
+000002d: 0300 ; func signature index
+000002f: 0000 ; func body size
+0000031: 0c ; OPCODE_F64_CONST
+0000032: 0000 0000 0000 0000 ; f64 literal
+000002f: 0900 ; FIXUP func body size
+000003a: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0104 0001 0002 0003
-0000010: 0004 0204 0000 0002 0009 0000 0100 0900
-0000020: 0b00 0000 0000 0000 0000 0200 0500 0d00
-0000030: 0000 0000 0300 0900 0c00 0000 0000 0000
-0000040: 0006
+0000010: 0004 0204 0000 0002 000a 0000 0100 0200
+0000020: 0b00 0002 0005 000d 0000 0000 0003 0009
+0000030: 000c 0000 0000 0000 0000 06
;;; STDOUT ;;)
diff --git a/test/dump/return.txt b/test/dump/return.txt
index 1860252f..e8238e28 100644
--- a/test/dump/return.txt
+++ b/test/dump/return.txt
@@ -21,8 +21,8 @@
0000011: 0000 ; func signature index
0000013: 0000 ; func body size
0000015: 14 ; OPCODE_RETURN
-0000016: 09 ; OPCODE_I8_CONST
-0000017: 2a ; u8 literal
+0000016: 0a ; OPCODE_I32_CONST
+0000017: 2a ; i32 literal
0000013: 0300 ; FIXUP func body size
; function 1
0000018: 00 ; func flags
@@ -33,5 +33,5 @@
000001e: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0102 0001 0000 0202
-0000010: 0000 0003 0014 092a 0001 0001 0014 06
+0000010: 0000 0003 0014 0a2a 0001 0001 0014 06
;;; STDOUT ;;)
diff --git a/test/dump/select.txt b/test/dump/select.txt
index 0769e270..33d5fc97 100644
--- a/test/dump/select.txt
+++ b/test/dump/select.txt
@@ -20,40 +20,39 @@
000000f: 0000 ; func signature index
0000011: 0000 ; func body size
0000013: 05 ; OPCODE_SELECT
-0000014: 09 ; OPCODE_I8_CONST
-0000015: 02 ; u8 literal
-0000016: 09 ; OPCODE_I8_CONST
-0000017: 03 ; u8 literal
-0000018: 09 ; OPCODE_I8_CONST
-0000019: 01 ; u8 literal
+0000014: 0a ; OPCODE_I32_CONST
+0000015: 02 ; i32 literal
+0000016: 0a ; OPCODE_I32_CONST
+0000017: 03 ; i32 literal
+0000018: 0a ; OPCODE_I32_CONST
+0000019: 01 ; i32 literal
000001a: 05 ; OPCODE_SELECT
000001b: 0b ; OPCODE_I64_CONST
-000001c: 0200 0000 0000 0000 ; u64 literal
-0000024: 0b ; OPCODE_I64_CONST
-0000025: 0300 0000 0000 0000 ; u64 literal
-000002d: 09 ; OPCODE_I8_CONST
-000002e: 01 ; u8 literal
-000002f: 05 ; OPCODE_SELECT
-0000030: 0d ; OPCODE_F32_CONST
-0000031: 0000 0040 ; f32 literal
-0000035: 0d ; OPCODE_F32_CONST
-0000036: 0000 4040 ; f32 literal
-000003a: 09 ; OPCODE_I8_CONST
-000003b: 01 ; u8 literal
-000003c: 05 ; OPCODE_SELECT
-000003d: 0c ; OPCODE_F64_CONST
-000003e: 0000 0000 0000 0040 ; f64 literal
-0000046: 0c ; OPCODE_F64_CONST
-0000047: 0000 0000 0000 0840 ; f64 literal
-000004f: 09 ; OPCODE_I8_CONST
-0000050: 01 ; u8 literal
-0000011: 3e00 ; FIXUP func body size
-0000051: 06 ; WASM_BINARY_SECTION_END
+000001c: 02 ; i64 literal
+000001d: 0b ; OPCODE_I64_CONST
+000001e: 03 ; i64 literal
+000001f: 0a ; OPCODE_I32_CONST
+0000020: 01 ; i32 literal
+0000021: 05 ; OPCODE_SELECT
+0000022: 0d ; OPCODE_F32_CONST
+0000023: 0000 0040 ; f32 literal
+0000027: 0d ; OPCODE_F32_CONST
+0000028: 0000 4040 ; f32 literal
+000002c: 0a ; OPCODE_I32_CONST
+000002d: 01 ; i32 literal
+000002e: 05 ; OPCODE_SELECT
+000002f: 0c ; OPCODE_F64_CONST
+0000030: 0000 0000 0000 0040 ; f64 literal
+0000038: 0c ; OPCODE_F64_CONST
+0000039: 0000 0000 0000 0840 ; f64 literal
+0000041: 0a ; OPCODE_I32_CONST
+0000042: 01 ; i32 literal
+0000011: 3000 ; FIXUP func body size
+0000043: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 003e 0005 0902 0903 0901 050b 0200 0000
-0000020: 0000 0000 0b03 0000 0000 0000 0009 0105
-0000030: 0d00 0000 400d 0000 4040 0901 050c 0000
-0000040: 0000 0000 0040 0c00 0000 0000 0008 4009
-0000050: 0106
+0000010: 0030 0005 0a02 0a03 0a01 050b 020b 030a
+0000020: 0105 0d00 0000 400d 0000 4040 0a01 050c
+0000030: 0000 0000 0000 0040 0c00 0000 0000 0008
+0000040: 400a 0106
;;; STDOUT ;;)
diff --git a/test/dump/setlocal-param.txt b/test/dump/setlocal-param.txt
index c427914e..70f0cdb1 100644
--- a/test/dump/setlocal-param.txt
+++ b/test/dump/setlocal-param.txt
@@ -34,8 +34,8 @@
000001b: 0000 ; func body size
000001d: 0f ; OPCODE_SET_LOCAL
000001e: 00 ; remapped local index
-000001f: 09 ; OPCODE_I8_CONST
-0000020: 00 ; u8 literal
+000001f: 0a ; OPCODE_I32_CONST
+0000020: 00 ; i32 literal
0000021: 0f ; OPCODE_SET_LOCAL
0000022: 01 ; remapped local index
0000023: 0d ; OPCODE_F32_CONST
@@ -43,25 +43,24 @@
0000028: 0f ; OPCODE_SET_LOCAL
0000029: 03 ; remapped local index
000002a: 0b ; OPCODE_I64_CONST
-000002b: 0000 0000 0000 0000 ; u64 literal
+000002b: 00 ; i64 literal
+000002c: 0f ; OPCODE_SET_LOCAL
+000002d: 04 ; remapped local index
+000002e: 0d ; OPCODE_F32_CONST
+000002f: 0000 0000 ; f32 literal
0000033: 0f ; OPCODE_SET_LOCAL
-0000034: 04 ; remapped local index
-0000035: 0d ; OPCODE_F32_CONST
-0000036: 0000 0000 ; f32 literal
-000003a: 0f ; OPCODE_SET_LOCAL
-000003b: 02 ; remapped local index
-000003c: 09 ; OPCODE_I8_CONST
-000003d: 00 ; u8 literal
-000003e: 0f ; OPCODE_SET_LOCAL
-000003f: 05 ; remapped local index
-0000040: 0d ; OPCODE_F32_CONST
-0000041: 0000 0000 ; f32 literal
-000001b: 2800 ; FIXUP func body size
-0000045: 06 ; WASM_BINARY_SECTION_END
+0000034: 02 ; remapped local index
+0000035: 0a ; OPCODE_I32_CONST
+0000036: 00 ; i32 literal
+0000037: 0f ; OPCODE_SET_LOCAL
+0000038: 05 ; remapped local index
+0000039: 0d ; OPCODE_F32_CONST
+000003a: 0000 0000 ; f32 literal
+000001b: 2100 ; FIXUP func body size
+000003e: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0200 0103 0201
-0000010: 0400 0001 0001 0002 0000 0028 000f 0009
-0000020: 000f 010d 0000 0000 0f03 0b00 0000 0000
-0000030: 0000 000f 040d 0000 0000 0f02 0900 0f05
-0000040: 0d00 0000 0006
+0000010: 0400 0001 0001 0002 0000 0021 000f 000a
+0000020: 000f 010d 0000 0000 0f03 0b00 0f04 0d00
+0000030: 0000 000f 020a 000f 050d 0000 0000 06
;;; STDOUT ;;)
diff --git a/test/dump/setlocal.txt b/test/dump/setlocal.txt
index fdba8e06..f9a09f24 100644
--- a/test/dump/setlocal.txt
+++ b/test/dump/setlocal.txt
@@ -43,34 +43,33 @@
000002d: 0f ; OPCODE_SET_LOCAL
000002e: 02 ; remapped local index
000002f: 0b ; OPCODE_I64_CONST
-0000030: 0000 0000 0000 0000 ; u64 literal
-0000038: 0f ; OPCODE_SET_LOCAL
-0000039: 00 ; remapped local index
-000003a: 09 ; OPCODE_I8_CONST
-000003b: 00 ; u8 literal
-000003c: 0f ; OPCODE_SET_LOCAL
-000003d: 01 ; remapped local index
-000003e: 09 ; OPCODE_I8_CONST
-000003f: 00 ; u8 literal
+0000030: 00 ; i64 literal
+0000031: 0f ; OPCODE_SET_LOCAL
+0000032: 00 ; remapped local index
+0000033: 0a ; OPCODE_I32_CONST
+0000034: 00 ; i32 literal
+0000035: 0f ; OPCODE_SET_LOCAL
+0000036: 01 ; remapped local index
+0000037: 0a ; OPCODE_I32_CONST
+0000038: 00 ; i32 literal
+0000039: 0f ; OPCODE_SET_LOCAL
+000003a: 05 ; remapped local index
+000003b: 0d ; OPCODE_F32_CONST
+000003c: 0000 0000 ; f32 literal
0000040: 0f ; OPCODE_SET_LOCAL
-0000041: 05 ; remapped local index
-0000042: 0d ; OPCODE_F32_CONST
-0000043: 0000 0000 ; f32 literal
-0000047: 0f ; OPCODE_SET_LOCAL
-0000048: 07 ; remapped local index
-0000049: 0c ; OPCODE_F64_CONST
-000004a: 0000 0000 0000 0000 ; f64 literal
-0000052: 0f ; OPCODE_SET_LOCAL
-0000053: 03 ; remapped local index
-0000054: 0b ; OPCODE_I64_CONST
-0000055: 0000 0000 0000 0000 ; u64 literal
-0000019: 4200 ; FIXUP func body size
-000005d: 06 ; WASM_BINARY_SECTION_END
+0000041: 07 ; remapped local index
+0000042: 0c ; OPCODE_F64_CONST
+0000043: 0000 0000 0000 0000 ; f64 literal
+000004b: 0f ; OPCODE_SET_LOCAL
+000004c: 03 ; remapped local index
+000004d: 0b ; OPCODE_I64_CONST
+000004e: 00 ; i64 literal
+0000019: 3400 ; FIXUP func body size
+000004f: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0400
-0000010: 0002 0002 0002 0002 0042 000f 060c 0000
+0000010: 0002 0002 0002 0002 0034 000f 060c 0000
0000020: 0000 0000 0000 0f04 0d00 0000 000f 020b
-0000030: 0000 0000 0000 0000 0f00 0900 0f01 0900
-0000040: 0f05 0d00 0000 000f 070c 0000 0000 0000
-0000050: 0000 0f03 0b00 0000 0000 0000 0006
+0000030: 000f 000a 000f 010a 000f 050d 0000 0000
+0000040: 0f07 0c00 0000 0000 0000 000f 030b 0006
;;; STDOUT ;;)
diff --git a/test/dump/store-aligned.txt b/test/dump/store-aligned.txt
index 8c3af692..c8c9df91 100644
--- a/test/dump/store-aligned.txt
+++ b/test/dump/store-aligned.txt
@@ -51,192 +51,185 @@
0000011: 0000 ; func body size
0000013: 2e ; OPCODE_I32_STORE_MEM8
0000014: 00 ; store access byte
-0000015: 09 ; OPCODE_I8_CONST
-0000016: 00 ; u8 literal
-0000017: 09 ; OPCODE_I8_CONST
-0000018: 00 ; u8 literal
+0000015: 0a ; OPCODE_I32_CONST
+0000016: 00 ; i32 literal
+0000017: 0a ; OPCODE_I32_CONST
+0000018: 00 ; i32 literal
0000019: 2e ; OPCODE_I32_STORE_MEM8
000001a: 00 ; store access byte
-000001b: 09 ; OPCODE_I8_CONST
-000001c: 00 ; u8 literal
-000001d: 09 ; OPCODE_I8_CONST
-000001e: 00 ; u8 literal
+000001b: 0a ; OPCODE_I32_CONST
+000001c: 00 ; i32 literal
+000001d: 0a ; OPCODE_I32_CONST
+000001e: 00 ; i32 literal
000001f: 2e ; OPCODE_I32_STORE_MEM8
0000020: 00 ; store access byte
-0000021: 09 ; OPCODE_I8_CONST
-0000022: 00 ; u8 literal
-0000023: 09 ; OPCODE_I8_CONST
-0000024: 00 ; u8 literal
+0000021: 0a ; OPCODE_I32_CONST
+0000022: 00 ; i32 literal
+0000023: 0a ; OPCODE_I32_CONST
+0000024: 00 ; i32 literal
0000025: 2e ; OPCODE_I32_STORE_MEM8
0000026: 00 ; store access byte
-0000027: 09 ; OPCODE_I8_CONST
-0000028: 00 ; u8 literal
-0000029: 09 ; OPCODE_I8_CONST
-000002a: 00 ; u8 literal
+0000027: 0a ; OPCODE_I32_CONST
+0000028: 00 ; i32 literal
+0000029: 0a ; OPCODE_I32_CONST
+000002a: 00 ; i32 literal
000002b: 2f ; OPCODE_I32_STORE_MEM16
000002c: 80 ; store access byte
-000002d: 09 ; OPCODE_I8_CONST
-000002e: 00 ; u8 literal
-000002f: 09 ; OPCODE_I8_CONST
-0000030: 00 ; u8 literal
+000002d: 0a ; OPCODE_I32_CONST
+000002e: 00 ; i32 literal
+000002f: 0a ; OPCODE_I32_CONST
+0000030: 00 ; i32 literal
0000031: 2f ; OPCODE_I32_STORE_MEM16
0000032: 00 ; store access byte
-0000033: 09 ; OPCODE_I8_CONST
-0000034: 00 ; u8 literal
-0000035: 09 ; OPCODE_I8_CONST
-0000036: 00 ; u8 literal
+0000033: 0a ; OPCODE_I32_CONST
+0000034: 00 ; i32 literal
+0000035: 0a ; OPCODE_I32_CONST
+0000036: 00 ; i32 literal
0000037: 2f ; OPCODE_I32_STORE_MEM16
0000038: 00 ; store access byte
-0000039: 09 ; OPCODE_I8_CONST
-000003a: 00 ; u8 literal
-000003b: 09 ; OPCODE_I8_CONST
-000003c: 00 ; u8 literal
+0000039: 0a ; OPCODE_I32_CONST
+000003a: 00 ; i32 literal
+000003b: 0a ; OPCODE_I32_CONST
+000003c: 00 ; i32 literal
000003d: 2f ; OPCODE_I32_STORE_MEM16
000003e: 00 ; store access byte
-000003f: 09 ; OPCODE_I8_CONST
-0000040: 00 ; u8 literal
-0000041: 09 ; OPCODE_I8_CONST
-0000042: 00 ; u8 literal
+000003f: 0a ; OPCODE_I32_CONST
+0000040: 00 ; i32 literal
+0000041: 0a ; OPCODE_I32_CONST
+0000042: 00 ; i32 literal
0000043: 33 ; OPCODE_I32_STORE_MEM
0000044: 80 ; store access byte
-0000045: 09 ; OPCODE_I8_CONST
-0000046: 00 ; u8 literal
-0000047: 09 ; OPCODE_I8_CONST
-0000048: 00 ; u8 literal
+0000045: 0a ; OPCODE_I32_CONST
+0000046: 00 ; i32 literal
+0000047: 0a ; OPCODE_I32_CONST
+0000048: 00 ; i32 literal
0000049: 33 ; OPCODE_I32_STORE_MEM
000004a: 80 ; store access byte
-000004b: 09 ; OPCODE_I8_CONST
-000004c: 00 ; u8 literal
-000004d: 09 ; OPCODE_I8_CONST
-000004e: 00 ; u8 literal
+000004b: 0a ; OPCODE_I32_CONST
+000004c: 00 ; i32 literal
+000004d: 0a ; OPCODE_I32_CONST
+000004e: 00 ; i32 literal
000004f: 33 ; OPCODE_I32_STORE_MEM
0000050: 00 ; store access byte
-0000051: 09 ; OPCODE_I8_CONST
-0000052: 00 ; u8 literal
-0000053: 09 ; OPCODE_I8_CONST
-0000054: 00 ; u8 literal
+0000051: 0a ; OPCODE_I32_CONST
+0000052: 00 ; i32 literal
+0000053: 0a ; OPCODE_I32_CONST
+0000054: 00 ; i32 literal
0000055: 33 ; OPCODE_I32_STORE_MEM
0000056: 00 ; store access byte
-0000057: 09 ; OPCODE_I8_CONST
-0000058: 00 ; u8 literal
-0000059: 09 ; OPCODE_I8_CONST
-000005a: 00 ; u8 literal
+0000057: 0a ; OPCODE_I32_CONST
+0000058: 00 ; i32 literal
+0000059: 0a ; OPCODE_I32_CONST
+000005a: 00 ; i32 literal
000005b: 34 ; OPCODE_I64_STORE_MEM
000005c: 80 ; store access byte
-000005d: 09 ; OPCODE_I8_CONST
-000005e: 00 ; u8 literal
+000005d: 0a ; OPCODE_I32_CONST
+000005e: 00 ; i32 literal
000005f: 0b ; OPCODE_I64_CONST
-0000060: 0000 0000 0000 0000 ; u64 literal
-0000068: 34 ; OPCODE_I64_STORE_MEM
-0000069: 80 ; store access byte
-000006a: 09 ; OPCODE_I8_CONST
-000006b: 00 ; u8 literal
-000006c: 0b ; OPCODE_I64_CONST
-000006d: 0000 0000 0000 0000 ; u64 literal
-0000075: 34 ; OPCODE_I64_STORE_MEM
-0000076: 80 ; store access byte
-0000077: 09 ; OPCODE_I8_CONST
-0000078: 00 ; u8 literal
-0000079: 0b ; OPCODE_I64_CONST
-000007a: 0000 0000 0000 0000 ; u64 literal
-0000082: 34 ; OPCODE_I64_STORE_MEM
-0000083: 00 ; store access byte
-0000084: 09 ; OPCODE_I8_CONST
-0000085: 00 ; u8 literal
-0000086: 0b ; OPCODE_I64_CONST
-0000087: 0000 0000 0000 0000 ; u64 literal
-000008f: 30 ; OPCODE_I64_STORE_MEM8
-0000090: 00 ; store access byte
-0000091: 09 ; OPCODE_I8_CONST
-0000092: 00 ; u8 literal
-0000093: 0b ; OPCODE_I64_CONST
-0000094: 0000 0000 0000 0000 ; u64 literal
-000009c: 30 ; OPCODE_I64_STORE_MEM8
-000009d: 00 ; store access byte
-000009e: 09 ; OPCODE_I8_CONST
-000009f: 00 ; u8 literal
-00000a0: 0b ; OPCODE_I64_CONST
-00000a1: 0000 0000 0000 0000 ; u64 literal
-00000a9: 30 ; OPCODE_I64_STORE_MEM8
-00000aa: 00 ; store access byte
-00000ab: 09 ; OPCODE_I8_CONST
-00000ac: 00 ; u8 literal
+0000060: 00 ; i64 literal
+0000061: 34 ; OPCODE_I64_STORE_MEM
+0000062: 80 ; store access byte
+0000063: 0a ; OPCODE_I32_CONST
+0000064: 00 ; i32 literal
+0000065: 0b ; OPCODE_I64_CONST
+0000066: 00 ; i64 literal
+0000067: 34 ; OPCODE_I64_STORE_MEM
+0000068: 80 ; store access byte
+0000069: 0a ; OPCODE_I32_CONST
+000006a: 00 ; i32 literal
+000006b: 0b ; OPCODE_I64_CONST
+000006c: 00 ; i64 literal
+000006d: 34 ; OPCODE_I64_STORE_MEM
+000006e: 00 ; store access byte
+000006f: 0a ; OPCODE_I32_CONST
+0000070: 00 ; i32 literal
+0000071: 0b ; OPCODE_I64_CONST
+0000072: 00 ; i64 literal
+0000073: 30 ; OPCODE_I64_STORE_MEM8
+0000074: 00 ; store access byte
+0000075: 0a ; OPCODE_I32_CONST
+0000076: 00 ; i32 literal
+0000077: 0b ; OPCODE_I64_CONST
+0000078: 00 ; i64 literal
+0000079: 30 ; OPCODE_I64_STORE_MEM8
+000007a: 00 ; store access byte
+000007b: 0a ; OPCODE_I32_CONST
+000007c: 00 ; i32 literal
+000007d: 0b ; OPCODE_I64_CONST
+000007e: 00 ; i64 literal
+000007f: 30 ; OPCODE_I64_STORE_MEM8
+0000080: 00 ; store access byte
+0000081: 0a ; OPCODE_I32_CONST
+0000082: 00 ; i32 literal
+0000083: 0b ; OPCODE_I64_CONST
+0000084: 00 ; i64 literal
+0000085: 30 ; OPCODE_I64_STORE_MEM8
+0000086: 00 ; store access byte
+0000087: 0a ; OPCODE_I32_CONST
+0000088: 00 ; i32 literal
+0000089: 0b ; OPCODE_I64_CONST
+000008a: 00 ; i64 literal
+000008b: 31 ; OPCODE_I64_STORE_MEM16
+000008c: 80 ; store access byte
+000008d: 0a ; OPCODE_I32_CONST
+000008e: 00 ; i32 literal
+000008f: 0b ; OPCODE_I64_CONST
+0000090: 00 ; i64 literal
+0000091: 31 ; OPCODE_I64_STORE_MEM16
+0000092: 00 ; store access byte
+0000093: 0a ; OPCODE_I32_CONST
+0000094: 00 ; i32 literal
+0000095: 0b ; OPCODE_I64_CONST
+0000096: 00 ; i64 literal
+0000097: 31 ; OPCODE_I64_STORE_MEM16
+0000098: 00 ; store access byte
+0000099: 0a ; OPCODE_I32_CONST
+000009a: 00 ; i32 literal
+000009b: 0b ; OPCODE_I64_CONST
+000009c: 00 ; i64 literal
+000009d: 31 ; OPCODE_I64_STORE_MEM16
+000009e: 00 ; store access byte
+000009f: 0a ; OPCODE_I32_CONST
+00000a0: 00 ; i32 literal
+00000a1: 0b ; OPCODE_I64_CONST
+00000a2: 00 ; i64 literal
+00000a3: 34 ; OPCODE_I64_STORE_MEM
+00000a4: 80 ; store access byte
+00000a5: 0a ; OPCODE_I32_CONST
+00000a6: 00 ; i32 literal
+00000a7: 0b ; OPCODE_I64_CONST
+00000a8: 00 ; i64 literal
+00000a9: 34 ; OPCODE_I64_STORE_MEM
+00000aa: 80 ; store access byte
+00000ab: 0a ; OPCODE_I32_CONST
+00000ac: 00 ; i32 literal
00000ad: 0b ; OPCODE_I64_CONST
-00000ae: 0000 0000 0000 0000 ; u64 literal
-00000b6: 30 ; OPCODE_I64_STORE_MEM8
-00000b7: 00 ; store access byte
-00000b8: 09 ; OPCODE_I8_CONST
-00000b9: 00 ; u8 literal
-00000ba: 0b ; OPCODE_I64_CONST
-00000bb: 0000 0000 0000 0000 ; u64 literal
-00000c3: 31 ; OPCODE_I64_STORE_MEM16
-00000c4: 80 ; store access byte
-00000c5: 09 ; OPCODE_I8_CONST
-00000c6: 00 ; u8 literal
-00000c7: 0b ; OPCODE_I64_CONST
-00000c8: 0000 0000 0000 0000 ; u64 literal
-00000d0: 31 ; OPCODE_I64_STORE_MEM16
-00000d1: 00 ; store access byte
-00000d2: 09 ; OPCODE_I8_CONST
-00000d3: 00 ; u8 literal
-00000d4: 0b ; OPCODE_I64_CONST
-00000d5: 0000 0000 0000 0000 ; u64 literal
-00000dd: 31 ; OPCODE_I64_STORE_MEM16
-00000de: 00 ; store access byte
-00000df: 09 ; OPCODE_I8_CONST
-00000e0: 00 ; u8 literal
-00000e1: 0b ; OPCODE_I64_CONST
-00000e2: 0000 0000 0000 0000 ; u64 literal
-00000ea: 31 ; OPCODE_I64_STORE_MEM16
-00000eb: 00 ; store access byte
-00000ec: 09 ; OPCODE_I8_CONST
-00000ed: 00 ; u8 literal
-00000ee: 0b ; OPCODE_I64_CONST
-00000ef: 0000 0000 0000 0000 ; u64 literal
-00000f7: 34 ; OPCODE_I64_STORE_MEM
-00000f8: 80 ; store access byte
-00000f9: 09 ; OPCODE_I8_CONST
-00000fa: 00 ; u8 literal
-00000fb: 0b ; OPCODE_I64_CONST
-00000fc: 0000 0000 0000 0000 ; u64 literal
-0000104: 34 ; OPCODE_I64_STORE_MEM
-0000105: 80 ; store access byte
-0000106: 09 ; OPCODE_I8_CONST
-0000107: 00 ; u8 literal
-0000108: 0b ; OPCODE_I64_CONST
-0000109: 0000 0000 0000 0000 ; u64 literal
-0000111: 34 ; OPCODE_I64_STORE_MEM
-0000112: 80 ; store access byte
-0000113: 09 ; OPCODE_I8_CONST
-0000114: 00 ; u8 literal
-0000115: 0b ; OPCODE_I64_CONST
-0000116: 0000 0000 0000 0000 ; u64 literal
-000011e: 34 ; OPCODE_I64_STORE_MEM
-000011f: 00 ; store access byte
-0000120: 09 ; OPCODE_I8_CONST
-0000121: 00 ; u8 literal
-0000122: 0b ; OPCODE_I64_CONST
-0000123: 0000 0000 0000 0000 ; u64 literal
-0000011: 1801 ; FIXUP func body size
-000012b: 06 ; WASM_BINARY_SECTION_END
+00000ae: 00 ; i64 literal
+00000af: 34 ; OPCODE_I64_STORE_MEM
+00000b0: 80 ; store access byte
+00000b1: 0a ; OPCODE_I32_CONST
+00000b2: 00 ; i32 literal
+00000b3: 0b ; OPCODE_I64_CONST
+00000b4: 00 ; i64 literal
+00000b5: 34 ; OPCODE_I64_STORE_MEM
+00000b6: 00 ; store access byte
+00000b7: 0a ; OPCODE_I32_CONST
+00000b8: 00 ; i32 literal
+00000b9: 0b ; OPCODE_I64_CONST
+00000ba: 00 ; i64 literal
+0000011: a800 ; FIXUP func body size
+00000bb: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0018 012e 0009 0009 002e 0009 0009 002e
-0000020: 0009 0009 002e 0009 0009 002f 8009 0009
-0000030: 002f 0009 0009 002f 0009 0009 002f 0009
-0000040: 0009 0033 8009 0009 0033 8009 0009 0033
-0000050: 0009 0009 0033 0009 0009 0034 8009 000b
-0000060: 0000 0000 0000 0000 3480 0900 0b00 0000
-0000070: 0000 0000 0034 8009 000b 0000 0000 0000
-0000080: 0000 3400 0900 0b00 0000 0000 0000 0030
-0000090: 0009 000b 0000 0000 0000 0000 3000 0900
-00000a0: 0b00 0000 0000 0000 0030 0009 000b 0000
-00000b0: 0000 0000 0000 3000 0900 0b00 0000 0000
-00000c0: 0000 0031 8009 000b 0000 0000 0000 0000
-00000d0: 3100 0900 0b00 0000 0000 0000 0031 0009
-00000e0: 000b 0000 0000 0000 0000 3100 0900 0b00
-00000f0: 0000 0000 0000 0034 8009 000b 0000 0000
-0000100: 0000 0000 3480 0900 0b00 0000 0000 0000
-0000110: 0034 8009 000b 0000 0000 0000 0000 3400
-0000120: 0900 0b00 0000 0000 0000 0006
+0000010: 00a8 002e 000a 000a 002e 000a 000a 002e
+0000020: 000a 000a 002e 000a 000a 002f 800a 000a
+0000030: 002f 000a 000a 002f 000a 000a 002f 000a
+0000040: 000a 0033 800a 000a 0033 800a 000a 0033
+0000050: 000a 000a 0033 000a 000a 0034 800a 000b
+0000060: 0034 800a 000b 0034 800a 000b 0034 000a
+0000070: 000b 0030 000a 000b 0030 000a 000b 0030
+0000080: 000a 000b 0030 000a 000b 0031 800a 000b
+0000090: 0031 000a 000b 0031 000a 000b 0031 000a
+00000a0: 000b 0034 800a 000b 0034 800a 000b 0034
+00000b0: 800a 000b 0034 000a 000b 0006
;;; STDOUT ;;)
diff --git a/test/dump/store.txt b/test/dump/store.txt
index 591d54fd..e25edf55 100644
--- a/test/dump/store.txt
+++ b/test/dump/store.txt
@@ -26,66 +26,65 @@
0000011: 0000 ; func body size
0000013: 2e ; OPCODE_I32_STORE_MEM8
0000014: 00 ; store access byte
-0000015: 09 ; OPCODE_I8_CONST
-0000016: 00 ; u8 literal
-0000017: 09 ; OPCODE_I8_CONST
-0000018: 00 ; u8 literal
+0000015: 0a ; OPCODE_I32_CONST
+0000016: 00 ; i32 literal
+0000017: 0a ; OPCODE_I32_CONST
+0000018: 00 ; i32 literal
0000019: 2f ; OPCODE_I32_STORE_MEM16
000001a: 00 ; store access byte
-000001b: 09 ; OPCODE_I8_CONST
-000001c: 00 ; u8 literal
-000001d: 09 ; OPCODE_I8_CONST
-000001e: 00 ; u8 literal
+000001b: 0a ; OPCODE_I32_CONST
+000001c: 00 ; i32 literal
+000001d: 0a ; OPCODE_I32_CONST
+000001e: 00 ; i32 literal
000001f: 33 ; OPCODE_I32_STORE_MEM
0000020: 00 ; store access byte
-0000021: 09 ; OPCODE_I8_CONST
-0000022: 00 ; u8 literal
-0000023: 09 ; OPCODE_I8_CONST
-0000024: 00 ; u8 literal
+0000021: 0a ; OPCODE_I32_CONST
+0000022: 00 ; i32 literal
+0000023: 0a ; OPCODE_I32_CONST
+0000024: 00 ; i32 literal
0000025: 34 ; OPCODE_I64_STORE_MEM
0000026: 00 ; store access byte
-0000027: 09 ; OPCODE_I8_CONST
-0000028: 00 ; u8 literal
+0000027: 0a ; OPCODE_I32_CONST
+0000028: 00 ; i32 literal
0000029: 0b ; OPCODE_I64_CONST
-000002a: 0000 0000 0000 0000 ; u64 literal
-0000032: 30 ; OPCODE_I64_STORE_MEM8
-0000033: 00 ; store access byte
-0000034: 09 ; OPCODE_I8_CONST
-0000035: 00 ; u8 literal
-0000036: 0b ; OPCODE_I64_CONST
-0000037: 0000 0000 0000 0000 ; u64 literal
-000003f: 31 ; OPCODE_I64_STORE_MEM16
-0000040: 00 ; store access byte
-0000041: 09 ; OPCODE_I8_CONST
-0000042: 00 ; u8 literal
-0000043: 0b ; OPCODE_I64_CONST
-0000044: 0000 0000 0000 0000 ; u64 literal
-000004c: 32 ; OPCODE_I64_STORE_MEM32
-000004d: 00 ; store access byte
-000004e: 09 ; OPCODE_I8_CONST
-000004f: 00 ; u8 literal
-0000050: 0b ; OPCODE_I64_CONST
-0000051: 0000 0000 0000 0000 ; u64 literal
-0000059: 35 ; OPCODE_F32_STORE_MEM
-000005a: 00 ; store access byte
-000005b: 09 ; OPCODE_I8_CONST
-000005c: 00 ; u8 literal
-000005d: 0d ; OPCODE_F32_CONST
-000005e: 0000 0000 ; f32 literal
-0000062: 36 ; OPCODE_F64_STORE_MEM
-0000063: 00 ; store access byte
-0000064: 09 ; OPCODE_I8_CONST
-0000065: 00 ; u8 literal
-0000066: 0c ; OPCODE_F64_CONST
-0000067: 0000 0000 0000 0000 ; f64 literal
-0000011: 5c00 ; FIXUP func body size
-000006f: 06 ; WASM_BINARY_SECTION_END
+000002a: 00 ; i64 literal
+000002b: 30 ; OPCODE_I64_STORE_MEM8
+000002c: 00 ; store access byte
+000002d: 0a ; OPCODE_I32_CONST
+000002e: 00 ; i32 literal
+000002f: 0b ; OPCODE_I64_CONST
+0000030: 00 ; i64 literal
+0000031: 31 ; OPCODE_I64_STORE_MEM16
+0000032: 00 ; store access byte
+0000033: 0a ; OPCODE_I32_CONST
+0000034: 00 ; i32 literal
+0000035: 0b ; OPCODE_I64_CONST
+0000036: 00 ; i64 literal
+0000037: 32 ; OPCODE_I64_STORE_MEM32
+0000038: 00 ; store access byte
+0000039: 0a ; OPCODE_I32_CONST
+000003a: 00 ; i32 literal
+000003b: 0b ; OPCODE_I64_CONST
+000003c: 00 ; i64 literal
+000003d: 35 ; OPCODE_F32_STORE_MEM
+000003e: 00 ; store access byte
+000003f: 0a ; OPCODE_I32_CONST
+0000040: 00 ; i32 literal
+0000041: 0d ; OPCODE_F32_CONST
+0000042: 0000 0000 ; f32 literal
+0000046: 36 ; OPCODE_F64_STORE_MEM
+0000047: 00 ; store access byte
+0000048: 0a ; OPCODE_I32_CONST
+0000049: 00 ; i32 literal
+000004a: 0c ; OPCODE_F64_CONST
+000004b: 0000 0000 0000 0000 ; f64 literal
+0000011: 4000 ; FIXUP func body size
+0000053: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 005c 002e 0009 0009 002f 0009 0009 0033
-0000020: 0009 0009 0034 0009 000b 0000 0000 0000
-0000030: 0000 3000 0900 0b00 0000 0000 0000 0031
-0000040: 0009 000b 0000 0000 0000 0000 3200 0900
-0000050: 0b00 0000 0000 0000 0035 0009 000d 0000
-0000060: 0000 3600 0900 0c00 0000 0000 0000 0006
+0000010: 0040 002e 000a 000a 002f 000a 000a 0033
+0000020: 000a 000a 0034 000a 000b 0030 000a 000b
+0000030: 0031 000a 000b 0032 000a 000b 0035 000a
+0000040: 000d 0000 0000 3600 0a00 0c00 0000 0000
+0000050: 0000 0006
;;; STDOUT ;;)
diff --git a/test/dump/tableswitch-implicit-block.txt b/test/dump/tableswitch-implicit-block.txt
index dc1d2c95..61528b4d 100644
--- a/test/dump/tableswitch-implicit-block.txt
+++ b/test/dump/tableswitch-implicit-block.txt
@@ -25,8 +25,8 @@
0000016: 0200 ; num targets
0000018: 0000 ; case index
000001a: 0100 ; case index
-000001c: 09 ; OPCODE_I8_CONST
-000001d: 00 ; u8 literal
+000001c: 0a ; OPCODE_I32_CONST
+000001d: 00 ; i32 literal
000001e: 01 ; OPCODE_BLOCK
000001f: 02 ; num expressions
0000020: 00 ; OPCODE_NOP
@@ -43,6 +43,6 @@
000002a: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0017 0008 0200 0200 0000 0100 0900 0102
+0000010: 0017 0008 0200 0200 0000 0100 0a00 0102
0000020: 0006 0100 0102 0006 0100 06
;;; STDOUT ;;)
diff --git a/test/dump/tableswitch.txt b/test/dump/tableswitch.txt
index 43d03ad7..acdc4efc 100644
--- a/test/dump/tableswitch.txt
+++ b/test/dump/tableswitch.txt
@@ -26,21 +26,21 @@
0000018: 0000 ; case index
000001a: 0100 ; case index
000001c: 0080 ; br depth
-000001e: 09 ; OPCODE_I8_CONST
-000001f: 00 ; u8 literal
+000001e: 0a ; OPCODE_I32_CONST
+000001f: 00 ; i32 literal
0000020: 01 ; OPCODE_BLOCK
0000021: 02 ; num expressions
-0000022: 09 ; OPCODE_I8_CONST
-0000023: 01 ; u8 literal
-0000024: 09 ; OPCODE_I8_CONST
-0000025: 02 ; u8 literal
+0000022: 0a ; OPCODE_I32_CONST
+0000023: 01 ; i32 literal
+0000024: 0a ; OPCODE_I32_CONST
+0000025: 02 ; i32 literal
0000026: 00 ; OPCODE_NOP for fallthrough
-0000027: 09 ; OPCODE_I8_CONST
-0000028: 03 ; u8 literal
+0000027: 0a ; OPCODE_I32_CONST
+0000028: 03 ; i32 literal
0000011: 1600 ; FIXUP func body size
0000029: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 0016 0008 0300 0300 0000 0100 0080 0900
-0000020: 0102 0901 0902 0009 0306
+0000010: 0016 0008 0300 0300 0000 0100 0080 0a00
+0000020: 0102 0a01 0a02 000a 0306
;;; STDOUT ;;)
diff --git a/test/dump/unary.txt b/test/dump/unary.txt
index 92685a69..679cfca0 100644
--- a/test/dump/unary.txt
+++ b/test/dump/unary.txt
@@ -43,37 +43,36 @@
0000014: 57 ; OPCODE_I32_CLZ
0000015: 58 ; OPCODE_I32_CTZ
0000016: 59 ; OPCODE_I32_POPCNT
-0000017: 09 ; OPCODE_I8_CONST
-0000018: 00 ; u8 literal
+0000017: 0a ; OPCODE_I32_CONST
+0000018: 00 ; i32 literal
0000019: 72 ; OPCODE_I64_CLZ
000001a: 73 ; OPCODE_I64_CTZ
000001b: 74 ; OPCODE_I64_POPCNT
000001c: 0b ; OPCODE_I64_CONST
-000001d: 0000 0000 0000 0000 ; u64 literal
-0000025: 7c ; OPCODE_F32_NEG
-0000026: 7b ; OPCODE_F32_ABS
-0000027: 82 ; OPCODE_F32_SQRT
-0000028: 7e ; OPCODE_F32_CEIL
-0000029: 7f ; OPCODE_F32_FLOOR
-000002a: 80 ; OPCODE_F32_TRUNC
-000002b: 81 ; OPCODE_F32_NEAREST_INT
-000002c: 0d ; OPCODE_F32_CONST
-000002d: 0000 0000 ; f32 literal
-0000031: 90 ; OPCODE_F64_NEG
-0000032: 8f ; OPCODE_F64_ABS
-0000033: 96 ; OPCODE_F64_SQRT
-0000034: 92 ; OPCODE_F64_CEIL
-0000035: 93 ; OPCODE_F64_FLOOR
-0000036: 94 ; OPCODE_F64_TRUNC
-0000037: 95 ; OPCODE_F64_NEAREST_INT
-0000038: 0c ; OPCODE_F64_CONST
-0000039: 0000 0000 0000 0000 ; f64 literal
-0000011: 2e00 ; FIXUP func body size
-0000041: 06 ; WASM_BINARY_SECTION_END
+000001d: 00 ; i64 literal
+000001e: 7c ; OPCODE_F32_NEG
+000001f: 7b ; OPCODE_F32_ABS
+0000020: 82 ; OPCODE_F32_SQRT
+0000021: 7e ; OPCODE_F32_CEIL
+0000022: 7f ; OPCODE_F32_FLOOR
+0000023: 80 ; OPCODE_F32_TRUNC
+0000024: 81 ; OPCODE_F32_NEAREST_INT
+0000025: 0d ; OPCODE_F32_CONST
+0000026: 0000 0000 ; f32 literal
+000002a: 90 ; OPCODE_F64_NEG
+000002b: 8f ; OPCODE_F64_ABS
+000002c: 96 ; OPCODE_F64_SQRT
+000002d: 92 ; OPCODE_F64_CEIL
+000002e: 93 ; OPCODE_F64_FLOOR
+000002f: 94 ; OPCODE_F64_TRUNC
+0000030: 95 ; OPCODE_F64_NEAREST_INT
+0000031: 0c ; OPCODE_F64_CONST
+0000032: 0000 0000 0000 0000 ; f64 literal
+0000011: 2700 ; FIXUP func body size
+000003a: 06 ; WASM_BINARY_SECTION_END
;; dump
0000000: 0061 736d 0a00 0000 0101 0000 0201 0000
-0000010: 002e 005a 5758 5909 0072 7374 0b00 0000
-0000020: 0000 0000 007c 7b82 7e7f 8081 0d00 0000
-0000030: 0090 8f96 9293 9495 0c00 0000 0000 0000
-0000040: 0006
+0000010: 0027 005a 5758 590a 0072 7374 0b00 7c7b
+0000020: 827e 7f80 810d 0000 0000 908f 9692 9394
+0000030: 950c 0000 0000 0000 0000 06
;;; STDOUT ;;)