[AArch64][SME2] Add multi-vector saturating doubling multiply high intrinsics
[llvm-project.git] / lld / test / wasm / globals.s
blob6e049e1e73f9185f43d43cf79eacff8afb3269da
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: wasm-ld %t.o -o %t.wasm
3 # RUN: obj2yaml %t.wasm | FileCheck %s
5 .globl _start
6 .globl read_global
7 .globl write_global
9 .globaltype foo_global, i32
10 .globaltype bar_global, f32
11 .globaltype immutable_global, i32, immutable
13 read_global:
14 .functype read_global () -> (i32)
15 global.get immutable_global
16 end_function
18 write_global:
19 .functype write_global (i32) -> ()
20 local.get 0
21 global.set foo_global
22 f32.const 1.0
23 global.set bar_global
24 end_function
26 _start:
27 .functype _start () -> ()
28 i32.const 1
29 call write_global
30 call read_global
31 drop
32 end_function
34 foo_global:
35 bar_global:
36 immutable_global:
38 # CHECK: - Type: GLOBAL
39 # CHECK-NEXT: Globals:
40 # CHECK-NEXT: - Index: 0
41 # CHECK-NEXT: Type: I32
42 # CHECK-NEXT: Mutable: true
43 # CHECK-NEXT: InitExpr:
44 # CHECK-NEXT: Opcode: I32_CONST
45 # CHECK-NEXT: Value: 66560
46 # CHECK-NEXT: - Index: 1
47 # CHECK-NEXT: Type: I32
48 # CHECK-NEXT: Mutable: false
49 # CHECK-NEXT: InitExpr:
50 # CHECK-NEXT: Opcode: I32_CONST
51 # CHECK-NEXT: Value: 0
52 # CHECK-NEXT: - Index: 2
53 # CHECK-NEXT: Type: I32
54 # CHECK-NEXT: Mutable: true
55 # CHECK-NEXT: InitExpr:
56 # CHECK-NEXT: Opcode: I32_CONST
57 # CHECK-NEXT: Value: 0
58 # CHECK-NEXT: - Index: 3
59 # CHECK-NEXT: Type: F32
60 # CHECK-NEXT: Mutable: true
61 # CHECK-NEXT: InitExpr:
62 # CHECK-NEXT: Opcode: F32_CONST
63 # CHECK-NEXT: Value: 0