Skip to content

Commit 798891a

Browse files
Address feedback
1 parent 1e75b9b commit 798891a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
# RUN: llvm-mc -triple=wasm32 %s | FileCheck --check-prefix=PRINT %s
22
# RUN: llvm-mc -filetype=obj -triple=wasm32 %s | llvm-readobj -r - | FileCheck %s
33

4-
load_function_index_func:
5-
.functype load_function_index_func () -> (i32)
4+
get_addr_func:
5+
.functype get_addr_func () -> (i32)
66
i32.const 0
7+
nop # 4 NOPs in addition to one zero in i32.const 0 for a canonical 5 byte relocatable [S]LEB.
78
nop
89
nop
910
nop
10-
nop
11-
i32.load 0
1211
end_function
1312

14-
# PRINT: .reloc load_function_index_func+2, R_WASM_MEMORY_ADDR_SLEB, function_index_data+1
13+
# PRINT: .reloc get_addr_func+2, R_WASM_MEMORY_ADDR_SLEB, function_index_data+1
1514
# CHECK: Section ({{.*}}) CODE {
1615
# CHECK-NEXT: 0x4 R_WASM_MEMORY_ADDR_SLEB function_index_data 1
1716
# CHECK-NEXT: }
18-
.reloc load_function_index_func + 2, R_WASM_MEMORY_ADDR_SLEB, function_index_data + 1
17+
.reloc get_addr_func + 2, R_WASM_MEMORY_ADDR_SLEB, function_index_data + 1
1918

2019
.section .data,"",@
2120
function_index_data:
2221
.int32 0
2322
.size function_index_data, 4
2423

25-
# PRINT: .reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, load_function_index_func
24+
# PRINT: .reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, get_addr_func
2625
# CHECK: Section ({{.*}}) DATA {
27-
# CHECK-NEXT: 0x6 R_WASM_FUNCTION_INDEX_I32 load_function_index_func
26+
# CHECK-NEXT: 0x6 R_WASM_FUNCTION_INDEX_I32 get_addr_func
2827
# CHECK-NEXT: }
29-
.reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, load_function_index_func
28+
.reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, get_addr_func

0 commit comments

Comments
 (0)