# RUN: llvm-mc --disassemble %s -triple=wasm32-unknown-unknown | FileCheck %s

# CHECK: .text

# CHECK: nop
0x01

# CHECK: i32.add
0x6a

# CHECK: i64.const -1
0x42 0x7F

# CHECK: i64.load32_u 16:p2align=1
0x35 0x01 0x10

# CHECK: block f64
0x02 0x7C

# CHECK: call_indirect
# $0=, 128, 0
# FIXME: WebAssemblyInstPrinter does not print immediates.
0x11 0x80 0x01 0x00

# CHECK: local.get 128
0x20 0x80 0x01

# Prefix byte example:
# CHECK: i64.trunc_sat_f64_u
0xFC 0x07

# v128.const is arbitrarily disassembled as v16i8
# CHECK: v128.const 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
0xFD 0x02 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F

# CHECK: v8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
0xFD 0x03 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F

# Check LEB128 encoding of SIMD instructions
# CHECK: i64x2.all_true
0xFD 0x86 0x01

# Including non-canonical LEB128 encodings
# CHECK: i64x2.any_true
# CHECK-NOT: i64.div_u
0xFD 0x85 0x81 0x80 0x80 0x80 0x80 0x00

# Check br_table, which has its own operand type.
# CHECK: br_table {0, 1, 2}
0x0E 0x02 0x00 0x01 0x02
