1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/hello.s -o %t.hello32.o
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
3 # RUN: wasm-ld --no-entry --no-gc-sections --allow-undefined -fatal-warnings -o %t.wasm %t.o %t.hello32.o
4 # RUN: obj2yaml %t.wasm | FileCheck %s
8 # padding for provisioning value assertion
10 .size internal_x_seg_pad, 4
13 .size internal_x_seg, 4
15 # internal cross segment subtraction
19 .int32 internal_x_seg - foo
22 .int32 internal_x_seg - foo
25 # external cross segment subtraction
29 .int32 hello_str - bar
32 .int32 hello_str - bar
35 # positive calc result
52 # CHECK-NEXT: Segments:
53 # CHECK-NEXT: - SectionOffset: 7
54 # CHECK-NEXT: InitFlags: 0
56 # CHECK-NEXT: Opcode: I32_CONST
57 # CHECK-NEXT: Value: 1024
58 # CHECK-NEXT: Content: 68656C6C6F0A00
59 # CHECK-NEXT: - SectionOffset: 20
60 # CHECK-NEXT: InitFlags: 0
62 # CHECK-NEXT: Opcode: I32_CONST
63 # CHECK-NEXT: Value: 1031
64 # CHECK-NEXT: Content: 000000002A000000
65 # CHECK-NEXT: - SectionOffset: 34
66 # CHECK-NEXT: InitFlags: 0
68 # CHECK-NEXT: Opcode: I32_CONST
69 # CHECK-NEXT: Value: 1039
70 # CHECK-NEXT: Content: FCFFFFFFFCFFFFFF
71 # CHECK-NEXT: - SectionOffset: 48
72 # CHECK-NEXT: InitFlags: 0
74 # CHECK-NEXT: Opcode: I32_CONST
75 # CHECK-NEXT: Value: 1047
76 # CHECK-NEXT: Content: E9FFFFFFE9FFFFFF
77 # CHECK-NEXT: - SectionOffset: 62
78 # CHECK-NEXT: InitFlags: 0
80 # CHECK-NEXT: Opcode: I32_CONST
81 # CHECK-NEXT: Value: 1055
82 # CHECK-NEXT: Content: '0800000008000000'
83 # CHECK-NEXT: - SectionOffset: 76
84 # CHECK-NEXT: InitFlags: 0
86 # CHECK-NEXT: Opcode: I32_CONST
87 # CHECK-NEXT: Value: 1063
88 # CHECK-NEXT: Content: '15000000'