File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ # RUN: llvm-mc -triple=wasm32 %s | FileCheck --check-prefix=PRINT %s
2
+ # RUN: llvm-mc -filetype=obj -triple=wasm32 %s | llvm-readobj -r - | FileCheck %s
3
+
4
+ load_function_index_func:
5
+ .functype load_function_index_func () -> (i32)
6
+ i32.const 0
7
+ nop
8
+ nop
9
+ nop
10
+ nop
11
+ i32.load 0
12
+ end_function
13
+
14
+ # PRINT: .reloc load_function_index_func+2, R_WASM_MEMORY_ADDR_SLEB, function_index_data+1
15
+ # CHECK: Section ({{.*}}) CODE {
16
+ # CHECK-NEXT: 0x4 R_WASM_MEMORY_ADDR_SLEB function_index_data 1
17
+ # CHECK-NEXT: }
18
+ .reloc load_function_index_func + 2 , R_WASM_MEMORY_ADDR_SLEB, function_index_data + 1
19
+
20
+ .section .data ,"",@
21
+ function_index_data:
22
+ .int32 0
23
+ .size function_index_data, 4
24
+
25
+ # PRINT: .reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, load_function_index_func
26
+ # CHECK: Section ({{.*}}) DATA {
27
+ # CHECK-NEXT: 0x6 R_WASM_FUNCTION_INDEX_I32 load_function_index_func
28
+ # CHECK-NEXT: }
29
+ .reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, load_function_index_func
You can’t perform that action at this time.
0 commit comments