1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/MC/Disassembler/WebAssembly/wasm.txt

56 lines
1.2 KiB
Plaintext
Raw Normal View History

# 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: call 0
0x10 0x00
# CHECK: local.get 128
0x20 0x80 0x01
# Prefix byte example:
# CHECK: i64.trunc_sat_f64_u
0xFC 0x07
# CHECK: v128.const 50462976, 117835012, 185207048, 252579084
0xFD 0x0C 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
# CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
0xFD 0x0D 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
# Check LEB128 encoding of SIMD instructions
# CHECK: i16x8.all_true
0xFD 0x83 0x01
# Including non-canonical LEB128 encodings
# CHECK: i16x8.q15mulr_sat_s
0xFD 0x82 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
# This can mean end_block/end_loop/end_if/end_function/end_try..
# CHECK: end
0x0B