diff options
author | Ben Smith <binji@chromium.org> | 2015-12-03 14:20:45 -0800 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2015-12-03 17:25:27 -0800 |
commit | 3334ddf0b47c607fe7b1e7cd0371edf781fc1491 (patch) | |
tree | aa46a304879e959dfcaa251368fee85051113e14 /test/dump | |
parent | e9a5e9aaa92048366cbdca9b82cc5fa07d46c755 (diff) | |
download | wabt-3334ddf0b47c607fe7b1e7cd0371edf781fc1491.tar.gz wabt-3334ddf0b47c607fe7b1e7cd0371edf781fc1491.tar.bz2 wabt-3334ddf0b47c607fe7b1e7cd0371edf781fc1491.zip |
don't write memory section if not specified
I originally did this to match the old binary generator, but it's not
necessary.
Diffstat (limited to 'test/dump')
48 files changed, 1674 insertions, 1866 deletions
diff --git a/test/dump/basic.txt b/test/dump/basic.txt index 60bd6d47..973407f0 100644 --- a/test/dump/basic.txt +++ b/test/dump/basic.txt @@ -6,46 +6,42 @@ (i32.add (get_local 0) (get_local 1))) (export "f" $f)) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 03 ; WASM_SECTION_GLOBALS -0000005: 01 ; num globals +0000000: 03 ; WASM_SECTION_GLOBALS +0000001: 01 ; num globals ; global header 0 -0000006: 0000 0000 ; global name offset -000000a: 04 ; global mem type -000000b: 00 ; export global -000000c: 01 ; WASM_SECTION_SIGNATURES -000000d: 01 ; num signatures +0000002: 0000 0000 ; global name offset +0000006: 04 ; global mem type +0000007: 00 ; export global +0000008: 01 ; WASM_SECTION_SIGNATURES +0000009: 01 ; num signatures ; signature 0 -000000e: 02 ; num params -000000f: 01 ; result_type -0000010: 01 ; param type -0000011: 01 ; param type -0000012: 02 ; WASM_SECTION_FUNCTIONS -0000013: 01 ; num functions +000000a: 02 ; num params +000000b: 01 ; result_type +000000c: 01 ; param type +000000d: 01 ; param type +000000e: 02 ; WASM_SECTION_FUNCTIONS +000000f: 01 ; num functions ; function 0 -0000014: 09 ; func flags -0000015: 0000 ; func signature index -0000017: 0000 0000 ; func name offset -000001b: 0000 ; func body size -000001d: 11 ; OPCODE_STORE_GLOBAL -000001e: 00 ; global index -000001f: 40 ; OPCODE_I32_ADD -0000020: 10 ; OPCODE_LOAD_GLOBAL -0000021: 00 ; global index -0000022: 09 ; OPCODE_I8_CONST -0000023: 01 ; u8 literal -0000024: 40 ; OPCODE_I32_ADD -0000025: 0e ; OPCODE_GET_LOCAL -0000026: 00 ; remapped local index -0000027: 0e ; OPCODE_GET_LOCAL -0000028: 01 ; remapped local index -000001b: 0c00 ; FIXUP func body size -0000029: 06 ; WASM_SECTION_END +0000010: 09 ; func flags +0000011: 0000 ; func signature index +0000013: 0000 0000 ; func name offset +0000017: 0000 ; func body size +0000019: 11 ; OPCODE_STORE_GLOBAL +000001a: 00 ; global index +000001b: 40 ; OPCODE_I32_ADD +000001c: 10 ; OPCODE_LOAD_GLOBAL +000001d: 00 ; global index +000001e: 09 ; OPCODE_I8_CONST +000001f: 01 ; u8 literal +0000020: 40 ; OPCODE_I32_ADD +0000021: 0e ; OPCODE_GET_LOCAL +0000022: 00 ; remapped local index +0000023: 0e ; OPCODE_GET_LOCAL +0000024: 01 ; remapped local index +0000017: 0c00 ; FIXUP func body size +0000025: 06 ; WASM_SECTION_END ; export 0 -0000017: 2a00 0000 ; FIXUP func name offset -000002a: 66 ; export name -000002b: 00 ; \0 +0000013: 2600 0000 ; FIXUP func name offset +0000026: 66 ; export name +0000027: 00 ; \0 ;;; STDOUT ;;) diff --git a/test/dump/binary.txt b/test/dump/binary.txt index df03c756..9659530f 100644 --- a/test/dump/binary.txt +++ b/test/dump/binary.txt @@ -92,35 +92,35 @@ )) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 40 ; OPCODE_I32_ADD -0000014: 41 ; OPCODE_I32_SUB -0000015: 42 ; OPCODE_I32_MUL -0000016: 43 ; OPCODE_I32_DIV_S -0000017: 44 ; OPCODE_I32_DIV_U -0000018: 45 ; OPCODE_I32_REM_S -0000019: 46 ; OPCODE_I32_REM_U -000001a: 47 ; OPCODE_I32_AND -000001b: 48 ; OPCODE_I32_OR -000001c: 49 ; OPCODE_I32_XOR -000001d: 4a ; OPCODE_I32_SHL -000001e: 4b ; OPCODE_I32_SHR_U -000001f: 4c ; OPCODE_I32_SHR_S +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 40 ; OPCODE_I32_ADD +0000010: 41 ; OPCODE_I32_SUB +0000011: 42 ; OPCODE_I32_MUL +0000012: 43 ; OPCODE_I32_DIV_S +0000013: 44 ; OPCODE_I32_DIV_U +0000014: 45 ; OPCODE_I32_REM_S +0000015: 46 ; OPCODE_I32_REM_U +0000016: 47 ; OPCODE_I32_AND +0000017: 48 ; OPCODE_I32_OR +0000018: 49 ; OPCODE_I32_XOR +0000019: 4a ; OPCODE_I32_SHL +000001a: 4b ; OPCODE_I32_SHR_U +000001b: 4c ; OPCODE_I32_SHR_S +000001c: 09 ; OPCODE_I8_CONST +000001d: 00 ; u8 literal +000001e: 09 ; OPCODE_I8_CONST +000001f: 00 ; u8 literal 0000020: 09 ; OPCODE_I8_CONST 0000021: 00 ; u8 literal 0000022: 09 ; OPCODE_I8_CONST @@ -145,97 +145,93 @@ 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 -000003c: 5b ; OPCODE_I64_ADD -000003d: 5c ; OPCODE_I64_SUB -000003e: 5d ; OPCODE_I64_MUL -000003f: 5e ; OPCODE_I64_DIV_S -0000040: 5f ; OPCODE_I64_DIV_U -0000041: 60 ; OPCODE_I64_REM_S -0000042: 61 ; OPCODE_I64_REM_U -0000043: 62 ; OPCODE_I64_AND -0000044: 63 ; OPCODE_I64_OR -0000045: 64 ; OPCODE_I64_XOR -0000046: 65 ; OPCODE_I64_SHL -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 -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_SECTION_END +0000038: 5b ; OPCODE_I64_ADD +0000039: 5c ; OPCODE_I64_SUB +000003a: 5d ; OPCODE_I64_MUL +000003b: 5e ; OPCODE_I64_DIV_S +000003c: 5f ; OPCODE_I64_DIV_U +000003d: 60 ; OPCODE_I64_REM_S +000003e: 61 ; OPCODE_I64_REM_U +000003f: 62 ; OPCODE_I64_AND +0000040: 63 ; OPCODE_I64_OR +0000041: 64 ; OPCODE_I64_XOR +0000042: 65 ; OPCODE_I64_SHL +0000043: 66 ; OPCODE_I64_SHR_U +0000044: 67 ; OPCODE_I64_SHR_S +0000045: 0b ; OPCODE_I64_CONST +0000046: 0000 0000 0000 0000 ; u64 literal +000004e: 0b ; OPCODE_I64_CONST +000004f: 0000 0000 0000 0000 ; u64 literal +0000057: 0b ; OPCODE_I64_CONST +0000058: 0000 0000 0000 0000 ; u64 literal +0000060: 0b ; OPCODE_I64_CONST +0000061: 0000 0000 0000 0000 ; u64 literal +0000069: 0b ; OPCODE_I64_CONST +000006a: 0000 0000 0000 0000 ; u64 literal +0000072: 0b ; OPCODE_I64_CONST +0000073: 0000 0000 0000 0000 ; u64 literal +000007b: 0b ; OPCODE_I64_CONST +000007c: 0000 0000 0000 0000 ; u64 literal +0000084: 0b ; OPCODE_I64_CONST +0000085: 0000 0000 0000 0000 ; u64 literal +000008d: 0b ; OPCODE_I64_CONST +000008e: 0000 0000 0000 0000 ; u64 literal +0000096: 0b ; OPCODE_I64_CONST +0000097: 0000 0000 0000 0000 ; u64 literal +000009f: 0b ; OPCODE_I64_CONST +00000a0: 0000 0000 0000 0000 ; u64 literal +00000a8: 0b ; OPCODE_I64_CONST +00000a9: 0000 0000 0000 0000 ; u64 literal +00000b1: 0b ; OPCODE_I64_CONST +00000b2: 0000 0000 0000 0000 ; u64 literal +00000ba: 0b ; OPCODE_I64_CONST +00000bb: 0000 0000 0000 0000 ; u64 literal +00000c3: 75 ; OPCODE_F32_ADD +00000c4: 76 ; OPCODE_F32_SUB +00000c5: 77 ; OPCODE_F32_MUL +00000c6: 78 ; OPCODE_F32_DIV +00000c7: 79 ; OPCODE_F32_MIN +00000c8: 7a ; OPCODE_F32_MAX +00000c9: 7d ; OPCODE_F32_COPYSIGN +00000ca: 0d ; OPCODE_F32_CONST +00000cb: 0000 0000 ; f32 literal +00000cf: 0d ; OPCODE_F32_CONST +00000d0: 0000 0000 ; f32 literal +00000d4: 0d ; OPCODE_F32_CONST +00000d5: 0000 0000 ; f32 literal +00000d9: 0d ; OPCODE_F32_CONST +00000da: 0000 0000 ; f32 literal +00000de: 0d ; OPCODE_F32_CONST +00000df: 0000 0000 ; f32 literal +00000e3: 0d ; OPCODE_F32_CONST +00000e4: 0000 0000 ; f32 literal +00000e8: 0d ; OPCODE_F32_CONST +00000e9: 0000 0000 ; f32 literal +00000ed: 0d ; OPCODE_F32_CONST +00000ee: 0000 0000 ; f32 literal +00000f2: 89 ; OPCODE_F64_ADD +00000f3: 8a ; OPCODE_F64_SUB +00000f4: 8b ; OPCODE_F64_MUL +00000f5: 8c ; OPCODE_F64_DIV +00000f6: 8d ; OPCODE_F64_MIN +00000f7: 8e ; OPCODE_F64_MAX +00000f8: 91 ; OPCODE_F64_COPYSIGN +00000f9: 0c ; OPCODE_F64_CONST +00000fa: 0000 0000 0000 0000 ; f64 literal +0000102: 0c ; OPCODE_F64_CONST +0000103: 0000 0000 0000 0000 ; f64 literal +000010b: 0c ; OPCODE_F64_CONST +000010c: 0000 0000 0000 0000 ; f64 literal +0000114: 0c ; OPCODE_F64_CONST +0000115: 0000 0000 0000 0000 ; f64 literal +000011d: 0c ; OPCODE_F64_CONST +000011e: 0000 0000 0000 0000 ; f64 literal +0000126: 0c ; OPCODE_F64_CONST +0000127: 0000 0000 0000 0000 ; f64 literal +000012f: 0c ; OPCODE_F64_CONST +0000130: 0000 0000 0000 0000 ; f64 literal +0000138: 0c ; OPCODE_F64_CONST +0000139: 0000 0000 0000 0000 ; f64 literal +000000d: 3201 ; FIXUP func body size +0000141: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/block.txt b/test/dump/block.txt index 5b14c97b..08557a87 100644 --- a/test/dump/block.txt +++ b/test/dump/block.txt @@ -10,40 +10,36 @@ (block (i32.const 1)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 02 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 02 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type +0000002: 00 ; num params +0000003: 00 ; result_type ; signature 1 -0000008: 00 ; num params -0000009: 01 ; result_type -000000a: 02 ; WASM_SECTION_FUNCTIONS -000000b: 02 ; num functions +0000004: 00 ; num params +0000005: 01 ; result_type +0000006: 02 ; WASM_SECTION_FUNCTIONS +0000007: 02 ; num functions ; function 0 -000000c: 01 ; func flags -000000d: 0000 ; func signature index -000000f: 0000 0000 ; func name offset -0000013: 0000 ; func body size -0000015: 01 ; OPCODE_BLOCK -0000016: 03 ; num expressions -0000017: 00 ; OPCODE_NOP -0000018: 00 ; OPCODE_NOP -0000019: 00 ; OPCODE_NOP -0000013: 0500 ; FIXUP func body size +0000008: 01 ; func flags +0000009: 0000 ; func signature index +000000b: 0000 0000 ; func name offset +000000f: 0000 ; func body size +0000011: 01 ; OPCODE_BLOCK +0000012: 03 ; num expressions +0000013: 00 ; OPCODE_NOP +0000014: 00 ; OPCODE_NOP +0000015: 00 ; OPCODE_NOP +000000f: 0500 ; FIXUP func body size ; function 1 -000001a: 01 ; func flags -000001b: 0100 ; func signature index -000001d: 0000 0000 ; func name offset -0000021: 0000 ; func body size -0000023: 01 ; OPCODE_BLOCK -0000024: 01 ; num expressions -0000025: 09 ; OPCODE_I8_CONST -0000026: 01 ; u8 literal -0000021: 0400 ; FIXUP func body size -0000027: 06 ; WASM_SECTION_END +0000016: 01 ; func flags +0000017: 0100 ; func signature index +0000019: 0000 0000 ; func name offset +000001d: 0000 ; func body size +000001f: 01 ; OPCODE_BLOCK +0000020: 01 ; num expressions +0000021: 09 ; OPCODE_I8_CONST +0000022: 01 ; u8 literal +000001d: 0400 ; FIXUP func body size +0000023: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/break-block-named.txt b/test/dump/break-block-named.txt index 44c20388..386b4090 100644 --- a/test/dump/break-block-named.txt +++ b/test/dump/break-block-named.txt @@ -9,38 +9,34 @@ (break $inner) (break $outer))))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 01 ; OPCODE_BLOCK +0000010: 01 ; num expressions +0000011: 02 ; OPCODE_LOOP +0000012: 01 ; num expressions 0000013: 01 ; OPCODE_BLOCK -0000014: 01 ; num expressions -0000015: 02 ; OPCODE_LOOP -0000016: 01 ; num expressions +0000014: 02 ; num expressions +0000015: 09 ; OPCODE_I8_CONST +0000016: 00 ; u8 literal 0000017: 01 ; OPCODE_BLOCK 0000018: 02 ; num expressions -0000019: 09 ; OPCODE_I8_CONST -000001a: 00 ; u8 literal -000001b: 01 ; OPCODE_BLOCK -000001c: 02 ; num expressions -000001d: 06 ; OPCODE_BR -000001e: 00 ; break depth -000001f: 00 ; OPCODE_NOP -0000020: 06 ; OPCODE_BR -0000021: 04 ; break depth -0000022: 00 ; OPCODE_NOP -0000011: 1000 ; FIXUP func body size -0000023: 06 ; WASM_SECTION_END +0000019: 06 ; OPCODE_BR +000001a: 00 ; break depth +000001b: 00 ; OPCODE_NOP +000001c: 06 ; OPCODE_BR +000001d: 04 ; break depth +000001e: 00 ; OPCODE_NOP +000000d: 1000 ; FIXUP func body size +000001f: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/break-block.txt b/test/dump/break-block.txt index 72290eb2..27aa0a51 100644 --- a/test/dump/break-block.txt +++ b/test/dump/break-block.txt @@ -11,44 +11,40 @@ (break 1) (break 2))))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 01 ; OPCODE_BLOCK +0000010: 01 ; num expressions +0000011: 02 ; OPCODE_LOOP +0000012: 01 ; num expressions 0000013: 01 ; OPCODE_BLOCK -0000014: 01 ; num expressions -0000015: 02 ; OPCODE_LOOP -0000016: 01 ; num expressions +0000014: 02 ; num expressions +0000015: 09 ; OPCODE_I8_CONST +0000016: 00 ; u8 literal 0000017: 01 ; OPCODE_BLOCK -0000018: 02 ; num expressions -0000019: 09 ; OPCODE_I8_CONST -000001a: 00 ; u8 literal -000001b: 01 ; OPCODE_BLOCK -000001c: 04 ; num expressions -000001d: 06 ; OPCODE_BR -000001e: 00 ; break depth -000001f: 00 ; OPCODE_NOP -0000020: 06 ; OPCODE_BR -0000021: 00 ; break depth -0000022: 00 ; OPCODE_NOP -0000023: 06 ; OPCODE_BR -0000024: 02 ; break depth -0000025: 00 ; OPCODE_NOP -0000026: 06 ; OPCODE_BR -0000027: 04 ; break depth -0000028: 00 ; OPCODE_NOP -0000011: 1600 ; FIXUP func body size -0000029: 06 ; WASM_SECTION_END +0000018: 04 ; num expressions +0000019: 06 ; OPCODE_BR +000001a: 00 ; break depth +000001b: 00 ; OPCODE_NOP +000001c: 06 ; OPCODE_BR +000001d: 00 ; break depth +000001e: 00 ; OPCODE_NOP +000001f: 06 ; OPCODE_BR +0000020: 02 ; break depth +0000021: 00 ; OPCODE_NOP +0000022: 06 ; OPCODE_BR +0000023: 04 ; break depth +0000024: 00 ; OPCODE_NOP +000000d: 1600 ; FIXUP func body size +0000025: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/break-label.txt b/test/dump/break-label.txt index 32d67375..52904e5a 100644 --- a/test/dump/break-label.txt +++ b/test/dump/break-label.txt @@ -7,33 +7,29 @@ (if (i32.const 1) (break $foo)))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 01 ; OPCODE_BLOCK -0000014: 01 ; num expressions -0000015: 01 ; OPCODE_BLOCK -0000016: 02 ; num expressions -0000017: 00 ; OPCODE_NOP -0000018: 03 ; OPCODE_IF -0000019: 09 ; OPCODE_I8_CONST -000001a: 01 ; u8 literal -000001b: 06 ; OPCODE_BR -000001c: 01 ; break depth -000001d: 00 ; OPCODE_NOP -0000011: 0b00 ; FIXUP func body size -000001e: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 01 ; OPCODE_BLOCK +0000010: 01 ; num expressions +0000011: 01 ; OPCODE_BLOCK +0000012: 02 ; num expressions +0000013: 00 ; OPCODE_NOP +0000014: 03 ; OPCODE_IF +0000015: 09 ; OPCODE_I8_CONST +0000016: 01 ; u8 literal +0000017: 06 ; OPCODE_BR +0000018: 01 ; break depth +0000019: 00 ; OPCODE_NOP +000000d: 0b00 ; FIXUP func body size +000001a: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/break-loop-inner-expr.txt b/test/dump/break-loop-inner-expr.txt index 115b9ffd..95baf698 100644 --- a/test/dump/break-loop-inner-expr.txt +++ b/test/dump/break-loop-inner-expr.txt @@ -8,40 +8,36 @@ (break $exit (i32.const 4))) (i32.const 5)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 02 ; OPCODE_LOOP -0000014: 03 ; num expressions -0000015: 03 ; OPCODE_IF +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 02 ; OPCODE_LOOP +0000010: 03 ; num expressions +0000011: 03 ; OPCODE_IF +0000012: 09 ; OPCODE_I8_CONST +0000013: 01 ; u8 literal +0000014: 06 ; OPCODE_BR +0000015: 00 ; break depth 0000016: 09 ; OPCODE_I8_CONST -0000017: 01 ; u8 literal -0000018: 06 ; OPCODE_BR -0000019: 00 ; break depth -000001a: 09 ; OPCODE_I8_CONST -000001b: 02 ; u8 literal -000001c: 03 ; OPCODE_IF +0000017: 02 ; u8 literal +0000018: 03 ; OPCODE_IF +0000019: 09 ; OPCODE_I8_CONST +000001a: 03 ; u8 literal +000001b: 06 ; OPCODE_BR +000001c: 01 ; break depth 000001d: 09 ; OPCODE_I8_CONST -000001e: 03 ; u8 literal -000001f: 06 ; OPCODE_BR -0000020: 01 ; break depth -0000021: 09 ; OPCODE_I8_CONST -0000022: 04 ; u8 literal -0000023: 09 ; OPCODE_I8_CONST -0000024: 05 ; u8 literal -0000011: 1200 ; FIXUP func body size -0000025: 06 ; WASM_SECTION_END +000001e: 04 ; u8 literal +000001f: 09 ; OPCODE_I8_CONST +0000020: 05 ; u8 literal +000000d: 1200 ; FIXUP func body size +0000021: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/break-loop-inner.txt b/test/dump/break-loop-inner.txt index adfcb69f..03d798fc 100644 --- a/test/dump/break-loop-inner.txt +++ b/test/dump/break-loop-inner.txt @@ -7,36 +7,32 @@ (if (i32.const 2) (break $cont))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 02 ; OPCODE_LOOP -0000014: 02 ; num expressions -0000015: 03 ; OPCODE_IF -0000016: 09 ; OPCODE_I8_CONST -0000017: 01 ; u8 literal -0000018: 06 ; OPCODE_BR -0000019: 01 ; break depth -000001a: 00 ; OPCODE_NOP -000001b: 03 ; OPCODE_IF -000001c: 09 ; OPCODE_I8_CONST -000001d: 02 ; u8 literal -000001e: 06 ; OPCODE_BR -000001f: 00 ; break depth -0000020: 00 ; OPCODE_NOP -0000011: 0e00 ; FIXUP func body size -0000021: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 02 ; OPCODE_LOOP +0000010: 02 ; num expressions +0000011: 03 ; OPCODE_IF +0000012: 09 ; OPCODE_I8_CONST +0000013: 01 ; u8 literal +0000014: 06 ; OPCODE_BR +0000015: 01 ; break depth +0000016: 00 ; OPCODE_NOP +0000017: 03 ; OPCODE_IF +0000018: 09 ; OPCODE_I8_CONST +0000019: 02 ; u8 literal +000001a: 06 ; OPCODE_BR +000001b: 00 ; break depth +000001c: 00 ; OPCODE_NOP +000000d: 0e00 ; FIXUP func body size +000001d: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/break-loop.txt b/test/dump/break-loop.txt index 0b77f464..bd9074a8 100644 --- a/test/dump/break-loop.txt +++ b/test/dump/break-loop.txt @@ -5,30 +5,26 @@ (if (i32.const 1) (break $cont))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 02 ; OPCODE_LOOP -0000014: 01 ; num expressions -0000015: 03 ; OPCODE_IF -0000016: 09 ; OPCODE_I8_CONST -0000017: 01 ; u8 literal -0000018: 06 ; OPCODE_BR -0000019: 00 ; break depth -000001a: 00 ; OPCODE_NOP -0000011: 0800 ; FIXUP func body size -000001b: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 02 ; OPCODE_LOOP +0000010: 01 ; num expressions +0000011: 03 ; OPCODE_IF +0000012: 09 ; OPCODE_I8_CONST +0000013: 01 ; u8 literal +0000014: 06 ; OPCODE_BR +0000015: 00 ; break depth +0000016: 00 ; OPCODE_NOP +000000d: 0800 ; FIXUP func body size +0000017: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/brif-loop.txt b/test/dump/brif-loop.txt index 1f6447b0..b9405983 100644 --- a/test/dump/brif-loop.txt +++ b/test/dump/brif-loop.txt @@ -4,29 +4,25 @@ (loop $cont (br_if $cont (i32.const 0))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 02 ; OPCODE_LOOP -0000014: 01 ; num expressions -0000015: 07 ; OPCODE_BR_IF -0000016: 00 ; break depth -0000017: 09 ; OPCODE_I8_CONST -0000018: 00 ; u8 literal -0000019: 00 ; OPCODE_NOP -0000011: 0700 ; FIXUP func body size -000001a: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 02 ; OPCODE_LOOP +0000010: 01 ; num expressions +0000011: 07 ; OPCODE_BR_IF +0000012: 00 ; break depth +0000013: 09 ; OPCODE_I8_CONST +0000014: 00 ; u8 literal +0000015: 00 ; OPCODE_NOP +000000d: 0700 ; FIXUP func body size +0000016: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/brif.txt b/test/dump/brif.txt index cb5bcf01..0c80f202 100644 --- a/test/dump/brif.txt +++ b/test/dump/brif.txt @@ -4,29 +4,25 @@ (block $foo (br_if $foo (i32.const 1))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 01 ; OPCODE_BLOCK -0000014: 01 ; num expressions -0000015: 07 ; OPCODE_BR_IF -0000016: 00 ; break depth -0000017: 09 ; OPCODE_I8_CONST -0000018: 01 ; u8 literal -0000019: 00 ; OPCODE_NOP -0000011: 0700 ; FIXUP func body size -000001a: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 01 ; OPCODE_BLOCK +0000010: 01 ; num expressions +0000011: 07 ; OPCODE_BR_IF +0000012: 00 ; break depth +0000013: 09 ; OPCODE_I8_CONST +0000014: 01 ; u8 literal +0000015: 00 ; OPCODE_NOP +000000d: 0700 ; FIXUP func body size +0000016: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/call.txt b/test/dump/call.txt index 8762582f..5e26c106 100644 --- a/test/dump/call.txt +++ b/test/dump/call.txt @@ -3,27 +3,23 @@ (func (param i32) (call 0 (i32.const 1)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 01 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type -0000009: 02 ; WASM_SECTION_FUNCTIONS -000000a: 01 ; num functions +0000002: 01 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type +0000005: 02 ; WASM_SECTION_FUNCTIONS +0000006: 01 ; num functions ; function 0 -000000b: 01 ; func flags -000000c: 0000 ; func signature index -000000e: 0000 0000 ; func name offset -0000012: 0000 ; func body size -0000014: 12 ; OPCODE_CALL_FUNCTION -0000015: 00 ; func index -0000016: 09 ; OPCODE_I8_CONST -0000017: 01 ; u8 literal -0000012: 0400 ; FIXUP func body size -0000018: 06 ; WASM_SECTION_END +0000007: 01 ; func flags +0000008: 0000 ; func signature index +000000a: 0000 0000 ; func name offset +000000e: 0000 ; func body size +0000010: 12 ; OPCODE_CALL_FUNCTION +0000011: 00 ; func index +0000012: 09 ; OPCODE_I8_CONST +0000013: 01 ; u8 literal +000000e: 0400 ; FIXUP func body size +0000014: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/callimport.txt b/test/dump/callimport.txt index ac83fb5d..96186251 100644 --- a/test/dump/callimport.txt +++ b/test/dump/callimport.txt @@ -10,43 +10,39 @@ ;; first. (call 0))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 02 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 02 ; num signatures ; signature 0 -0000006: 02 ; num params -0000007: 01 ; result_type -0000008: 01 ; param type -0000009: 03 ; param type +0000002: 02 ; num params +0000003: 01 ; result_type +0000004: 01 ; param type +0000005: 03 ; param type ; signature 1 -000000a: 00 ; num params -000000b: 01 ; result_type -000000c: 02 ; WASM_SECTION_FUNCTIONS -000000d: 02 ; num functions +0000006: 00 ; num params +0000007: 01 ; result_type +0000008: 02 ; WASM_SECTION_FUNCTIONS +0000009: 02 ; num functions ; import header 0 -000000e: 03 ; import flags -000000f: 0000 ; import signature index -0000011: 0000 0000 ; import name offset +000000a: 03 ; import flags +000000b: 0000 ; import signature index +000000d: 0000 0000 ; import name offset ; function 0 -0000015: 01 ; func flags -0000016: 0100 ; func signature index -0000018: 0000 0000 ; func name offset -000001c: 0000 ; func body size -000001e: 12 ; OPCODE_CALL_FUNCTION -000001f: 00 ; import index -0000020: 09 ; OPCODE_I8_CONST -0000021: 01 ; u8 literal -0000022: 0d ; OPCODE_F32_CONST -0000023: 0000 0040 ; f32 literal -0000027: 12 ; OPCODE_CALL_FUNCTION -0000028: 01 ; func index -000001c: 0b00 ; FIXUP func body size -0000029: 06 ; WASM_SECTION_END +0000011: 01 ; func flags +0000012: 0100 ; func signature index +0000014: 0000 0000 ; func name offset +0000018: 0000 ; func body size +000001a: 12 ; OPCODE_CALL_FUNCTION +000001b: 00 ; import index +000001c: 09 ; OPCODE_I8_CONST +000001d: 01 ; u8 literal +000001e: 0d ; OPCODE_F32_CONST +000001f: 0000 0040 ; f32 literal +0000023: 12 ; OPCODE_CALL_FUNCTION +0000024: 01 ; func index +0000018: 0b00 ; FIXUP func body size +0000025: 06 ; WASM_SECTION_END ; import 0 -0000011: 2a00 0000 ; FIXUP import name offset -000002a: 6261 72 ; import name -000002d: 00 ; \0 +000000d: 2600 0000 ; FIXUP import name offset +0000026: 6261 72 ; import name +0000029: 00 ; \0 ;;; STDOUT ;;) diff --git a/test/dump/callindirect.txt b/test/dump/callindirect.txt index 1c5a0252..c0bf93ce 100644 --- a/test/dump/callindirect.txt +++ b/test/dump/callindirect.txt @@ -5,32 +5,28 @@ (call_indirect $t (i32.const 0) (i32.const 0))) (table $f)) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 01 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type -0000009: 02 ; WASM_SECTION_FUNCTIONS -000000a: 01 ; num functions +0000002: 01 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type +0000005: 02 ; WASM_SECTION_FUNCTIONS +0000006: 01 ; num functions ; function 0 -000000b: 01 ; func flags -000000c: 0000 ; func signature index -000000e: 0000 0000 ; func name offset -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 -0000012: 0600 ; FIXUP func body size -000001a: 05 ; WASM_SECTION_FUNCTION_TABLE -000001b: 01 ; num function table entries -000001c: 0000 ; function table entry -000001e: 06 ; WASM_SECTION_END +0000007: 01 ; func flags +0000008: 0000 ; func signature index +000000a: 0000 0000 ; func name offset +000000e: 0000 ; func body size +0000010: 13 ; OPCODE_CALL_INDIRECT +0000011: 00 ; signature index +0000012: 09 ; OPCODE_I8_CONST +0000013: 00 ; u8 literal +0000014: 09 ; OPCODE_I8_CONST +0000015: 00 ; u8 literal +000000e: 0600 ; FIXUP func body size +0000016: 05 ; WASM_SECTION_FUNCTION_TABLE +0000017: 01 ; num function table entries +0000018: 0000 ; function table entry +000001a: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/cast.txt b/test/dump/cast.txt index 90396536..cb582949 100644 --- a/test/dump/cast.txt +++ b/test/dump/cast.txt @@ -7,34 +7,30 @@ (f64.reinterpret/i64 (i64.const 0)) (i64.reinterpret/f64 (f64.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: ad ; OPCODE_F32_REINTERPRET_I32 -0000014: 09 ; OPCODE_I8_CONST -0000015: 00 ; u8 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_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: ad ; OPCODE_F32_REINTERPRET_I32 +0000010: 09 ; OPCODE_I8_CONST +0000011: 00 ; u8 literal +0000012: b4 ; OPCODE_I32_REINTERPRET_F32 +0000013: 0d ; OPCODE_F32_CONST +0000014: 0000 0000 ; f32 literal +0000018: b3 ; OPCODE_F64_REINTERPRET_I64 +0000019: 0b ; OPCODE_I64_CONST +000001a: 0000 0000 0000 0000 ; u64 literal +0000022: b5 ; OPCODE_I64_REINTERPRET_F64 +0000023: 0c ; OPCODE_F64_CONST +0000024: 0000 0000 0000 0000 ; f64 literal +000000d: 1d00 ; FIXUP func body size +000002c: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/compare.txt b/test/dump/compare.txt index dba4f66a..5ed8fd3b 100644 --- a/test/dump/compare.txt +++ b/test/dump/compare.txt @@ -50,32 +50,32 @@ (f64.gt (f64.const 0) (f64.const 0)) (f64.ge (f64.const 0) (f64.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 4d ; OPCODE_I32_EQ -0000014: 4e ; OPCODE_I32_NE -0000015: 4f ; OPCODE_I32_LT_S -0000016: 51 ; OPCODE_I32_LT_U -0000017: 50 ; OPCODE_I32_LE_S -0000018: 52 ; OPCODE_I32_LE_U -0000019: 53 ; OPCODE_I32_GT_S -000001a: 55 ; OPCODE_I32_GT_U -000001b: 54 ; OPCODE_I32_GE_S -000001c: 56 ; OPCODE_I32_GE_U +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 4d ; OPCODE_I32_EQ +0000010: 4e ; OPCODE_I32_NE +0000011: 4f ; OPCODE_I32_LT_S +0000012: 51 ; OPCODE_I32_LT_U +0000013: 50 ; OPCODE_I32_LE_S +0000014: 52 ; OPCODE_I32_LE_U +0000015: 53 ; OPCODE_I32_GT_S +0000016: 55 ; OPCODE_I32_GT_U +0000017: 54 ; OPCODE_I32_GE_S +0000018: 56 ; OPCODE_I32_GE_U +0000019: 09 ; OPCODE_I8_CONST +000001a: 00 ; u8 literal +000001b: 09 ; OPCODE_I8_CONST +000001c: 00 ; u8 literal 000001d: 09 ; OPCODE_I8_CONST 000001e: 00 ; u8 literal 000001f: 09 ; OPCODE_I8_CONST @@ -94,120 +94,116 @@ 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 -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 -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_SECTION_END +000002f: 68 ; OPCODE_I64_EQ +0000030: 0b ; OPCODE_I64_CONST +0000031: 0000 0000 0000 0000 ; u64 literal +0000039: 0b ; OPCODE_I64_CONST +000003a: 0000 0000 0000 0000 ; u64 literal +0000042: 69 ; OPCODE_I64_NE +0000043: 0b ; OPCODE_I64_CONST +0000044: 0000 0000 0000 0000 ; u64 literal +000004c: 0b ; OPCODE_I64_CONST +000004d: 0000 0000 0000 0000 ; u64 literal +0000055: 6a ; OPCODE_I64_LT_S +0000056: 0b ; OPCODE_I64_CONST +0000057: 0000 0000 0000 0000 ; u64 literal +000005f: 0b ; OPCODE_I64_CONST +0000060: 0000 0000 0000 0000 ; u64 literal +0000068: 6c ; OPCODE_I64_LT_U +0000069: 0b ; OPCODE_I64_CONST +000006a: 0000 0000 0000 0000 ; u64 literal +0000072: 0b ; OPCODE_I64_CONST +0000073: 0000 0000 0000 0000 ; u64 literal +000007b: 6b ; OPCODE_I64_LE_S +000007c: 0b ; OPCODE_I64_CONST +000007d: 0000 0000 0000 0000 ; u64 literal +0000085: 0b ; OPCODE_I64_CONST +0000086: 0000 0000 0000 0000 ; u64 literal +000008e: 6d ; OPCODE_I64_LE_U +000008f: 0b ; OPCODE_I64_CONST +0000090: 0000 0000 0000 0000 ; u64 literal +0000098: 0b ; OPCODE_I64_CONST +0000099: 0000 0000 0000 0000 ; u64 literal +00000a1: 6e ; OPCODE_I64_GT_S +00000a2: 0b ; OPCODE_I64_CONST +00000a3: 0000 0000 0000 0000 ; u64 literal +00000ab: 0b ; OPCODE_I64_CONST +00000ac: 0000 0000 0000 0000 ; u64 literal +00000b4: 70 ; OPCODE_I64_GT_U +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: 6f ; OPCODE_I64_GE_S +00000c8: 0b ; OPCODE_I64_CONST +00000c9: 0000 0000 0000 0000 ; u64 literal +00000d1: 0b ; OPCODE_I64_CONST +00000d2: 0000 0000 0000 0000 ; u64 literal +00000da: 71 ; OPCODE_I64_GE_U +00000db: 0b ; OPCODE_I64_CONST +00000dc: 0000 0000 0000 0000 ; u64 literal +00000e4: 0b ; OPCODE_I64_CONST +00000e5: 0000 0000 0000 0000 ; u64 literal +00000ed: 83 ; OPCODE_F32_EQ +00000ee: 0d ; OPCODE_F32_CONST +00000ef: 0000 0000 ; f32 literal +00000f3: 0d ; OPCODE_F32_CONST +00000f4: 0000 0000 ; f32 literal +00000f8: 84 ; OPCODE_F32_NE +00000f9: 0d ; OPCODE_F32_CONST +00000fa: 0000 0000 ; f32 literal +00000fe: 0d ; OPCODE_F32_CONST +00000ff: 0000 0000 ; f32 literal +0000103: 85 ; OPCODE_F32_LT +0000104: 0d ; OPCODE_F32_CONST +0000105: 0000 0000 ; f32 literal +0000109: 0d ; OPCODE_F32_CONST +000010a: 0000 0000 ; f32 literal +000010e: 86 ; OPCODE_F32_LE +000010f: 0d ; OPCODE_F32_CONST +0000110: 0000 0000 ; f32 literal +0000114: 0d ; OPCODE_F32_CONST +0000115: 0000 0000 ; f32 literal +0000119: 87 ; OPCODE_F32_GT +000011a: 0d ; OPCODE_F32_CONST +000011b: 0000 0000 ; f32 literal +000011f: 0d ; OPCODE_F32_CONST +0000120: 0000 0000 ; f32 literal +0000124: 88 ; OPCODE_F32_GE +0000125: 0d ; OPCODE_F32_CONST +0000126: 0000 0000 ; f32 literal +000012a: 0d ; OPCODE_F32_CONST +000012b: 0000 0000 ; f32 literal +000012f: 97 ; OPCODE_F64_EQ +0000130: 0c ; OPCODE_F64_CONST +0000131: 0000 0000 0000 0000 ; f64 literal +0000139: 0c ; OPCODE_F64_CONST +000013a: 0000 0000 0000 0000 ; f64 literal +0000142: 98 ; OPCODE_F64_NE +0000143: 0c ; OPCODE_F64_CONST +0000144: 0000 0000 0000 0000 ; f64 literal +000014c: 0c ; OPCODE_F64_CONST +000014d: 0000 0000 0000 0000 ; f64 literal +0000155: 99 ; OPCODE_F64_LT +0000156: 0c ; OPCODE_F64_CONST +0000157: 0000 0000 0000 0000 ; f64 literal +000015f: 0c ; OPCODE_F64_CONST +0000160: 0000 0000 0000 0000 ; f64 literal +0000168: 9a ; OPCODE_F64_LE +0000169: 0c ; OPCODE_F64_CONST +000016a: 0000 0000 0000 0000 ; f64 literal +0000172: 0c ; OPCODE_F64_CONST +0000173: 0000 0000 0000 0000 ; f64 literal +000017b: 9b ; OPCODE_F64_GT +000017c: 0c ; OPCODE_F64_CONST +000017d: 0000 0000 0000 0000 ; f64 literal +0000185: 0c ; OPCODE_F64_CONST +0000186: 0000 0000 0000 0000 ; f64 literal +000018e: 9c ; OPCODE_F64_GE +000018f: 0c ; OPCODE_F64_CONST +0000190: 0000 0000 0000 0000 ; f64 literal +0000198: 0c ; OPCODE_F64_CONST +0000199: 0000 0000 0000 0000 ; f64 literal +000000d: 9201 ; FIXUP func body size +00001a1: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/const.txt b/test/dump/const.txt index ebbdd2cf..cd733a10 100644 --- a/test/dump/const.txt +++ b/test/dump/const.txt @@ -43,98 +43,94 @@ (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 09 ; OPCODE_I8_CONST -0000014: 00 ; u8 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 -0000050: 0d ; OPCODE_F32_CONST -0000051: 0000 0000 ; f32 literal -0000055: 0d ; OPCODE_F32_CONST -0000056: 1668 a965 ; f32 literal -000005a: 0d ; OPCODE_F32_CONST -000005b: 4020 4f37 ; f32 literal -000005f: 0d ; OPCODE_F32_CONST -0000060: 0000 c07f ; f32 literal -0000064: 0d ; OPCODE_F32_CONST -0000065: 0000 c0ff ; f32 literal -0000069: 0d ; OPCODE_F32_CONST -000006a: 0000 c07f ; f32 literal -000006e: 0d ; OPCODE_F32_CONST -000006f: bc0a 807f ; f32 literal -0000073: 0d ; OPCODE_F32_CONST -0000074: bc0a 80ff ; f32 literal -0000078: 0d ; OPCODE_F32_CONST -0000079: bc0a 807f ; f32 literal -000007d: 0d ; OPCODE_F32_CONST -000007e: 0000 807f ; 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_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 09 ; OPCODE_I8_CONST +0000010: 00 ; u8 literal +0000011: 0a ; OPCODE_I32_CONST +0000012: 0000 0080 ; u32 literal +0000016: 09 ; OPCODE_I8_CONST +0000017: ff ; u8 literal +0000018: 0a ; OPCODE_I32_CONST +0000019: 0000 0080 ; u32 literal +000001d: 09 ; OPCODE_I8_CONST +000001e: ff ; u8 literal +000001f: 0b ; OPCODE_I64_CONST +0000020: 0000 0000 0000 0000 ; u64 literal +0000028: 0b ; OPCODE_I64_CONST +0000029: 0000 0000 0000 0080 ; u64 literal +0000031: 0b ; OPCODE_I64_CONST +0000032: ffff ffff ffff ffff ; u64 literal +000003a: 0b ; OPCODE_I64_CONST +000003b: 0000 0000 0000 0080 ; u64 literal +0000043: 0b ; OPCODE_I64_CONST +0000044: ffff ffff ffff ffff ; u64 literal +000004c: 0d ; OPCODE_F32_CONST +000004d: 0000 0000 ; f32 literal +0000051: 0d ; OPCODE_F32_CONST +0000052: 1668 a965 ; f32 literal +0000056: 0d ; OPCODE_F32_CONST +0000057: 4020 4f37 ; f32 literal +000005b: 0d ; OPCODE_F32_CONST +000005c: 0000 c07f ; f32 literal +0000060: 0d ; OPCODE_F32_CONST +0000061: 0000 c0ff ; f32 literal +0000065: 0d ; OPCODE_F32_CONST +0000066: 0000 c07f ; f32 literal +000006a: 0d ; OPCODE_F32_CONST +000006b: bc0a 807f ; f32 literal +000006f: 0d ; OPCODE_F32_CONST +0000070: bc0a 80ff ; f32 literal +0000074: 0d ; OPCODE_F32_CONST +0000075: bc0a 807f ; f32 literal +0000079: 0d ; OPCODE_F32_CONST +000007a: 0000 807f ; f32 literal +000007e: 0d ; OPCODE_F32_CONST +000007f: 0000 80ff ; f32 literal +0000083: 0d ; OPCODE_F32_CONST +0000084: 0000 807f ; f32 literal +0000088: 0d ; OPCODE_F32_CONST +0000089: 0000 00bf ; f32 literal +000008d: 0d ; OPCODE_F32_CONST +000008e: db0f c940 ; f32 literal +0000092: 0c ; OPCODE_F64_CONST +0000093: 0000 0000 0000 0000 ; f64 literal +000009b: 0c ; OPCODE_F64_CONST +000009c: b856 0e3c dd9a efbf ; f64 literal +00000a4: 0c ; OPCODE_F64_CONST +00000a5: 182d 4454 fb21 1940 ; f64 literal +00000ad: 0c ; OPCODE_F64_CONST +00000ae: 0000 0000 0000 f87f ; f64 literal +00000b6: 0c ; OPCODE_F64_CONST +00000b7: 0000 0000 0000 f8ff ; f64 literal +00000bf: 0c ; OPCODE_F64_CONST +00000c0: 0000 0000 0000 f87f ; f64 literal +00000c8: 0c ; OPCODE_F64_CONST +00000c9: bc0a 0000 0000 f07f ; f64 literal +00000d1: 0c ; OPCODE_F64_CONST +00000d2: bc0a 0000 0000 f0ff ; f64 literal +00000da: 0c ; OPCODE_F64_CONST +00000db: bc0a 0000 0000 f07f ; f64 literal +00000e3: 0c ; OPCODE_F64_CONST +00000e4: 0000 0000 0000 f07f ; f64 literal +00000ec: 0c ; OPCODE_F64_CONST +00000ed: 0000 0000 0000 f0ff ; f64 literal +00000f5: 0c ; OPCODE_F64_CONST +00000f6: 0000 0000 0000 f07f ; f64 literal +00000fe: 0c ; OPCODE_F64_CONST +00000ff: 0000 0000 0000 e0bf ; f64 literal +0000107: 0c ; OPCODE_F64_CONST +0000108: 182d 4454 fb21 1940 ; f64 literal +000000d: 0101 ; FIXUP func body size +0000110: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/convert.txt b/test/dump/convert.txt index 3290eef1..5b27e9dc 100644 --- a/test/dump/convert.txt +++ b/test/dump/convert.txt @@ -25,49 +25,45 @@ (f32.demote/f64 (f64.promote/f32 (f32.const 0))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: a1 ; OPCODE_I32_CONVERT_I64 -0000014: a7 ; OPCODE_I64_UCONVERT_I32 -0000015: 9d ; OPCODE_I32_SCONVERT_F32 -0000016: a8 ; OPCODE_F32_SCONVERT_I32 -0000017: 9f ; OPCODE_I32_UCONVERT_F32 -0000018: a9 ; OPCODE_F32_UCONVERT_I32 -0000019: 9e ; OPCODE_I32_SCONVERT_F64 -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 -000001f: a2 ; OPCODE_I64_SCONVERT_F32 -0000020: aa ; OPCODE_F32_SCONVERT_I64 -0000021: a4 ; OPCODE_I64_UCONVERT_F32 -0000022: ab ; OPCODE_F32_UCONVERT_I64 -0000023: a3 ; OPCODE_I64_SCONVERT_F64 -0000024: b0 ; OPCODE_F64_SCONVERT_I64 -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 -000002a: ac ; OPCODE_F32_CONVERT_F64 -000002b: b2 ; OPCODE_F64_CONVERT_F32 -000002c: 0d ; OPCODE_F32_CONST -000002d: 0000 0000 ; f32 literal -0000011: 1e00 ; FIXUP func body size -0000031: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: a1 ; OPCODE_I32_CONVERT_I64 +0000010: a7 ; OPCODE_I64_UCONVERT_I32 +0000011: 9d ; OPCODE_I32_SCONVERT_F32 +0000012: a8 ; OPCODE_F32_SCONVERT_I32 +0000013: 9f ; OPCODE_I32_UCONVERT_F32 +0000014: a9 ; OPCODE_F32_UCONVERT_I32 +0000015: 9e ; OPCODE_I32_SCONVERT_F64 +0000016: ae ; OPCODE_F64_SCONVERT_I32 +0000017: a0 ; OPCODE_I32_UCONVERT_F64 +0000018: af ; OPCODE_F64_UCONVERT_I32 +0000019: 09 ; OPCODE_I8_CONST +000001a: 00 ; u8 literal +000001b: a2 ; OPCODE_I64_SCONVERT_F32 +000001c: aa ; OPCODE_F32_SCONVERT_I64 +000001d: a4 ; OPCODE_I64_UCONVERT_F32 +000001e: ab ; OPCODE_F32_UCONVERT_I64 +000001f: a3 ; OPCODE_I64_SCONVERT_F64 +0000020: b0 ; OPCODE_F64_SCONVERT_I64 +0000021: a5 ; OPCODE_I64_UCONVERT_F64 +0000022: b1 ; OPCODE_F64_UCONVERT_I64 +0000023: a6 ; OPCODE_I64_SCONVERT_I32 +0000024: 09 ; OPCODE_I8_CONST +0000025: 00 ; u8 literal +0000026: ac ; OPCODE_F32_CONVERT_F64 +0000027: b2 ; OPCODE_F64_CONVERT_F32 +0000028: 0d ; OPCODE_F32_CONST +0000029: 0000 0000 ; f32 literal +000000d: 1e00 ; FIXUP func body size +000002d: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/dedupe-sig.txt b/test/dump/dedupe-sig.txt index d76209a8..22fcd41e 100644 --- a/test/dump/dedupe-sig.txt +++ b/test/dump/dedupe-sig.txt @@ -4,33 +4,29 @@ (func (param i32) (result i64) (i64.const 0)) (import "foo" "bar" (param i32) (result i64))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 01 ; num params -0000007: 02 ; result_type -0000008: 01 ; param type -0000009: 02 ; WASM_SECTION_FUNCTIONS -000000a: 02 ; num functions +0000002: 01 ; num params +0000003: 02 ; result_type +0000004: 01 ; param type +0000005: 02 ; WASM_SECTION_FUNCTIONS +0000006: 02 ; num functions ; import header 0 -000000b: 03 ; import flags -000000c: 0000 ; import signature index -000000e: 0000 0000 ; import name offset +0000007: 03 ; import flags +0000008: 0000 ; import signature index +000000a: 0000 0000 ; import name offset ; function 0 -0000012: 01 ; func flags -0000013: 0000 ; func signature index -0000015: 0000 0000 ; func name offset -0000019: 0000 ; func body size -000001b: 0b ; OPCODE_I64_CONST -000001c: 0000 0000 0000 0000 ; u64 literal -0000019: 0900 ; FIXUP func body size -0000024: 06 ; WASM_SECTION_END +000000e: 01 ; func flags +000000f: 0000 ; func signature index +0000011: 0000 0000 ; func name offset +0000015: 0000 ; func body size +0000017: 0b ; OPCODE_I64_CONST +0000018: 0000 0000 0000 0000 ; u64 literal +0000015: 0900 ; FIXUP func body size +0000020: 06 ; WASM_SECTION_END ; import 0 -000000e: 2500 0000 ; FIXUP import name offset -0000025: 6261 72 ; import name -0000028: 00 ; \0 +000000a: 2100 0000 ; FIXUP import name offset +0000021: 6261 72 ; import name +0000024: 00 ; \0 ;;; STDOUT ;;) diff --git a/test/dump/expr-break.txt b/test/dump/expr-break.txt index 7fd70799..0456eb3d 100644 --- a/test/dump/expr-break.txt +++ b/test/dump/expr-break.txt @@ -4,28 +4,24 @@ (label (break 0 (i32.const 1))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 01 ; OPCODE_BLOCK -0000014: 01 ; num expressions -0000015: 06 ; OPCODE_BR -0000016: 00 ; break depth -0000017: 09 ; OPCODE_I8_CONST -0000018: 01 ; u8 literal -0000011: 0600 ; FIXUP func body size -0000019: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 01 ; OPCODE_BLOCK +0000010: 01 ; num expressions +0000011: 06 ; OPCODE_BR +0000012: 00 ; break depth +0000013: 09 ; OPCODE_I8_CONST +0000014: 01 ; u8 literal +000000d: 0600 ; FIXUP func body size +0000015: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/func-exported.txt b/test/dump/func-exported.txt index eb0676c0..b094646d 100644 --- a/test/dump/func-exported.txt +++ b/test/dump/func-exported.txt @@ -3,26 +3,22 @@ (func) (export "foo" 0)) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 09 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000011: 0000 ; FIXUP func body size -0000013: 06 ; WASM_SECTION_END +0000006: 09 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000d: 0000 ; FIXUP func body size +000000f: 06 ; WASM_SECTION_END ; export 0 -000000d: 1400 0000 ; FIXUP func name offset -0000014: 666f 6f ; export name -0000017: 00 ; \0 +0000009: 1000 0000 ; FIXUP func name offset +0000010: 666f 6f ; export name +0000013: 00 ; \0 ;;; STDOUT ;;) diff --git a/test/dump/func-multi.txt b/test/dump/func-multi.txt index 8ac1be89..04d9f28c 100644 --- a/test/dump/func-multi.txt +++ b/test/dump/func-multi.txt @@ -4,34 +4,30 @@ (func) (func)) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 03 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 03 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000011: 0000 ; FIXUP func body size +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000d: 0000 ; FIXUP func body size ; function 1 -0000013: 01 ; func flags -0000014: 0000 ; func signature index -0000016: 0000 0000 ; func name offset -000001a: 0000 ; func body size -000001a: 0000 ; FIXUP func body size +000000f: 01 ; func flags +0000010: 0000 ; func signature index +0000012: 0000 0000 ; func name offset +0000016: 0000 ; func body size +0000016: 0000 ; FIXUP func body size ; function 2 -000001c: 01 ; func flags -000001d: 0000 ; func signature index -000001f: 0000 0000 ; func name offset -0000023: 0000 ; func body size -0000023: 0000 ; FIXUP func body size -0000025: 06 ; WASM_SECTION_END +0000018: 01 ; func flags +0000019: 0000 ; func signature index +000001b: 0000 0000 ; func name offset +000001f: 0000 ; func body size +000001f: 0000 ; FIXUP func body size +0000021: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/func-named.txt b/test/dump/func-named.txt index f38a80bf..5996fc40 100644 --- a/test/dump/func-named.txt +++ b/test/dump/func-named.txt @@ -2,22 +2,18 @@ (module (func $my-func)) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000011: 0000 ; FIXUP func body size -0000013: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000d: 0000 ; FIXUP func body size +000000f: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/getlocal-param.txt b/test/dump/getlocal-param.txt index 18734afd..0d9aa706 100644 --- a/test/dump/getlocal-param.txt +++ b/test/dump/getlocal-param.txt @@ -13,40 +13,36 @@ (get_local 4) (get_local 5))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 02 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type -0000009: 03 ; param type -000000a: 02 ; WASM_SECTION_FUNCTIONS -000000b: 01 ; num functions +0000002: 02 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type +0000005: 03 ; param type +0000006: 02 ; WASM_SECTION_FUNCTIONS +0000007: 01 ; num functions ; function 0 -000000c: 05 ; func flags -000000d: 0000 ; func signature index -000000f: 0000 0000 ; func name offset -0000013: 0100 ; num local i32 -0000015: 0100 ; num local i64 -0000017: 0200 ; num local f32 -0000019: 0000 ; num local f64 -000001b: 0000 ; func body size +0000008: 05 ; func flags +0000009: 0000 ; func signature index +000000b: 0000 0000 ; func name offset +000000f: 0100 ; num local i32 +0000011: 0100 ; num local i64 +0000013: 0200 ; num local f32 +0000015: 0000 ; num local f64 +0000017: 0000 ; func body size +0000019: 0e ; OPCODE_GET_LOCAL +000001a: 00 ; remapped local index +000001b: 0e ; OPCODE_GET_LOCAL +000001c: 01 ; remapped local index 000001d: 0e ; OPCODE_GET_LOCAL -000001e: 00 ; remapped local index +000001e: 03 ; remapped local index 000001f: 0e ; OPCODE_GET_LOCAL -0000020: 01 ; remapped local index +0000020: 04 ; remapped local index 0000021: 0e ; OPCODE_GET_LOCAL -0000022: 03 ; remapped local index +0000022: 02 ; remapped local index 0000023: 0e ; OPCODE_GET_LOCAL -0000024: 04 ; remapped local index -0000025: 0e ; OPCODE_GET_LOCAL -0000026: 02 ; remapped local index -0000027: 0e ; OPCODE_GET_LOCAL -0000028: 05 ; remapped local index -000001b: 0c00 ; FIXUP func body size -0000029: 06 ; WASM_SECTION_END +0000024: 05 ; remapped local index +0000017: 0c00 ; FIXUP func body size +0000025: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/getlocal.txt b/test/dump/getlocal.txt index d22cb2ca..58e1c0be 100644 --- a/test/dump/getlocal.txt +++ b/test/dump/getlocal.txt @@ -15,42 +15,38 @@ (get_local 6) (get_local 7))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 05 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0200 ; num local i32 -0000013: 0200 ; num local i64 -0000015: 0200 ; num local f32 -0000017: 0200 ; num local f64 -0000019: 0000 ; func body size +0000006: 05 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0200 ; num local i32 +000000f: 0200 ; num local i64 +0000011: 0200 ; num local f32 +0000013: 0200 ; num local f64 +0000015: 0000 ; func body size +0000017: 0e ; OPCODE_GET_LOCAL +0000018: 06 ; remapped local index +0000019: 0e ; OPCODE_GET_LOCAL +000001a: 04 ; remapped local index 000001b: 0e ; OPCODE_GET_LOCAL -000001c: 06 ; remapped local index +000001c: 02 ; remapped local index 000001d: 0e ; OPCODE_GET_LOCAL -000001e: 04 ; remapped local index +000001e: 00 ; remapped local index 000001f: 0e ; OPCODE_GET_LOCAL -0000020: 02 ; remapped local index +0000020: 01 ; remapped local index 0000021: 0e ; OPCODE_GET_LOCAL -0000022: 00 ; remapped local index +0000022: 05 ; remapped local index 0000023: 0e ; OPCODE_GET_LOCAL -0000024: 01 ; remapped local index +0000024: 07 ; remapped local index 0000025: 0e ; OPCODE_GET_LOCAL -0000026: 05 ; remapped local index -0000027: 0e ; OPCODE_GET_LOCAL -0000028: 07 ; remapped local index -0000029: 0e ; OPCODE_GET_LOCAL -000002a: 03 ; remapped local index -0000019: 1000 ; FIXUP func body size -000002b: 06 ; WASM_SECTION_END +0000026: 03 ; remapped local index +0000015: 1000 ; FIXUP func body size +0000027: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/global-multi.txt b/test/dump/global-multi.txt index 59af5bbb..3e652a44 100644 --- a/test/dump/global-multi.txt +++ b/test/dump/global-multi.txt @@ -2,27 +2,23 @@ (module (global i32 i64 f32 f64)) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 03 ; WASM_SECTION_GLOBALS -0000005: 04 ; num globals +0000000: 03 ; WASM_SECTION_GLOBALS +0000001: 04 ; num globals ; global header 0 -0000006: 0000 0000 ; global name offset -000000a: 04 ; global mem type -000000b: 00 ; export global +0000002: 0000 0000 ; global name offset +0000006: 04 ; global mem type +0000007: 00 ; export global ; global header 1 -000000c: 0000 0000 ; global name offset -0000010: 06 ; global mem type -0000011: 00 ; export global +0000008: 0000 0000 ; global name offset +000000c: 06 ; global mem type +000000d: 00 ; export global ; global header 2 -0000012: 0000 0000 ; global name offset -0000016: 08 ; global mem type -0000017: 00 ; export global +000000e: 0000 0000 ; global name offset +0000012: 08 ; global mem type +0000013: 00 ; export global ; global header 3 -0000018: 0000 0000 ; global name offset -000001c: 09 ; global mem type -000001d: 00 ; export global -000001e: 06 ; WASM_SECTION_END +0000014: 0000 0000 ; global name offset +0000018: 09 ; global mem type +0000019: 00 ; export global +000001a: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/if.txt b/test/dump/if.txt index 408d2101..853c42eb 100644 --- a/test/dump/if.txt +++ b/test/dump/if.txt @@ -6,44 +6,40 @@ (func (if_else (i32.const 1) (return) (return)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 02 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 02 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 03 ; OPCODE_IF +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 03 ; OPCODE_IF +0000010: 09 ; OPCODE_I8_CONST +0000011: 01 ; u8 literal +0000012: 00 ; OPCODE_NOP +0000013: 04 ; OPCODE_IF_THEN 0000014: 09 ; OPCODE_I8_CONST -0000015: 01 ; u8 literal -0000016: 00 ; OPCODE_NOP -0000017: 04 ; OPCODE_IF_THEN -0000018: 09 ; OPCODE_I8_CONST -0000019: 00 ; u8 literal -000001a: 0d ; OPCODE_F32_CONST -000001b: 0000 803f ; f32 literal -000001f: 0d ; OPCODE_F32_CONST -0000020: 0000 0040 ; f32 literal -0000011: 1100 ; FIXUP func body size +0000015: 00 ; u8 literal +0000016: 0d ; OPCODE_F32_CONST +0000017: 0000 803f ; f32 literal +000001b: 0d ; OPCODE_F32_CONST +000001c: 0000 0040 ; f32 literal +000000d: 1100 ; FIXUP func body size ; function 1 -0000024: 01 ; func flags -0000025: 0000 ; func signature index -0000027: 0000 0000 ; func name offset -000002b: 0000 ; func body size -000002d: 04 ; OPCODE_IF_THEN -000002e: 09 ; OPCODE_I8_CONST -000002f: 01 ; u8 literal -0000030: 14 ; OPCODE_RETURN -0000031: 14 ; OPCODE_RETURN -000002b: 0500 ; FIXUP func body size -0000032: 06 ; WASM_SECTION_END +0000020: 01 ; func flags +0000021: 0000 ; func signature index +0000023: 0000 0000 ; func name offset +0000027: 0000 ; func body size +0000029: 04 ; OPCODE_IF_THEN +000002a: 09 ; OPCODE_I8_CONST +000002b: 01 ; u8 literal +000002c: 14 ; OPCODE_RETURN +000002d: 14 ; OPCODE_RETURN +0000027: 0500 ; FIXUP func body size +000002e: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/import.txt b/test/dump/import.txt index 71da48ef..0e40c2e9 100644 --- a/test/dump/import.txt +++ b/test/dump/import.txt @@ -4,40 +4,36 @@ (import "ignored" "test" (param i32 i64 f32 f64)) (import "ignored" "test2" (param i32) (result i32))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 02 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 02 ; num signatures ; signature 0 -0000006: 04 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type -0000009: 02 ; param type -000000a: 03 ; param type -000000b: 04 ; param type +0000002: 04 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type +0000005: 02 ; param type +0000006: 03 ; param type +0000007: 04 ; param type ; signature 1 -000000c: 01 ; num params -000000d: 01 ; result_type -000000e: 01 ; param type -000000f: 02 ; WASM_SECTION_FUNCTIONS -0000010: 02 ; num functions +0000008: 01 ; num params +0000009: 01 ; result_type +000000a: 01 ; param type +000000b: 02 ; WASM_SECTION_FUNCTIONS +000000c: 02 ; num functions ; import header 0 -0000011: 03 ; import flags -0000012: 0000 ; import signature index -0000014: 0000 0000 ; import name offset +000000d: 03 ; import flags +000000e: 0000 ; import signature index +0000010: 0000 0000 ; import name offset ; import header 1 -0000018: 03 ; import flags -0000019: 0100 ; import signature index -000001b: 0000 0000 ; import name offset -000001f: 06 ; WASM_SECTION_END +0000014: 03 ; import flags +0000015: 0100 ; import signature index +0000017: 0000 0000 ; import name offset +000001b: 06 ; WASM_SECTION_END ; import 0 -0000014: 2000 0000 ; FIXUP import name offset -0000020: 7465 7374 ; import name -0000024: 00 ; \0 +0000010: 1c00 0000 ; FIXUP import name offset +000001c: 7465 7374 ; import name +0000020: 00 ; \0 ; import 1 -000001b: 2500 0000 ; FIXUP import name offset -0000025: 7465 7374 32 ; import name -000002a: 00 ; \0 +0000017: 2100 0000 ; FIXUP import name offset +0000021: 7465 7374 32 ; import name +0000026: 00 ; \0 ;;; STDOUT ;;) diff --git a/test/dump/load-aligned.txt b/test/dump/load-aligned.txt index c6c3b5e9..e2772c8c 100644 --- a/test/dump/load-aligned.txt +++ b/test/dump/load-aligned.txt @@ -36,22 +36,22 @@ (i64.load32_s align=4 (i32.const 0)) (i64.load32_s align=8 (i32.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 20 ; OPCODE_I32_LOAD_MEM8_S +0000010: 00 ; load access byte +0000011: 09 ; OPCODE_I8_CONST +0000012: 00 ; u8 literal 0000013: 20 ; OPCODE_I32_LOAD_MEM8_S 0000014: 00 ; load access byte 0000015: 09 ; OPCODE_I8_CONST @@ -64,7 +64,7 @@ 000001c: 00 ; load access byte 000001d: 09 ; OPCODE_I8_CONST 000001e: 00 ; u8 literal -000001f: 20 ; OPCODE_I32_LOAD_MEM8_S +000001f: 22 ; OPCODE_I32_LOAD_MEM16_S 0000020: 00 ; load access byte 0000021: 09 ; OPCODE_I8_CONST 0000022: 00 ; u8 literal @@ -80,7 +80,7 @@ 000002c: 00 ; load access byte 000002d: 09 ; OPCODE_I8_CONST 000002e: 00 ; u8 literal -000002f: 22 ; OPCODE_I32_LOAD_MEM16_S +000002f: 2a ; OPCODE_I32_LOAD_MEM 0000030: 00 ; load access byte 0000031: 09 ; OPCODE_I8_CONST 0000032: 00 ; u8 literal @@ -96,7 +96,7 @@ 000003c: 00 ; load access byte 000003d: 09 ; OPCODE_I8_CONST 000003e: 00 ; u8 literal -000003f: 2a ; OPCODE_I32_LOAD_MEM +000003f: 2b ; OPCODE_I64_LOAD_MEM 0000040: 00 ; load access byte 0000041: 09 ; OPCODE_I8_CONST 0000042: 00 ; u8 literal @@ -112,7 +112,7 @@ 000004c: 00 ; load access byte 000004d: 09 ; OPCODE_I8_CONST 000004e: 00 ; u8 literal -000004f: 2b ; OPCODE_I64_LOAD_MEM +000004f: 24 ; OPCODE_I64_LOAD_MEM8_S 0000050: 00 ; load access byte 0000051: 09 ; OPCODE_I8_CONST 0000052: 00 ; u8 literal @@ -128,7 +128,7 @@ 000005c: 00 ; load access byte 000005d: 09 ; OPCODE_I8_CONST 000005e: 00 ; u8 literal -000005f: 24 ; OPCODE_I64_LOAD_MEM8_S +000005f: 26 ; OPCODE_I64_LOAD_MEM16_S 0000060: 00 ; load access byte 0000061: 09 ; OPCODE_I8_CONST 0000062: 00 ; u8 literal @@ -144,7 +144,7 @@ 000006c: 00 ; load access byte 000006d: 09 ; OPCODE_I8_CONST 000006e: 00 ; u8 literal -000006f: 26 ; OPCODE_I64_LOAD_MEM16_S +000006f: 28 ; OPCODE_I64_LOAD_MEM32_S 0000070: 00 ; load access byte 0000071: 09 ; OPCODE_I8_CONST 0000072: 00 ; u8 literal @@ -160,10 +160,6 @@ 000007c: 00 ; load access byte 000007d: 09 ; OPCODE_I8_CONST 000007e: 00 ; u8 literal -000007f: 28 ; OPCODE_I64_LOAD_MEM32_S -0000080: 00 ; load access byte -0000081: 09 ; OPCODE_I8_CONST -0000082: 00 ; u8 literal -0000011: 7000 ; FIXUP func body size -0000083: 06 ; WASM_SECTION_END +000000d: 7000 ; FIXUP func body size +000007f: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/load.txt b/test/dump/load.txt index effb27e8..b2d1dfc5 100644 --- a/test/dump/load.txt +++ b/test/dump/load.txt @@ -16,78 +16,74 @@ (f32.load (i32.const 0)) (f64.load (i32.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 2a ; OPCODE_I32_LOAD_MEM +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 2a ; OPCODE_I32_LOAD_MEM +0000010: 00 ; load access byte +0000011: 09 ; OPCODE_I8_CONST +0000012: 00 ; u8 literal +0000013: 20 ; OPCODE_I32_LOAD_MEM8_S 0000014: 00 ; load access byte 0000015: 09 ; OPCODE_I8_CONST 0000016: 00 ; u8 literal -0000017: 20 ; OPCODE_I32_LOAD_MEM8_S +0000017: 22 ; OPCODE_I32_LOAD_MEM16_S 0000018: 00 ; load access byte 0000019: 09 ; OPCODE_I8_CONST 000001a: 00 ; u8 literal -000001b: 22 ; OPCODE_I32_LOAD_MEM16_S +000001b: 21 ; OPCODE_I32_LOAD_MEM8_U 000001c: 00 ; load access byte 000001d: 09 ; OPCODE_I8_CONST 000001e: 00 ; u8 literal -000001f: 21 ; OPCODE_I32_LOAD_MEM8_U +000001f: 23 ; OPCODE_I32_LOAD_MEM16_U 0000020: 00 ; load access byte 0000021: 09 ; OPCODE_I8_CONST 0000022: 00 ; u8 literal -0000023: 23 ; OPCODE_I32_LOAD_MEM16_U +0000023: 2b ; OPCODE_I64_LOAD_MEM 0000024: 00 ; load access byte 0000025: 09 ; OPCODE_I8_CONST 0000026: 00 ; u8 literal -0000027: 2b ; OPCODE_I64_LOAD_MEM +0000027: 24 ; OPCODE_I64_LOAD_MEM8_S 0000028: 00 ; load access byte 0000029: 09 ; OPCODE_I8_CONST 000002a: 00 ; u8 literal -000002b: 24 ; OPCODE_I64_LOAD_MEM8_S +000002b: 26 ; OPCODE_I64_LOAD_MEM16_S 000002c: 00 ; load access byte 000002d: 09 ; OPCODE_I8_CONST 000002e: 00 ; u8 literal -000002f: 26 ; OPCODE_I64_LOAD_MEM16_S +000002f: 28 ; OPCODE_I64_LOAD_MEM32_S 0000030: 00 ; load access byte 0000031: 09 ; OPCODE_I8_CONST 0000032: 00 ; u8 literal -0000033: 28 ; OPCODE_I64_LOAD_MEM32_S +0000033: 25 ; OPCODE_I64_LOAD_MEM8_U 0000034: 00 ; load access byte 0000035: 09 ; OPCODE_I8_CONST 0000036: 00 ; u8 literal -0000037: 25 ; OPCODE_I64_LOAD_MEM8_U +0000037: 27 ; OPCODE_I64_LOAD_MEM16_U 0000038: 00 ; load access byte 0000039: 09 ; OPCODE_I8_CONST 000003a: 00 ; u8 literal -000003b: 27 ; OPCODE_I64_LOAD_MEM16_U +000003b: 29 ; OPCODE_I64_LOAD_MEM32_U 000003c: 00 ; load access byte 000003d: 09 ; OPCODE_I8_CONST 000003e: 00 ; u8 literal -000003f: 29 ; OPCODE_I64_LOAD_MEM32_U +000003f: 2c ; OPCODE_F32_LOAD_MEM 0000040: 00 ; load access byte 0000041: 09 ; OPCODE_I8_CONST 0000042: 00 ; u8 literal -0000043: 2c ; OPCODE_F32_LOAD_MEM +0000043: 2d ; OPCODE_F64_LOAD_MEM 0000044: 00 ; load access byte 0000045: 09 ; OPCODE_I8_CONST 0000046: 00 ; u8 literal -0000047: 2d ; OPCODE_F64_LOAD_MEM -0000048: 00 ; load access byte -0000049: 09 ; OPCODE_I8_CONST -000004a: 00 ; u8 literal -0000011: 3800 ; FIXUP func body size -000004b: 06 ; WASM_SECTION_END +000000d: 3800 ; FIXUP func body size +0000047: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/loadglobal.txt b/test/dump/loadglobal.txt index 752df72f..445b31b3 100644 --- a/test/dump/loadglobal.txt +++ b/test/dump/loadglobal.txt @@ -7,48 +7,44 @@ (load_global 2) (load_global 3))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 03 ; WASM_SECTION_GLOBALS -0000005: 04 ; num globals +0000000: 03 ; WASM_SECTION_GLOBALS +0000001: 04 ; num globals ; global header 0 -0000006: 0000 0000 ; global name offset -000000a: 04 ; global mem type -000000b: 00 ; export global +0000002: 0000 0000 ; global name offset +0000006: 04 ; global mem type +0000007: 00 ; export global ; global header 1 -000000c: 0000 0000 ; global name offset -0000010: 06 ; global mem type -0000011: 00 ; export global +0000008: 0000 0000 ; global name offset +000000c: 06 ; global mem type +000000d: 00 ; export global ; global header 2 -0000012: 0000 0000 ; global name offset -0000016: 08 ; global mem type -0000017: 00 ; export global +000000e: 0000 0000 ; global name offset +0000012: 08 ; global mem type +0000013: 00 ; export global ; global header 3 -0000018: 0000 0000 ; global name offset -000001c: 09 ; global mem type -000001d: 00 ; export global -000001e: 01 ; WASM_SECTION_SIGNATURES -000001f: 01 ; num signatures +0000014: 0000 0000 ; global name offset +0000018: 09 ; global mem type +0000019: 00 ; export global +000001a: 01 ; WASM_SECTION_SIGNATURES +000001b: 01 ; num signatures ; signature 0 -0000020: 00 ; num params -0000021: 00 ; result_type -0000022: 02 ; WASM_SECTION_FUNCTIONS -0000023: 01 ; num functions +000001c: 00 ; num params +000001d: 00 ; result_type +000001e: 02 ; WASM_SECTION_FUNCTIONS +000001f: 01 ; num functions ; function 0 -0000024: 01 ; func flags -0000025: 0000 ; func signature index -0000027: 0000 0000 ; func name offset -000002b: 0000 ; func body size +0000020: 01 ; func flags +0000021: 0000 ; func signature index +0000023: 0000 0000 ; func name offset +0000027: 0000 ; func body size +0000029: 10 ; OPCODE_LOAD_GLOBAL +000002a: 00 ; global index +000002b: 10 ; OPCODE_LOAD_GLOBAL +000002c: 01 ; global index 000002d: 10 ; OPCODE_LOAD_GLOBAL -000002e: 00 ; global index +000002e: 02 ; global index 000002f: 10 ; OPCODE_LOAD_GLOBAL -0000030: 01 ; global index -0000031: 10 ; OPCODE_LOAD_GLOBAL -0000032: 02 ; global index -0000033: 10 ; OPCODE_LOAD_GLOBAL -0000034: 03 ; global index -000002b: 0800 ; FIXUP func body size -0000035: 06 ; WASM_SECTION_END +0000030: 03 ; global index +0000027: 0800 ; FIXUP func body size +0000031: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/locals.txt b/test/dump/locals.txt index f35d88fa..6979667b 100644 --- a/test/dump/locals.txt +++ b/test/dump/locals.txt @@ -2,26 +2,22 @@ (module (func (local i32 i64 i64 f32 f32 f32 f64 f64 f64 f64))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 05 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0100 ; num local i32 -0000013: 0200 ; num local i64 -0000015: 0300 ; num local f32 -0000017: 0400 ; num local f64 -0000019: 0000 ; func body size -0000019: 0000 ; FIXUP func body size -000001b: 06 ; WASM_SECTION_END +0000006: 05 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0100 ; num local i32 +000000f: 0200 ; num local i64 +0000011: 0300 ; num local f32 +0000013: 0400 ; num local f64 +0000015: 0000 ; func body size +0000015: 0000 ; FIXUP func body size +0000017: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/loop.txt b/test/dump/loop.txt index b0ca3de0..87024491 100644 --- a/test/dump/loop.txt +++ b/test/dump/loop.txt @@ -5,26 +5,22 @@ (nop) (nop)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 02 ; OPCODE_LOOP -0000014: 02 ; num expressions -0000015: 00 ; OPCODE_NOP -0000016: 00 ; OPCODE_NOP -0000011: 0400 ; FIXUP func body size -0000017: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 02 ; OPCODE_LOOP +0000010: 02 ; num expressions +0000011: 00 ; OPCODE_NOP +0000012: 00 ; OPCODE_NOP +000000d: 0400 ; FIXUP func body size +0000013: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/nop.txt b/test/dump/nop.txt index 7e45307a..40dce957 100644 --- a/test/dump/nop.txt +++ b/test/dump/nop.txt @@ -2,23 +2,19 @@ (module (func (nop))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 00 ; OPCODE_NOP -0000011: 0100 ; FIXUP func body size -0000014: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 00 ; OPCODE_NOP +000000d: 0100 ; FIXUP func body size +0000010: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/param-multi.txt b/test/dump/param-multi.txt index e03cf543..8f0ef774 100644 --- a/test/dump/param-multi.txt +++ b/test/dump/param-multi.txt @@ -2,26 +2,22 @@ (module (func (param i32 i64 f32 f64))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 04 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type -0000009: 02 ; param type -000000a: 03 ; param type -000000b: 04 ; param type -000000c: 02 ; WASM_SECTION_FUNCTIONS -000000d: 01 ; num functions +0000002: 04 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type +0000005: 02 ; param type +0000006: 03 ; param type +0000007: 04 ; param type +0000008: 02 ; WASM_SECTION_FUNCTIONS +0000009: 01 ; num functions ; function 0 -000000e: 01 ; func flags -000000f: 0000 ; func signature index -0000011: 0000 0000 ; func name offset -0000015: 0000 ; func body size -0000015: 0000 ; FIXUP func body size -0000017: 06 ; WASM_SECTION_END +000000a: 01 ; func flags +000000b: 0000 ; func signature index +000000d: 0000 0000 ; func name offset +0000011: 0000 ; func body size +0000011: 0000 ; FIXUP func body size +0000013: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/result.txt b/test/dump/result.txt index b461f5c4..2709abae 100644 --- a/test/dump/result.txt +++ b/test/dump/result.txt @@ -5,57 +5,53 @@ (func (result f32) (f32.const 0)) (func (result f64) (f64.const 0))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 04 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 04 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 01 ; result_type +0000002: 00 ; num params +0000003: 01 ; result_type ; signature 1 -0000008: 00 ; num params -0000009: 02 ; result_type +0000004: 00 ; num params +0000005: 02 ; result_type ; signature 2 -000000a: 00 ; num params -000000b: 03 ; result_type +0000006: 00 ; num params +0000007: 03 ; result_type ; signature 3 -000000c: 00 ; num params -000000d: 04 ; result_type -000000e: 02 ; WASM_SECTION_FUNCTIONS -000000f: 04 ; num functions +0000008: 00 ; num params +0000009: 04 ; result_type +000000a: 02 ; WASM_SECTION_FUNCTIONS +000000b: 04 ; num functions ; function 0 -0000010: 01 ; func flags -0000011: 0000 ; func signature index -0000013: 0000 0000 ; func name offset -0000017: 0000 ; func body size -0000019: 09 ; OPCODE_I8_CONST -000001a: 00 ; u8 literal -0000017: 0200 ; FIXUP func body size +000000c: 01 ; func flags +000000d: 0000 ; func signature index +000000f: 0000 0000 ; func name offset +0000013: 0000 ; func body size +0000015: 09 ; OPCODE_I8_CONST +0000016: 00 ; u8 literal +0000013: 0200 ; FIXUP func body size ; function 1 -000001b: 01 ; func flags -000001c: 0100 ; func signature index -000001e: 0000 0000 ; func name offset -0000022: 0000 ; func body size -0000024: 0b ; OPCODE_I64_CONST -0000025: 0000 0000 0000 0000 ; u64 literal -0000022: 0900 ; FIXUP func body size +0000017: 01 ; func flags +0000018: 0100 ; func signature index +000001a: 0000 0000 ; func name offset +000001e: 0000 ; func body size +0000020: 0b ; OPCODE_I64_CONST +0000021: 0000 0000 0000 0000 ; u64 literal +000001e: 0900 ; FIXUP func body size ; function 2 -000002d: 01 ; func flags -000002e: 0200 ; func signature index -0000030: 0000 0000 ; func name offset -0000034: 0000 ; func body size -0000036: 0d ; OPCODE_F32_CONST -0000037: 0000 0000 ; f32 literal -0000034: 0500 ; FIXUP func body size +0000029: 01 ; func flags +000002a: 0200 ; func signature index +000002c: 0000 0000 ; func name offset +0000030: 0000 ; func body size +0000032: 0d ; OPCODE_F32_CONST +0000033: 0000 0000 ; f32 literal +0000030: 0500 ; FIXUP func body size ; function 3 -000003b: 01 ; func flags -000003c: 0300 ; func signature index -000003e: 0000 0000 ; func name offset -0000042: 0000 ; func body size -0000044: 0c ; OPCODE_F64_CONST -0000045: 0000 0000 0000 0000 ; f64 literal -0000042: 0900 ; FIXUP func body size -000004d: 06 ; WASM_SECTION_END +0000037: 01 ; func flags +0000038: 0300 ; func signature index +000003a: 0000 0000 ; func name offset +000003e: 0000 ; func body size +0000040: 0c ; OPCODE_F64_CONST +0000041: 0000 0000 0000 0000 ; f64 literal +000003e: 0900 ; FIXUP func body size +0000049: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/return.txt b/test/dump/return.txt index bccf3ff5..cb02e14a 100644 --- a/test/dump/return.txt +++ b/test/dump/return.txt @@ -4,35 +4,31 @@ (return (i32.const 42))) (func (return))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 02 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 02 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 01 ; result_type +0000002: 00 ; num params +0000003: 01 ; result_type ; signature 1 -0000008: 00 ; num params -0000009: 00 ; result_type -000000a: 02 ; WASM_SECTION_FUNCTIONS -000000b: 02 ; num functions +0000004: 00 ; num params +0000005: 00 ; result_type +0000006: 02 ; WASM_SECTION_FUNCTIONS +0000007: 02 ; num functions ; function 0 -000000c: 01 ; func flags -000000d: 0000 ; func signature index -000000f: 0000 0000 ; func name offset -0000013: 0000 ; func body size -0000015: 14 ; OPCODE_RETURN -0000016: 09 ; OPCODE_I8_CONST -0000017: 2a ; u8 literal -0000013: 0300 ; FIXUP func body size +0000008: 01 ; func flags +0000009: 0000 ; func signature index +000000b: 0000 0000 ; func name offset +000000f: 0000 ; func body size +0000011: 14 ; OPCODE_RETURN +0000012: 09 ; OPCODE_I8_CONST +0000013: 2a ; u8 literal +000000f: 0300 ; FIXUP func body size ; function 1 -0000018: 01 ; func flags -0000019: 0100 ; func signature index -000001b: 0000 0000 ; func name offset -000001f: 0000 ; func body size -0000021: 14 ; OPCODE_RETURN -000001f: 0100 ; FIXUP func body size -0000022: 06 ; WASM_SECTION_END +0000014: 01 ; func flags +0000015: 0100 ; func signature index +0000017: 0000 0000 ; func name offset +000001b: 0000 ; func body size +000001d: 14 ; OPCODE_RETURN +000001b: 0100 ; FIXUP func body size +000001e: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/select.txt b/test/dump/select.txt index 3c669b29..aebaae33 100644 --- a/test/dump/select.txt +++ b/test/dump/select.txt @@ -6,50 +6,46 @@ (f32.select (i32.const 1) (f32.const 2) (f32.const 3)) (f64.select (i32.const 1) (f64.const 2) (f64.const 3)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 05 ; OPCODE_SELECT +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 05 ; OPCODE_SELECT +0000010: 09 ; OPCODE_I8_CONST +0000011: 01 ; u8 literal +0000012: 09 ; OPCODE_I8_CONST +0000013: 02 ; u8 literal 0000014: 09 ; OPCODE_I8_CONST -0000015: 01 ; u8 literal -0000016: 09 ; OPCODE_I8_CONST -0000017: 02 ; u8 literal -0000018: 09 ; OPCODE_I8_CONST -0000019: 03 ; u8 literal -000001a: 05 ; OPCODE_SELECT -000001b: 09 ; OPCODE_I8_CONST -000001c: 01 ; u8 literal -000001d: 0b ; OPCODE_I64_CONST -000001e: 0200 0000 0000 0000 ; u64 literal -0000026: 0b ; OPCODE_I64_CONST -0000027: 0300 0000 0000 0000 ; u64 literal -000002f: 05 ; OPCODE_SELECT -0000030: 09 ; OPCODE_I8_CONST -0000031: 01 ; u8 literal -0000032: 0d ; OPCODE_F32_CONST -0000033: 0000 0040 ; f32 literal -0000037: 0d ; OPCODE_F32_CONST -0000038: 0000 4040 ; f32 literal -000003c: 05 ; OPCODE_SELECT -000003d: 09 ; OPCODE_I8_CONST -000003e: 01 ; u8 literal -000003f: 0c ; OPCODE_F64_CONST -0000040: 0000 0000 0000 0040 ; f64 literal -0000048: 0c ; OPCODE_F64_CONST -0000049: 0000 0000 0000 0840 ; f64 literal -0000011: 3e00 ; FIXUP func body size -0000051: 06 ; WASM_SECTION_END +0000015: 03 ; u8 literal +0000016: 05 ; OPCODE_SELECT +0000017: 09 ; OPCODE_I8_CONST +0000018: 01 ; u8 literal +0000019: 0b ; OPCODE_I64_CONST +000001a: 0200 0000 0000 0000 ; u64 literal +0000022: 0b ; OPCODE_I64_CONST +0000023: 0300 0000 0000 0000 ; u64 literal +000002b: 05 ; OPCODE_SELECT +000002c: 09 ; OPCODE_I8_CONST +000002d: 01 ; u8 literal +000002e: 0d ; OPCODE_F32_CONST +000002f: 0000 0040 ; f32 literal +0000033: 0d ; OPCODE_F32_CONST +0000034: 0000 4040 ; f32 literal +0000038: 05 ; OPCODE_SELECT +0000039: 09 ; OPCODE_I8_CONST +000003a: 01 ; u8 literal +000003b: 0c ; OPCODE_F64_CONST +000003c: 0000 0000 0000 0040 ; f64 literal +0000044: 0c ; OPCODE_F64_CONST +0000045: 0000 0000 0000 0840 ; f64 literal +000000d: 3e00 ; FIXUP func body size +000004d: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/setlocal-param.txt b/test/dump/setlocal-param.txt index b40efea5..992eae5c 100644 --- a/test/dump/setlocal-param.txt +++ b/test/dump/setlocal-param.txt @@ -13,52 +13,48 @@ (set_local 4 (i32.const 0)) (set_local 5 (f32.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 02 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type -0000009: 03 ; param type -000000a: 02 ; WASM_SECTION_FUNCTIONS -000000b: 01 ; num functions +0000002: 02 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type +0000005: 03 ; param type +0000006: 02 ; WASM_SECTION_FUNCTIONS +0000007: 01 ; num functions ; function 0 -000000c: 05 ; func flags -000000d: 0000 ; func signature index -000000f: 0000 0000 ; func name offset -0000013: 0100 ; num local i32 -0000015: 0100 ; num local i64 -0000017: 0200 ; num local f32 -0000019: 0000 ; num local f64 -000001b: 0000 ; func body size +0000008: 05 ; func flags +0000009: 0000 ; func signature index +000000b: 0000 0000 ; func name offset +000000f: 0100 ; num local i32 +0000011: 0100 ; num local i64 +0000013: 0200 ; num local f32 +0000015: 0000 ; num local f64 +0000017: 0000 ; func body size +0000019: 0f ; OPCODE_SET_LOCAL +000001a: 00 ; remapped local index +000001b: 09 ; OPCODE_I8_CONST +000001c: 00 ; u8 literal 000001d: 0f ; OPCODE_SET_LOCAL -000001e: 00 ; remapped local index -000001f: 09 ; OPCODE_I8_CONST -0000020: 00 ; u8 literal -0000021: 0f ; OPCODE_SET_LOCAL -0000022: 01 ; remapped local index -0000023: 0d ; OPCODE_F32_CONST -0000024: 0000 0000 ; f32 literal -0000028: 0f ; OPCODE_SET_LOCAL -0000029: 03 ; remapped local index -000002a: 0b ; OPCODE_I64_CONST -000002b: 0000 0000 0000 0000 ; u64 literal -0000033: 0f ; OPCODE_SET_LOCAL -0000034: 04 ; remapped local index -0000035: 0d ; OPCODE_F32_CONST -0000036: 0000 0000 ; f32 literal +000001e: 01 ; remapped local index +000001f: 0d ; OPCODE_F32_CONST +0000020: 0000 0000 ; f32 literal +0000024: 0f ; OPCODE_SET_LOCAL +0000025: 03 ; remapped local index +0000026: 0b ; OPCODE_I64_CONST +0000027: 0000 0000 0000 0000 ; u64 literal +000002f: 0f ; OPCODE_SET_LOCAL +0000030: 04 ; remapped local index +0000031: 0d ; OPCODE_F32_CONST +0000032: 0000 0000 ; f32 literal +0000036: 0f ; OPCODE_SET_LOCAL +0000037: 02 ; remapped local index +0000038: 09 ; OPCODE_I8_CONST +0000039: 00 ; u8 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_SECTION_END +000003b: 05 ; remapped local index +000003c: 0d ; OPCODE_F32_CONST +000003d: 0000 0000 ; f32 literal +0000017: 2800 ; FIXUP func body size +0000041: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/setlocal.txt b/test/dump/setlocal.txt index 07170b5a..ed367ddd 100644 --- a/test/dump/setlocal.txt +++ b/test/dump/setlocal.txt @@ -15,58 +15,54 @@ (set_local 6 (f64.const 0)) (set_local 7 (i64.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 05 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0200 ; num local i32 -0000013: 0200 ; num local i64 -0000015: 0200 ; num local f32 -0000017: 0200 ; num local f64 -0000019: 0000 ; func body size -000001b: 0f ; OPCODE_SET_LOCAL -000001c: 06 ; remapped local index -000001d: 0c ; OPCODE_F64_CONST -000001e: 0000 0000 0000 0000 ; f64 literal -0000026: 0f ; OPCODE_SET_LOCAL -0000027: 04 ; remapped local index -0000028: 0d ; OPCODE_F32_CONST -0000029: 0000 0000 ; f32 literal -000002d: 0f ; OPCODE_SET_LOCAL -000002e: 02 ; remapped local index -000002f: 0b ; OPCODE_I64_CONST -0000030: 0000 0000 0000 0000 ; u64 literal +0000006: 05 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0200 ; num local i32 +000000f: 0200 ; num local i64 +0000011: 0200 ; num local f32 +0000013: 0200 ; num local f64 +0000015: 0000 ; func body size +0000017: 0f ; OPCODE_SET_LOCAL +0000018: 06 ; remapped local index +0000019: 0c ; OPCODE_F64_CONST +000001a: 0000 0000 0000 0000 ; f64 literal +0000022: 0f ; OPCODE_SET_LOCAL +0000023: 04 ; remapped local index +0000024: 0d ; OPCODE_F32_CONST +0000025: 0000 0000 ; f32 literal +0000029: 0f ; OPCODE_SET_LOCAL +000002a: 02 ; remapped local index +000002b: 0b ; OPCODE_I64_CONST +000002c: 0000 0000 0000 0000 ; u64 literal +0000034: 0f ; OPCODE_SET_LOCAL +0000035: 00 ; remapped local index +0000036: 09 ; OPCODE_I8_CONST +0000037: 00 ; u8 literal 0000038: 0f ; OPCODE_SET_LOCAL -0000039: 00 ; remapped local index +0000039: 01 ; 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 -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_SECTION_END +000003d: 05 ; remapped local index +000003e: 0d ; OPCODE_F32_CONST +000003f: 0000 0000 ; f32 literal +0000043: 0f ; OPCODE_SET_LOCAL +0000044: 07 ; remapped local index +0000045: 0c ; OPCODE_F64_CONST +0000046: 0000 0000 0000 0000 ; f64 literal +000004e: 0f ; OPCODE_SET_LOCAL +000004f: 03 ; remapped local index +0000050: 0b ; OPCODE_I64_CONST +0000051: 0000 0000 0000 0000 ; u64 literal +0000015: 4200 ; FIXUP func body size +0000059: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/signatures.txt b/test/dump/signatures.txt index d1d74d4d..387428a8 100644 --- a/test/dump/signatures.txt +++ b/test/dump/signatures.txt @@ -12,43 +12,39 @@ (type (func (param i32) (result f64)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 09 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 09 ; num signatures ; signature 0 -0000006: 01 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type +0000002: 01 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type ; signature 1 -0000009: 01 ; num params -000000a: 00 ; result_type -000000b: 02 ; param type +0000005: 01 ; num params +0000006: 00 ; result_type +0000007: 02 ; param type ; signature 2 -000000c: 01 ; num params -000000d: 00 ; result_type -000000e: 03 ; param type +0000008: 01 ; num params +0000009: 00 ; result_type +000000a: 03 ; param type ; signature 3 -000000f: 01 ; num params -0000010: 00 ; result_type -0000011: 04 ; param type +000000b: 01 ; num params +000000c: 00 ; result_type +000000d: 04 ; param type ; signature 4 -0000012: 00 ; num params -0000013: 01 ; result_type +000000e: 00 ; num params +000000f: 01 ; result_type ; signature 5 -0000014: 00 ; num params -0000015: 02 ; result_type +0000010: 00 ; num params +0000011: 02 ; result_type ; signature 6 -0000016: 00 ; num params -0000017: 03 ; result_type +0000012: 00 ; num params +0000013: 03 ; result_type ; signature 7 -0000018: 00 ; num params -0000019: 04 ; result_type +0000014: 00 ; num params +0000015: 04 ; result_type ; signature 8 -000001a: 01 ; num params -000001b: 04 ; result_type -000001c: 01 ; param type -000001d: 06 ; WASM_SECTION_END +0000016: 01 ; num params +0000017: 04 ; result_type +0000018: 01 ; param type +0000019: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/store-aligned.txt b/test/dump/store-aligned.txt index 667e092c..774e17b3 100644 --- a/test/dump/store-aligned.txt +++ b/test/dump/store-aligned.txt @@ -36,190 +36,186 @@ (i64.store align=4 (i32.const 0) (i64.const 0)) (i64.store align=8 (i32.const 0) (i64.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -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 +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 2e ; OPCODE_I32_STORE_MEM8 +0000010: 00 ; store access byte +0000011: 09 ; OPCODE_I8_CONST +0000012: 00 ; u8 literal +0000013: 09 ; OPCODE_I8_CONST +0000014: 00 ; u8 literal +0000015: 2e ; OPCODE_I32_STORE_MEM8 +0000016: 00 ; store access byte 0000017: 09 ; OPCODE_I8_CONST 0000018: 00 ; u8 literal -0000019: 2e ; OPCODE_I32_STORE_MEM8 -000001a: 00 ; store access byte -000001b: 09 ; OPCODE_I8_CONST -000001c: 00 ; u8 literal +0000019: 09 ; OPCODE_I8_CONST +000001a: 00 ; u8 literal +000001b: 2e ; OPCODE_I32_STORE_MEM8 +000001c: 00 ; store access byte 000001d: 09 ; OPCODE_I8_CONST 000001e: 00 ; u8 literal -000001f: 2e ; OPCODE_I32_STORE_MEM8 -0000020: 00 ; store access byte -0000021: 09 ; OPCODE_I8_CONST -0000022: 00 ; u8 literal +000001f: 09 ; OPCODE_I8_CONST +0000020: 00 ; u8 literal +0000021: 2e ; OPCODE_I32_STORE_MEM8 +0000022: 00 ; store access byte 0000023: 09 ; OPCODE_I8_CONST 0000024: 00 ; u8 literal -0000025: 2e ; OPCODE_I32_STORE_MEM8 -0000026: 00 ; store access byte -0000027: 09 ; OPCODE_I8_CONST -0000028: 00 ; u8 literal +0000025: 09 ; OPCODE_I8_CONST +0000026: 00 ; u8 literal +0000027: 2f ; OPCODE_I32_STORE_MEM16 +0000028: 00 ; store access byte 0000029: 09 ; OPCODE_I8_CONST 000002a: 00 ; u8 literal -000002b: 2f ; OPCODE_I32_STORE_MEM16 -000002c: 00 ; store access byte -000002d: 09 ; OPCODE_I8_CONST -000002e: 00 ; u8 literal +000002b: 09 ; OPCODE_I8_CONST +000002c: 00 ; u8 literal +000002d: 2f ; OPCODE_I32_STORE_MEM16 +000002e: 00 ; store access byte 000002f: 09 ; OPCODE_I8_CONST 0000030: 00 ; u8 literal -0000031: 2f ; OPCODE_I32_STORE_MEM16 -0000032: 00 ; store access byte -0000033: 09 ; OPCODE_I8_CONST -0000034: 00 ; u8 literal +0000031: 09 ; OPCODE_I8_CONST +0000032: 00 ; u8 literal +0000033: 2f ; OPCODE_I32_STORE_MEM16 +0000034: 00 ; store access byte 0000035: 09 ; OPCODE_I8_CONST 0000036: 00 ; u8 literal -0000037: 2f ; OPCODE_I32_STORE_MEM16 -0000038: 00 ; store access byte -0000039: 09 ; OPCODE_I8_CONST -000003a: 00 ; u8 literal +0000037: 09 ; OPCODE_I8_CONST +0000038: 00 ; u8 literal +0000039: 2f ; OPCODE_I32_STORE_MEM16 +000003a: 00 ; store access byte 000003b: 09 ; OPCODE_I8_CONST 000003c: 00 ; u8 literal -000003d: 2f ; OPCODE_I32_STORE_MEM16 -000003e: 00 ; store access byte -000003f: 09 ; OPCODE_I8_CONST -0000040: 00 ; u8 literal +000003d: 09 ; OPCODE_I8_CONST +000003e: 00 ; u8 literal +000003f: 33 ; OPCODE_I32_STORE_MEM +0000040: 00 ; store access byte 0000041: 09 ; OPCODE_I8_CONST 0000042: 00 ; u8 literal -0000043: 33 ; OPCODE_I32_STORE_MEM -0000044: 00 ; store access byte -0000045: 09 ; OPCODE_I8_CONST -0000046: 00 ; u8 literal +0000043: 09 ; OPCODE_I8_CONST +0000044: 00 ; u8 literal +0000045: 33 ; OPCODE_I32_STORE_MEM +0000046: 00 ; store access byte 0000047: 09 ; OPCODE_I8_CONST 0000048: 00 ; u8 literal -0000049: 33 ; OPCODE_I32_STORE_MEM -000004a: 00 ; store access byte -000004b: 09 ; OPCODE_I8_CONST -000004c: 00 ; u8 literal +0000049: 09 ; OPCODE_I8_CONST +000004a: 00 ; u8 literal +000004b: 33 ; OPCODE_I32_STORE_MEM +000004c: 00 ; store access byte 000004d: 09 ; OPCODE_I8_CONST 000004e: 00 ; u8 literal -000004f: 33 ; OPCODE_I32_STORE_MEM -0000050: 00 ; store access byte -0000051: 09 ; OPCODE_I8_CONST -0000052: 00 ; u8 literal +000004f: 09 ; OPCODE_I8_CONST +0000050: 00 ; u8 literal +0000051: 33 ; OPCODE_I32_STORE_MEM +0000052: 00 ; store access byte 0000053: 09 ; OPCODE_I8_CONST 0000054: 00 ; u8 literal -0000055: 33 ; OPCODE_I32_STORE_MEM -0000056: 00 ; store access byte -0000057: 09 ; OPCODE_I8_CONST -0000058: 00 ; u8 literal +0000055: 09 ; OPCODE_I8_CONST +0000056: 00 ; u8 literal +0000057: 34 ; OPCODE_I64_STORE_MEM +0000058: 00 ; store access byte 0000059: 09 ; OPCODE_I8_CONST 000005a: 00 ; u8 literal -000005b: 34 ; OPCODE_I64_STORE_MEM -000005c: 00 ; store access byte -000005d: 09 ; OPCODE_I8_CONST -000005e: 00 ; u8 literal -000005f: 0b ; OPCODE_I64_CONST -0000060: 0000 0000 0000 0000 ; u64 literal -0000068: 34 ; OPCODE_I64_STORE_MEM -0000069: 00 ; 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: 00 ; 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 -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: 00 ; 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: 00 ; 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: 00 ; 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: 00 ; 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_SECTION_END +000005b: 0b ; OPCODE_I64_CONST +000005c: 0000 0000 0000 0000 ; u64 literal +0000064: 34 ; OPCODE_I64_STORE_MEM +0000065: 00 ; store access byte +0000066: 09 ; OPCODE_I8_CONST +0000067: 00 ; u8 literal +0000068: 0b ; OPCODE_I64_CONST +0000069: 0000 0000 0000 0000 ; u64 literal +0000071: 34 ; OPCODE_I64_STORE_MEM +0000072: 00 ; store access byte +0000073: 09 ; OPCODE_I8_CONST +0000074: 00 ; u8 literal +0000075: 0b ; OPCODE_I64_CONST +0000076: 0000 0000 0000 0000 ; u64 literal +000007e: 34 ; OPCODE_I64_STORE_MEM +000007f: 00 ; store access byte +0000080: 09 ; OPCODE_I8_CONST +0000081: 00 ; u8 literal +0000082: 0b ; OPCODE_I64_CONST +0000083: 0000 0000 0000 0000 ; u64 literal +000008b: 30 ; OPCODE_I64_STORE_MEM8 +000008c: 00 ; store access byte +000008d: 09 ; OPCODE_I8_CONST +000008e: 00 ; u8 literal +000008f: 0b ; OPCODE_I64_CONST +0000090: 0000 0000 0000 0000 ; u64 literal +0000098: 30 ; OPCODE_I64_STORE_MEM8 +0000099: 00 ; store access byte +000009a: 09 ; OPCODE_I8_CONST +000009b: 00 ; u8 literal +000009c: 0b ; OPCODE_I64_CONST +000009d: 0000 0000 0000 0000 ; u64 literal +00000a5: 30 ; OPCODE_I64_STORE_MEM8 +00000a6: 00 ; store access byte +00000a7: 09 ; OPCODE_I8_CONST +00000a8: 00 ; u8 literal +00000a9: 0b ; OPCODE_I64_CONST +00000aa: 0000 0000 0000 0000 ; u64 literal +00000b2: 30 ; OPCODE_I64_STORE_MEM8 +00000b3: 00 ; store access byte +00000b4: 09 ; OPCODE_I8_CONST +00000b5: 00 ; u8 literal +00000b6: 0b ; OPCODE_I64_CONST +00000b7: 0000 0000 0000 0000 ; u64 literal +00000bf: 31 ; OPCODE_I64_STORE_MEM16 +00000c0: 00 ; store access byte +00000c1: 09 ; OPCODE_I8_CONST +00000c2: 00 ; u8 literal +00000c3: 0b ; OPCODE_I64_CONST +00000c4: 0000 0000 0000 0000 ; u64 literal +00000cc: 31 ; OPCODE_I64_STORE_MEM16 +00000cd: 00 ; store access byte +00000ce: 09 ; OPCODE_I8_CONST +00000cf: 00 ; u8 literal +00000d0: 0b ; OPCODE_I64_CONST +00000d1: 0000 0000 0000 0000 ; u64 literal +00000d9: 31 ; OPCODE_I64_STORE_MEM16 +00000da: 00 ; store access byte +00000db: 09 ; OPCODE_I8_CONST +00000dc: 00 ; u8 literal +00000dd: 0b ; OPCODE_I64_CONST +00000de: 0000 0000 0000 0000 ; u64 literal +00000e6: 31 ; OPCODE_I64_STORE_MEM16 +00000e7: 00 ; store access byte +00000e8: 09 ; OPCODE_I8_CONST +00000e9: 00 ; u8 literal +00000ea: 0b ; OPCODE_I64_CONST +00000eb: 0000 0000 0000 0000 ; u64 literal +00000f3: 34 ; OPCODE_I64_STORE_MEM +00000f4: 00 ; store access byte +00000f5: 09 ; OPCODE_I8_CONST +00000f6: 00 ; u8 literal +00000f7: 0b ; OPCODE_I64_CONST +00000f8: 0000 0000 0000 0000 ; u64 literal +0000100: 34 ; OPCODE_I64_STORE_MEM +0000101: 00 ; store access byte +0000102: 09 ; OPCODE_I8_CONST +0000103: 00 ; u8 literal +0000104: 0b ; OPCODE_I64_CONST +0000105: 0000 0000 0000 0000 ; u64 literal +000010d: 34 ; OPCODE_I64_STORE_MEM +000010e: 00 ; store access byte +000010f: 09 ; OPCODE_I8_CONST +0000110: 00 ; u8 literal +0000111: 0b ; OPCODE_I64_CONST +0000112: 0000 0000 0000 0000 ; u64 literal +000011a: 34 ; OPCODE_I64_STORE_MEM +000011b: 00 ; store access byte +000011c: 09 ; OPCODE_I8_CONST +000011d: 00 ; u8 literal +000011e: 0b ; OPCODE_I64_CONST +000011f: 0000 0000 0000 0000 ; u64 literal +000000d: 1801 ; FIXUP func body size +0000127: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/store.txt b/test/dump/store.txt index 134a5fce..2e23d7f9 100644 --- a/test/dump/store.txt +++ b/test/dump/store.txt @@ -11,76 +11,72 @@ (f32.store (i32.const 0) (f32.const 0)) (f64.store (i32.const 0) (f64.const 0)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -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 +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 2e ; OPCODE_I32_STORE_MEM8 +0000010: 00 ; store access byte +0000011: 09 ; OPCODE_I8_CONST +0000012: 00 ; u8 literal +0000013: 09 ; OPCODE_I8_CONST +0000014: 00 ; u8 literal +0000015: 2f ; OPCODE_I32_STORE_MEM16 +0000016: 00 ; store access byte 0000017: 09 ; OPCODE_I8_CONST 0000018: 00 ; u8 literal -0000019: 2f ; OPCODE_I32_STORE_MEM16 -000001a: 00 ; store access byte -000001b: 09 ; OPCODE_I8_CONST -000001c: 00 ; u8 literal +0000019: 09 ; OPCODE_I8_CONST +000001a: 00 ; u8 literal +000001b: 33 ; OPCODE_I32_STORE_MEM +000001c: 00 ; store access byte 000001d: 09 ; OPCODE_I8_CONST 000001e: 00 ; u8 literal -000001f: 33 ; OPCODE_I32_STORE_MEM -0000020: 00 ; store access byte -0000021: 09 ; OPCODE_I8_CONST -0000022: 00 ; u8 literal +000001f: 09 ; OPCODE_I8_CONST +0000020: 00 ; u8 literal +0000021: 34 ; OPCODE_I64_STORE_MEM +0000022: 00 ; store access byte 0000023: 09 ; OPCODE_I8_CONST 0000024: 00 ; u8 literal -0000025: 34 ; OPCODE_I64_STORE_MEM -0000026: 00 ; store access byte -0000027: 09 ; OPCODE_I8_CONST -0000028: 00 ; u8 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_SECTION_END +0000025: 0b ; OPCODE_I64_CONST +0000026: 0000 0000 0000 0000 ; u64 literal +000002e: 30 ; OPCODE_I64_STORE_MEM8 +000002f: 00 ; store access byte +0000030: 09 ; OPCODE_I8_CONST +0000031: 00 ; u8 literal +0000032: 0b ; OPCODE_I64_CONST +0000033: 0000 0000 0000 0000 ; u64 literal +000003b: 31 ; OPCODE_I64_STORE_MEM16 +000003c: 00 ; store access byte +000003d: 09 ; OPCODE_I8_CONST +000003e: 00 ; u8 literal +000003f: 0b ; OPCODE_I64_CONST +0000040: 0000 0000 0000 0000 ; u64 literal +0000048: 32 ; OPCODE_I64_STORE_MEM32 +0000049: 00 ; store access byte +000004a: 09 ; OPCODE_I8_CONST +000004b: 00 ; u8 literal +000004c: 0b ; OPCODE_I64_CONST +000004d: 0000 0000 0000 0000 ; u64 literal +0000055: 35 ; OPCODE_F32_STORE_MEM +0000056: 00 ; store access byte +0000057: 09 ; OPCODE_I8_CONST +0000058: 00 ; u8 literal +0000059: 0d ; OPCODE_F32_CONST +000005a: 0000 0000 ; f32 literal +000005e: 36 ; OPCODE_F64_STORE_MEM +000005f: 00 ; store access byte +0000060: 09 ; OPCODE_I8_CONST +0000061: 00 ; u8 literal +0000062: 0c ; OPCODE_F64_CONST +0000063: 0000 0000 0000 0000 ; f64 literal +000000d: 5c00 ; FIXUP func body size +000006b: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/storeglobal.txt b/test/dump/storeglobal.txt index b6e73b4f..ffc83804 100644 --- a/test/dump/storeglobal.txt +++ b/test/dump/storeglobal.txt @@ -7,56 +7,52 @@ (store_global 2 (f32.const 2)) (store_global 3 (f64.const 3)))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 03 ; WASM_SECTION_GLOBALS -0000005: 04 ; num globals +0000000: 03 ; WASM_SECTION_GLOBALS +0000001: 04 ; num globals ; global header 0 -0000006: 0000 0000 ; global name offset -000000a: 04 ; global mem type -000000b: 00 ; export global +0000002: 0000 0000 ; global name offset +0000006: 04 ; global mem type +0000007: 00 ; export global ; global header 1 -000000c: 0000 0000 ; global name offset -0000010: 06 ; global mem type -0000011: 00 ; export global +0000008: 0000 0000 ; global name offset +000000c: 06 ; global mem type +000000d: 00 ; export global ; global header 2 -0000012: 0000 0000 ; global name offset -0000016: 08 ; global mem type -0000017: 00 ; export global +000000e: 0000 0000 ; global name offset +0000012: 08 ; global mem type +0000013: 00 ; export global ; global header 3 -0000018: 0000 0000 ; global name offset -000001c: 09 ; global mem type -000001d: 00 ; export global -000001e: 01 ; WASM_SECTION_SIGNATURES -000001f: 01 ; num signatures +0000014: 0000 0000 ; global name offset +0000018: 09 ; global mem type +0000019: 00 ; export global +000001a: 01 ; WASM_SECTION_SIGNATURES +000001b: 01 ; num signatures ; signature 0 -0000020: 00 ; num params -0000021: 00 ; result_type -0000022: 02 ; WASM_SECTION_FUNCTIONS -0000023: 01 ; num functions +000001c: 00 ; num params +000001d: 00 ; result_type +000001e: 02 ; WASM_SECTION_FUNCTIONS +000001f: 01 ; num functions ; function 0 -0000024: 01 ; func flags -0000025: 0000 ; func signature index -0000027: 0000 0000 ; func name offset -000002b: 0000 ; func body size +0000020: 01 ; func flags +0000021: 0000 ; func signature index +0000023: 0000 0000 ; func name offset +0000027: 0000 ; func body size +0000029: 11 ; OPCODE_STORE_GLOBAL +000002a: 00 ; global index +000002b: 09 ; OPCODE_I8_CONST +000002c: 00 ; u8 literal 000002d: 11 ; OPCODE_STORE_GLOBAL -000002e: 00 ; global index -000002f: 09 ; OPCODE_I8_CONST -0000030: 00 ; u8 literal -0000031: 11 ; OPCODE_STORE_GLOBAL -0000032: 01 ; global index -0000033: 0b ; OPCODE_I64_CONST -0000034: 0100 0000 0000 0000 ; u64 literal -000003c: 11 ; OPCODE_STORE_GLOBAL -000003d: 02 ; global index -000003e: 0d ; OPCODE_F32_CONST -000003f: 0000 0040 ; f32 literal -0000043: 11 ; OPCODE_STORE_GLOBAL -0000044: 03 ; global index -0000045: 0c ; OPCODE_F64_CONST -0000046: 0000 0000 0000 0840 ; f64 literal -000002b: 2100 ; FIXUP func body size -000004e: 06 ; WASM_SECTION_END +000002e: 01 ; global index +000002f: 0b ; OPCODE_I64_CONST +0000030: 0100 0000 0000 0000 ; u64 literal +0000038: 11 ; OPCODE_STORE_GLOBAL +0000039: 02 ; global index +000003a: 0d ; OPCODE_F32_CONST +000003b: 0000 0040 ; f32 literal +000003f: 11 ; OPCODE_STORE_GLOBAL +0000040: 03 ; global index +0000041: 0c ; OPCODE_F64_CONST +0000042: 0000 0000 0000 0840 ; f64 literal +0000027: 2100 ; FIXUP func body size +000004a: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/table.txt b/test/dump/table.txt index 6ce77291..fb3b8d2e 100644 --- a/test/dump/table.txt +++ b/test/dump/table.txt @@ -6,51 +6,47 @@ (func (result f64) (f64.const 0)) (table 0 0 1 2)) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 03 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 03 ; num signatures ; signature 0 -0000006: 01 ; num params -0000007: 00 ; result_type -0000008: 01 ; param type +0000002: 01 ; num params +0000003: 00 ; result_type +0000004: 01 ; param type ; signature 1 -0000009: 02 ; num params -000000a: 00 ; result_type -000000b: 01 ; param type -000000c: 02 ; param type +0000005: 02 ; num params +0000006: 00 ; result_type +0000007: 01 ; param type +0000008: 02 ; param type ; signature 2 -000000d: 00 ; num params -000000e: 04 ; result_type -000000f: 02 ; WASM_SECTION_FUNCTIONS -0000010: 03 ; num functions +0000009: 00 ; num params +000000a: 04 ; result_type +000000b: 02 ; WASM_SECTION_FUNCTIONS +000000c: 03 ; num functions ; function 0 -0000011: 01 ; func flags -0000012: 0000 ; func signature index -0000014: 0000 0000 ; func name offset -0000018: 0000 ; func body size -0000018: 0000 ; FIXUP func body size +000000d: 01 ; func flags +000000e: 0000 ; func signature index +0000010: 0000 0000 ; func name offset +0000014: 0000 ; func body size +0000014: 0000 ; FIXUP func body size ; function 1 -000001a: 01 ; func flags -000001b: 0100 ; func signature index -000001d: 0000 0000 ; func name offset -0000021: 0000 ; func body size -0000021: 0000 ; FIXUP func body size +0000016: 01 ; func flags +0000017: 0100 ; func signature index +0000019: 0000 0000 ; func name offset +000001d: 0000 ; func body size +000001d: 0000 ; FIXUP func body size ; function 2 -0000023: 01 ; func flags -0000024: 0200 ; func signature index -0000026: 0000 0000 ; func name offset -000002a: 0000 ; func body size -000002c: 0c ; OPCODE_F64_CONST -000002d: 0000 0000 0000 0000 ; f64 literal -000002a: 0900 ; FIXUP func body size -0000035: 05 ; WASM_SECTION_FUNCTION_TABLE -0000036: 04 ; num function table entries -0000037: 0000 ; function table entry -0000039: 0000 ; function table entry -000003b: 0100 ; function table entry -000003d: 0200 ; function table entry -000003f: 06 ; WASM_SECTION_END +000001f: 01 ; func flags +0000020: 0200 ; func signature index +0000022: 0000 0000 ; func name offset +0000026: 0000 ; func body size +0000028: 0c ; OPCODE_F64_CONST +0000029: 0000 0000 0000 0000 ; f64 literal +0000026: 0900 ; FIXUP func body size +0000031: 05 ; WASM_SECTION_FUNCTION_TABLE +0000032: 04 ; num function table entries +0000033: 0000 ; function table entry +0000035: 0000 ; function table entry +0000037: 0100 ; function table entry +0000039: 0200 ; function table entry +000003b: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/tableswitch.txt b/test/dump/tableswitch.txt index 1132c77d..d140eac9 100644 --- a/test/dump/tableswitch.txt +++ b/test/dump/tableswitch.txt @@ -8,41 +8,37 @@ (case) ;; fallthrough (case (i32.const 3)))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 01 ; OPCODE_BLOCK -0000014: 01 ; num expressions -0000015: 08 ; OPCODE_TABLESWITCH -0000016: 0300 ; num cases -0000018: 0300 ; num targets -000001a: 0000 ; case index -000001c: 0100 ; case index -000001e: 0180 ; br depth +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 01 ; OPCODE_BLOCK +0000010: 01 ; num expressions +0000011: 08 ; OPCODE_TABLESWITCH +0000012: 0300 ; num cases +0000014: 0300 ; num targets +0000016: 0000 ; case index +0000018: 0100 ; case index +000001a: 0180 ; br depth +000001c: 09 ; OPCODE_I8_CONST +000001d: 00 ; u8 literal +000001e: 01 ; OPCODE_BLOCK +000001f: 02 ; num expressions 0000020: 09 ; OPCODE_I8_CONST -0000021: 00 ; u8 literal -0000022: 01 ; OPCODE_BLOCK -0000023: 02 ; num expressions -0000024: 09 ; OPCODE_I8_CONST -0000025: 01 ; u8 literal -0000026: 09 ; OPCODE_I8_CONST -0000027: 02 ; u8 literal -0000028: 00 ; WASM_OPCODE_NOP for fallthrough -0000029: 09 ; OPCODE_I8_CONST -000002a: 03 ; u8 literal -0000011: 1800 ; FIXUP func body size -000002b: 06 ; WASM_SECTION_END +0000021: 01 ; u8 literal +0000022: 09 ; OPCODE_I8_CONST +0000023: 02 ; u8 literal +0000024: 00 ; WASM_OPCODE_NOP for fallthrough +0000025: 09 ; OPCODE_I8_CONST +0000026: 03 ; u8 literal +000000d: 1800 ; FIXUP func body size +0000027: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/unary.txt b/test/dump/unary.txt index 43475cbf..46efdd3e 100644 --- a/test/dump/unary.txt +++ b/test/dump/unary.txt @@ -26,51 +26,47 @@ (f64.trunc (f64.nearest (f64.const 0)))))))))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 5a ; OPCODE_BOOL_NOT -0000014: 57 ; OPCODE_I32_CLZ -0000015: 58 ; OPCODE_I32_CTZ -0000016: 59 ; OPCODE_I32_POPCNT -0000017: 09 ; OPCODE_I8_CONST -0000018: 00 ; u8 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_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 5a ; OPCODE_BOOL_NOT +0000010: 57 ; OPCODE_I32_CLZ +0000011: 58 ; OPCODE_I32_CTZ +0000012: 59 ; OPCODE_I32_POPCNT +0000013: 09 ; OPCODE_I8_CONST +0000014: 00 ; u8 literal +0000015: 72 ; OPCODE_I64_CLZ +0000016: 73 ; OPCODE_I64_CTZ +0000017: 74 ; OPCODE_I64_POPCNT +0000018: 0b ; OPCODE_I64_CONST +0000019: 0000 0000 0000 0000 ; u64 literal +0000021: 7c ; OPCODE_F32_NEG +0000022: 7b ; OPCODE_F32_ABS +0000023: 82 ; OPCODE_F32_SQRT +0000024: 7e ; OPCODE_F32_CEIL +0000025: 7f ; OPCODE_F32_FLOOR +0000026: 80 ; OPCODE_F32_TRUNC +0000027: 81 ; OPCODE_F32_NEAREST_INT +0000028: 0d ; OPCODE_F32_CONST +0000029: 0000 0000 ; f32 literal +000002d: 90 ; OPCODE_F64_NEG +000002e: 8f ; OPCODE_F64_ABS +000002f: 96 ; OPCODE_F64_SQRT +0000030: 92 ; OPCODE_F64_CEIL +0000031: 93 ; OPCODE_F64_FLOOR +0000032: 94 ; OPCODE_F64_TRUNC +0000033: 95 ; OPCODE_F64_NEAREST_INT +0000034: 0c ; OPCODE_F64_CONST +0000035: 0000 0000 0000 0000 ; f64 literal +000000d: 2e00 ; FIXUP func body size +000003d: 06 ; WASM_SECTION_END ;;; STDOUT ;;) diff --git a/test/dump/unreachable.txt b/test/dump/unreachable.txt index a79240f1..37813f24 100644 --- a/test/dump/unreachable.txt +++ b/test/dump/unreachable.txt @@ -3,23 +3,19 @@ (func (unreachable))) (;; STDOUT ;;; -0000000: 00 ; WASM_SECTION_MEMORY -0000001: 00 ; min mem size log 2 -0000002: 00 ; max mem size log 2 -0000003: 01 ; export mem -0000004: 01 ; WASM_SECTION_SIGNATURES -0000005: 01 ; num signatures +0000000: 01 ; WASM_SECTION_SIGNATURES +0000001: 01 ; num signatures ; signature 0 -0000006: 00 ; num params -0000007: 00 ; result_type -0000008: 02 ; WASM_SECTION_FUNCTIONS -0000009: 01 ; num functions +0000002: 00 ; num params +0000003: 00 ; result_type +0000004: 02 ; WASM_SECTION_FUNCTIONS +0000005: 01 ; num functions ; function 0 -000000a: 01 ; func flags -000000b: 0000 ; func signature index -000000d: 0000 0000 ; func name offset -0000011: 0000 ; func body size -0000013: 15 ; OPCODE_UNREACHABLE -0000011: 0100 ; FIXUP func body size -0000014: 06 ; WASM_SECTION_END +0000006: 01 ; func flags +0000007: 0000 ; func signature index +0000009: 0000 0000 ; func name offset +000000d: 0000 ; func body size +000000f: 15 ; OPCODE_UNREACHABLE +000000d: 0100 ; FIXUP func body size +0000010: 06 ; WASM_SECTION_END ;;; STDOUT ;;) |