| ;;; TOOL: run-objdump |
| ;;; ARGS0: -v |
| ;;; ARGS1: --headers |
| (module |
| (memory 1) |
| (func $f (param i32 i32) (result i32) |
| i32.const 0 |
| i32.const 0 |
| i32.load |
| i32.const 1 |
| i32.add |
| i32.store |
| get_local 0 |
| get_local 1 |
| i32.add) |
| (export "f" (func $f))) |
| (;; STDERR ;;; |
| 0000000: 0061 736d ; WASM_BINARY_MAGIC |
| 0000004: 0100 0000 ; WASM_BINARY_VERSION |
| ; section "Type" (1) |
| 0000008: 01 ; section code |
| 0000009: 00 ; section size (guess) |
| 000000a: 01 ; num types |
| ; func type 0 |
| 000000b: 60 ; func |
| 000000c: 02 ; num params |
| 000000d: 7f ; i32 |
| 000000e: 7f ; i32 |
| 000000f: 01 ; num results |
| 0000010: 7f ; i32 |
| 0000009: 07 ; FIXUP section size |
| ; section "Function" (3) |
| 0000011: 03 ; section code |
| 0000012: 00 ; section size (guess) |
| 0000013: 01 ; num functions |
| 0000014: 00 ; function 0 signature index |
| 0000012: 02 ; FIXUP section size |
| ; section "Memory" (5) |
| 0000015: 05 ; section code |
| 0000016: 00 ; section size (guess) |
| 0000017: 01 ; num memories |
| ; memory 0 |
| 0000018: 00 ; limits: flags |
| 0000019: 01 ; limits: initial |
| 0000016: 03 ; FIXUP section size |
| ; section "Export" (7) |
| 000001a: 07 ; section code |
| 000001b: 00 ; section size (guess) |
| 000001c: 01 ; num exports |
| 000001d: 01 ; string length |
| 000001e: 66 f ; export name |
| 000001f: 00 ; export kind |
| 0000020: 00 ; export func index |
| 000001b: 05 ; FIXUP section size |
| ; section "Code" (10) |
| 0000021: 0a ; section code |
| 0000022: 00 ; section size (guess) |
| 0000023: 01 ; num functions |
| ; function body 0 |
| 0000024: 00 ; func body size (guess) |
| 0000025: 00 ; local decl count |
| 0000026: 41 ; i32.const |
| 0000027: 00 ; i32 literal |
| 0000028: 41 ; i32.const |
| 0000029: 00 ; i32 literal |
| 000002a: 28 ; i32.load |
| 000002b: 02 ; alignment |
| 000002c: 00 ; load offset |
| 000002d: 41 ; i32.const |
| 000002e: 01 ; i32 literal |
| 000002f: 6a ; i32.add |
| 0000030: 36 ; i32.store |
| 0000031: 02 ; alignment |
| 0000032: 00 ; store offset |
| 0000033: 20 ; local.get |
| 0000034: 00 ; local index |
| 0000035: 20 ; local.get |
| 0000036: 01 ; local index |
| 0000037: 6a ; i32.add |
| 0000038: 0b ; end |
| 0000024: 14 ; FIXUP func body size |
| 0000022: 16 ; FIXUP section size |
| ;;; STDERR ;;) |
| (;; STDOUT ;;; |
| |
| basic.wasm: file format wasm 0x1 |
| |
| Sections: |
| |
| Type start=0x0000000a end=0x00000011 (size=0x00000007) count: 1 |
| Function start=0x00000013 end=0x00000015 (size=0x00000002) count: 1 |
| Memory start=0x00000017 end=0x0000001a (size=0x00000003) count: 1 |
| Export start=0x0000001c end=0x00000021 (size=0x00000005) count: 1 |
| Code start=0x00000023 end=0x00000039 (size=0x00000016) count: 1 |
| |
| Code Disassembly: |
| |
| 000025 func[0] <f>: |
| 000026: 41 00 | i32.const 0 |
| 000028: 41 00 | i32.const 0 |
| 00002a: 28 02 00 | i32.load 2 0 |
| 00002d: 41 01 | i32.const 1 |
| 00002f: 6a | i32.add |
| 000030: 36 02 00 | i32.store 2 0 |
| 000033: 20 00 | local.get 0 |
| 000035: 20 01 | local.get 1 |
| 000037: 6a | i32.add |
| 000038: 0b | end |
| ;;; STDOUT ;;) |