[AArch64][SME2] Add multi-vector saturating doubling multiply high intrinsics
[llvm-project.git] / lld / test / wasm / externref.s
blobffc63a6d3d0be6db5793e17527dc55dea9986c71
1 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj -o %t.o %s
2 # RUN: wasm-ld %t.o -o %t.wasm
3 # RUN: obj2yaml %t.wasm | FileCheck %s
5 # Tests use of externref type, including storing it in a global
7 .globaltype my_global, externref
9 .globl read_externref
10 read_externref:
11 .functype read_externref () -> (externref)
12 global.get my_global
13 end_function
15 .globl write_externref
16 write_externref:
17 .functype write_externref (externref) -> ()
18 local.get 0
19 global.set my_global
20 end_function
22 my_global:
24 .globl _start
25 _start:
26 .functype _start () -> ()
27 call read_externref
28 call write_externref
29 end_function
31 # CHECK: - Type: GLOBAL
32 # CHECK-NEXT: Globals:
33 # CHECK-NEXT: - Index: 0
34 # CHECK-NEXT: Type: I32
35 # CHECK-NEXT: Mutable: true
36 # CHECK-NEXT: InitExpr:
37 # CHECK-NEXT: Opcode: I32_CONST
38 # CHECK-NEXT: Value: 66560
39 # CHECK-NEXT: - Index: 1
40 # CHECK-NEXT: Type: EXTERNREF
41 # CHECK-NEXT: Mutable: true
42 # CHECK-NEXT: InitExpr:
43 # CHECK-NEXT: Opcode: REF_NULL
44 # CHECK-NEXT: Type: EXTERNREF