blob: 8e4607de6d531607925bebeaae25dd1509422a76 [file] [log] [blame]
Sam Clegg16c16822018-05-10 22:16:44 +00001# RUN: llvm-mc --disassemble %s -triple=wasm32-unknown-unknown | FileCheck %s
2
3# CHECK: .text
4
5# CHECK: nop
60x01
7
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +00008# CHECK: i32.add
Sam Clegg16c16822018-05-10 22:16:44 +000090x6a
10
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +000011# CHECK: i64.const -1
Sam Clegg16c16822018-05-10 22:16:44 +0000120x42 0x7F
13
Wouter van Oortmerssen8a9cb242018-08-27 15:45:51 +000014# CHECK: i64.load32_u 16:p2align=1
Sam Clegg16c16822018-05-10 22:16:44 +0000150x35 0x01 0x10
16
Wouter van Oortmerssenad72f682019-01-02 23:23:51 +000017# CHECK: block f64
180x02 0x7C
Sam Clegg16c16822018-05-10 22:16:44 +000019
20# CHECK: call_indirect
21# $0=, 128, 0
22# FIXME: WebAssemblyInstPrinter does not print immediates.
230x11 0x80 0x01 0x00
24
Wouter van Oortmerssen1a91cb02019-02-05 01:19:45 +000025# CHECK: call 0
26# CHECK-NOT: except_ref.call 0
270x10 0x00
28
Thomas Lively6a87dda2019-01-08 06:25:55 +000029# CHECK: local.get 128
Sam Clegg16c16822018-05-10 22:16:44 +0000300x20 0x80 0x01
31
32# Prefix byte example:
Thomas Lively6a87dda2019-01-08 06:25:55 +000033# CHECK: i64.trunc_sat_f64_u
Sam Clegg16c16822018-05-10 22:16:44 +0000340xFC 0x07
Thomas Lively22442922018-08-21 21:03:18 +000035
Heejin Ahn7b7a4ef2019-02-05 23:01:41 +000036# FIXME Disabled temporarily due to failures in clang-ppc64be-linux and
37# clang-s390x-linux bots
Heejin Ahn1b8df422019-02-05 22:47:29 +000038# C HECK: v128.const 50462976, 117835012, 185207048, 252579084
Thomas Lively299d2142018-11-09 01:45:56 +0000390xFD 0x02 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
Thomas Livelya0d25812018-09-07 21:54:46 +000040
41# CHECK: v8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Thomas Lively299d2142018-11-09 01:45:56 +0000420xFD 0x03 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
Thomas Lively2faf0792018-11-09 01:57:00 +000043
44# Check LEB128 encoding of SIMD instructions
45# CHECK: i64x2.all_true
460xFD 0x86 0x01
47
48# Including non-canonical LEB128 encodings
49# CHECK: i64x2.any_true
50# CHECK-NOT: i64.div_u
510xFD 0x85 0x81 0x80 0x80 0x80 0x80 0x00
Wouter van Oortmerssen820c6262019-01-03 23:01:30 +000052
53# Check br_table, which has its own operand type.
54# CHECK: br_table {0, 1, 2}
550x0E 0x02 0x00 0x01 0x02
Wouter van Oortmerssen1a91cb02019-02-05 01:19:45 +000056
57# This can mean end_block/end_loop/end_if/end_function/end_try..
58# CHECK: end
590x0B