|
2 | 2 | # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten %S/Inputs/internal_func.s -o %t.internal_func.o
|
3 | 3 | # RUN: wasm-ld --no-gc-sections --experimental-pic -pie --unresolved-symbols=import-dynamic -o %t.wasm %t.o %t.internal_func.o
|
4 | 4 | # RUN: obj2yaml %t.wasm | FileCheck %s
|
5 |
| -# RUN: llvm-objdump --disassemble-symbols=__wasm_call_ctors,__wasm_apply_data_relocs,__wasm_apply_global_relocs --no-show-raw-insn --no-leading-addr %t.wasm | FileCheck %s --check-prefixes DISASSEM |
| 5 | +# RUN: llvm-objdump --disassemble-symbols=__wasm_call_ctors,__wasm_apply_data_relocs --no-show-raw-insn --no-leading-addr %t.wasm | FileCheck %s --check-prefixes DISASSEM |
6 | 6 |
|
7 | 7 | .functype external_func () -> ()
|
8 | 8 | .functype internal_func1 () -> (i32)
|
|
41 | 41 | drop
|
42 | 42 |
|
43 | 43 | global.get __stack_pointer
|
44 |
| - drop |
45 |
| - |
46 |
| - global.get __wasm_first_page_end@GOT |
47 | 44 | end_function
|
48 | 45 |
|
49 | 46 | get_data_address:
|
@@ -148,18 +145,6 @@ _start:
|
148 | 145 | # DISASSEM-LABEL: <__wasm_apply_data_relocs>:
|
149 | 146 | # DISASSEM: end
|
150 | 147 |
|
151 |
| -# global 6 is __wasm_first_page_end, which is ABSOLUTE and |
152 |
| -# thus should not be relocated. |
153 |
| -# |
154 |
| -# DISASSEM-LABEL: <__wasm_apply_global_relocs>: |
155 |
| -# DISASSEM: global.set 4 |
156 |
| -# DISASSEM: global.set 5 |
157 |
| -# DISASSEM-NOT: global.set 6 |
158 |
| -# DISASSEM: global.set 7 |
159 |
| -# DISASSEM: global.set 8 |
160 |
| -# DISASSEM: global.set 9 |
161 |
| -# DISASSEM: end |
162 |
| - |
163 | 148 | # Run the same test with extended-const support. When this is available
|
164 | 149 | # we don't need __wasm_apply_global_relocs and instead rely on the add
|
165 | 150 | # instruction in the InitExpr. We also, therefore, do not need these globals
|
@@ -188,23 +173,17 @@ _start:
|
188 | 173 | # EXTENDED-CONST-NEXT: Type: I32
|
189 | 174 | # EXTENDED-CONST-NEXT: Mutable: false
|
190 | 175 | # EXTENDED-CONST-NEXT: InitExpr:
|
191 |
| -# EXTENDED-CONST-NEXT: Opcode: I32_CONST |
192 |
| -# EXTENDED-CONST-NEXT: Value: 65536 |
193 |
| -# EXTENDED-CONST-NEXT: - Index: 7 |
194 |
| -# EXTENDED-CONST-NEXT: Type: I32 |
195 |
| -# EXTENDED-CONST-NEXT: Mutable: false |
196 |
| -# EXTENDED-CONST-NEXT: InitExpr: |
197 | 176 | # EXTENDED-CONST-NEXT: Extended: true
|
198 | 177 | # This instruction sequence decodes to:
|
199 | 178 | # (global.get[0x23] 0x1 i32.const[0x41] 0x0C i32.add[0x6A] end[0x0b])
|
200 | 179 | # EXTENDED-CONST-NEXT: Body: 2301410C6A0B
|
201 |
| -# EXTENDED-CONST-NEXT: - Index: 8 |
| 180 | +# EXTENDED-CONST-NEXT: - Index: 7 |
202 | 181 | # EXTENDED-CONST-NEXT: Type: I32
|
203 | 182 | # EXTENDED-CONST-NEXT: Mutable: false
|
204 | 183 | # EXTENDED-CONST-NEXT: InitExpr:
|
205 | 184 | # EXTENDED-CONST-NEXT: Opcode: GLOBAL_GET
|
206 | 185 | # EXTENDED-CONST-NEXT: Index: 2
|
207 |
| -# EXTENDED-CONST-NEXT: - Index: 9 |
| 186 | +# EXTENDED-CONST-NEXT: - Index: 8 |
208 | 187 | # EXTENDED-CONST-NEXT: Type: I32
|
209 | 188 | # EXTENDED-CONST-NEXT: Mutable: false
|
210 | 189 | # EXTENDED-CONST-NEXT: InitExpr:
|
|
0 commit comments