Sam Clegg | 16c1682 | 2018-05-10 22:16:44 +0000 | [diff] [blame^] | 1 | # RUN: llvm-mc --disassemble %s -triple=wasm32-unknown-unknown | FileCheck %s |
| 2 | |
| 3 | # CHECK: .text |
| 4 | |
| 5 | # CHECK: nop |
| 6 | 0x01 |
| 7 | |
| 8 | # CHECK: i32.add $0=, $0, $0 |
| 9 | # NOTE: registers are meaningless, as there is no context for what they are. |
| 10 | 0x6a |
| 11 | |
| 12 | # CHECK: i64.const $0=, -1 |
| 13 | 0x42 0x7F |
| 14 | |
| 15 | # CHECK: i64.load32_u $0=, 16($0):p2align=1 |
| 16 | 0x35 0x01 0x10 |
| 17 | |
| 18 | # CHECK: block |
| 19 | # 3 |
| 20 | # FIXME: WebAssemblyInstPrinter does not currently print block number. |
| 21 | 0x02 0x03 |
| 22 | |
| 23 | # CHECK: call_indirect |
| 24 | # $0=, 128, 0 |
| 25 | # FIXME: WebAssemblyInstPrinter does not print immediates. |
| 26 | 0x11 0x80 0x01 0x00 |
| 27 | |
| 28 | # CHECK: get_local $0=, 128 |
| 29 | 0x20 0x80 0x01 |
| 30 | |
| 31 | # Prefix byte example: |
| 32 | # CHECK: i64.trunc_u:sat/f64 $0=, $0 |
| 33 | 0xFC 0x07 |