1 # RUN: llvm-mc -show-encoding -triple=wasm32-unknown-unknown -mattr=+reference-types < %s | FileCheck %s
2 # RUN: llvm-mc -show-encoding -triple=wasm64-unknown-unknown -mattr=+reference-types < %s | FileCheck %s
4 # CHECK-LABEL:ref_is_null:
5 # CHECK: ref.is_null # encoding: [0xd1]
7 .functype ref_is_null () -> (i32, i32, i32)
16 # CHECK-LABEL: ref_null_test:
17 # CHECK: ref.null_func # encoding: [0xd0,0x70]
18 # CHECK: ref.null_extern # encoding: [0xd0,0x6f]
19 # CHECK: ref.null_exn # encoding: [0xd0,0x69]
21 .functype ref_null_test () -> ()
30 # CHECK-LABEL: ref_sig_test_funcref:
31 # CHECK-NEXT: .functype ref_sig_test_funcref (funcref) -> (funcref)
33 .functype ref_sig_test_funcref (funcref) -> (funcref)
37 # CHECK-LABEL: ref_sig_test_externref:
38 # CHECK-NEXT: .functype ref_sig_test_externref (externref) -> (externref)
39 ref_sig_test_externref
:
40 .functype ref_sig_test_externref (externref) -> (externref)
44 # CHECK-LABEL: ref_sig_test_exnref:
45 # CHECK-NEXT: .functype ref_sig_test_exnref (exnref) -> (exnref)
47 .functype ref_sig_test_exnref (exnref) -> (exnref)
51 # CHECK-LABEL: ref_select_test:
52 # CHECK: funcref.select # encoding: [0x1b]
53 # CHECK: externref.select # encoding: [0x1b]
54 # CHECK: exnref.select # encoding: [0x1b]
56 .functype ref_select_test () -> ()
74 # CHECK-LABEL: ref_block_test:
75 # CHECK: block funcref
76 # CHECK: block externref
79 .functype ref_block_test () -> ()