[LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL
[llvm-project.git] / lld / test / wasm / shared-memory-bss.s
bloba8a05b8014238c63ccc0b56865c76d72123b4337
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: wasm-ld --experimental-pic -shared --shared-memory -o %t.so %t.o
3 # RUN: llvm-objdump -d --no-show-raw-insn --no-leading-addr %t.so | FileCheck %s
4 # RUN: obj2yaml %t.so | FileCheck %s --check-prefix=YAML
6 .section .bss.foo,"",@
7 .globl foo
8 .p2align 2
9 foo:
10 .int32 0
11 .size foo, 4
13 .section .data.bar,"",@
14 .globl bar
15 .p2align 2
16 bar:
17 .int32 42
18 .size bar, 4
20 .section .custom_section.target_features,"",@
21 .int8 2
22 .int8 43
23 .int8 7
24 .ascii "atomics"
25 .int8 43
26 .int8 11
27 .ascii "bulk-memory"
29 # Verify that there is only a single data segment and no bss
30 # in the binary:
32 # YAML: - Type: DATA{{$}}
33 # YAML-NEXT: Segments:
34 # YAML-NEXT: - SectionOffset: 3
35 # YAML-NEXT: InitFlags: 1
36 # YAML-NEXT: Content: 2A000000
37 # YAML-NEXT: - Type: CUSTOM
39 # CHECK: <__wasm_init_memory>:
40 # CHECK-NEXT: .local i32
41 # CHECK-NEXT: global.get 0
42 # CHECK-NEXT: i32.const 8
43 # CHECK-NEXT: i32.add
44 # CHECK-NEXT: local.set 0
45 # CHECK-NEXT: block
46 # CHECK-NEXT: block
47 # CHECK-NEXT: block
48 # CHECK-NEXT: local.get 0
49 # CHECK-NEXT: i32.const 0
50 # CHECK-NEXT: i32.const 1
51 # CHECK-NEXT: i32.atomic.rmw.cmpxchg 0
52 # CHECK-NEXT: br_table {0, 1, 2} # 1: down to label1
53 # CHECK-NEXT: # 2: down to label0
54 # CHECK-NEXT: end
56 # Regular data gets initialized with memory.init
58 # CHECK-NEXT: i32.const 0
59 # CHECK-NEXT: global.get 0
60 # CHECK-NEXT: i32.add
61 # CHECK-NEXT: i32.const 0
62 # CHECK-NEXT: i32.const 4
63 # CHECK-NEXT: memory.init 0, 0
65 # BSS gets initialized with memory.fill
67 # CHECK-NEXT: i32.const 4
68 # CHECK-NEXT: global.get 0
69 # CHECK-NEXT: i32.add
70 # CHECK-NEXT: i32.const 0
71 # CHECK-NEXT: i32.const 4
72 # CHECK-NEXT: memory.fill 0