99 .text
1010 .syntax unified
1111
12- # CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_CALL call_target
12+ # CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_CALL call_target_thumb
1313# CHECK-INSTR: 00000000 <call_site>:
14- # CHECK-INSTR: 0: f7ff fffe bl 0x0 <call_site>
15- # CHECK-INSTR: 00000004 <call_target>:
16- # CHECK-INSTR: 4: 4770 bx lr
14+ # CHECK-INSTR: 0: f7ff fffe bl
15+ # CHECK-INSTR: 4: f7ff fffe bl
16+ # CHECK-INSTR: 00000008 <call_target_thumb>
17+ # CHECK-INSTR: 0000000c <call_target_arm>
1718# We decode the operand with index 2, because bl generates two leading implicit
1819# predicate operands that we have to skip in order to decode the call_target operand
19- # jitlink-check: decode_operand(call_site, 2) = call_target - next_pc(call_site)
20+ # jitlink-check: decode_operand(call_site + 0, 2) = call_target_thumb - (call_site + 4)
21+ # jitlink-check: decode_operand(call_site + 4, 2) = call_target_arm - (call_site + 8)
2022 .globl call_site
2123 .type call_site,%function
2224 .p2align 1
2325 .code 16
2426 .thumb_func
2527call_site:
26- bl call_target
27- .size call_site, .-call_site
28+ bl call_target_thumb
29+ bl call_target_arm
30+ .size call_site, .-call_site
2831
29- .globl call_target
30- .type call_target ,%function
32+ .globl call_target_thumb
33+ .type call_target_thumb ,%function
3134 .p2align 1
3235 .code 16
3336 .thumb_func
34- call_target :
37+ call_target_thumb :
3538 bx lr
36- .size call_target, .-call_target
39+ .size call_target_thumb, .-call_target_thumb
40+
41+ .globl call_target_arm
42+ .type call_target_arm,%function
43+ .p2align 2
44+ .code 32
45+ call_target_arm:
46+ bx lr
47+ .size call_target_arm, .-call_target_arm
3748
3849# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_JUMP24 jump24_target
39- # CHECK-INSTR: 00000006 <jump24_site>:
40- # CHECK-INSTR: 6: f7ff bffe b.w 0x6 <jump24_site>
41- # CHECK-INSTR: 0000000a <jump24_target>:
42- # CHECK-INSTR: a: 4770 bx lr
50+ # CHECK-INSTR: 00000010 <jump24_site>:
51+ # CHECK-INSTR: 10: f7ff bffe b.w
52+ # CHECK-INSTR: 00000014 <jump24_target>
4353# b.w generates two implicit predicate operands as well, but they are trailing
4454# operands, so there is no need to adjust the operand index.
4555# jitlink-check: decode_operand(jump24_site, 0) = jump24_target - next_pc(jump24_site)
@@ -62,8 +72,8 @@ jump24_target:
6272 .size jump24_target, .-jump24_target
6373
6474# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_MOVW_ABS_NC data_symbol
65- # CHECK-INSTR: 0000000c <movw>:
66- # CHECK-INSTR: c : f240 0000 movw r0, #0x0
75+ # CHECK-INSTR: 00000016 <movw>:
76+ # CHECK-INSTR: 16 : f240 0000 movw r0, #0x0
6777# jitlink-check: decode_operand(movw, 1) = (data_symbol&0x0000ffff)
6878 .globl movw
6979 .type movw ,%function
7585 .size movw , .-movw
7686
7787# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_MOVT_ABS data_symbol
78- # CHECK-INSTR: 00000010 <movt>:
79- # CHECK-INSTR: 10 : f2c0 0000 movt r0, #0x0
88+ # CHECK-INSTR: 0000001a <movt>:
89+ # CHECK-INSTR: 1a : f2c0 0000 movt r0, #0x0
8090# We decode the operand with index 2, because movt generates one leading implicit
8191# predicate operand that we have to skip in order to decode the data_symbol operand
8292# jitlink-check: decode_operand(movt, 2) = (data_symbol&0xffff0000>>16)
@@ -97,8 +107,8 @@ data_symbol:
97107 .text
98108
99109# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_MOVW_PREL_NC external_func
100- # CHECK-INSTR: 00000014 <movw_prel>:
101- # CHECK-INSTR: 14 : f240 0000 movw r0, #0x0
110+ # CHECK-INSTR: 0000001e <movw_prel>:
111+ # CHECK-INSTR: 1e : f240 0000 movw r0, #0x0
102112# jitlink-check: decode_operand(movw_prel, 1) = \
103113# jitlink-check: ((external_func - movw_prel)&0x0000ffff)
104114.globl movw_prel
@@ -111,8 +121,8 @@ movw_prel:
111121 .size movw_prel, .-movw_prel
112122
113123# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_MOVT_PREL external_func
114- # CHECK-INSTR: 00000018 <movt_prel>:
115- # CHECK-INSTR: 18 : f2c0 0000 movt r0, #0x0
124+ # CHECK-INSTR: 00000022 <movt_prel>:
125+ # CHECK-INSTR: 22 : f2c0 0000 movt r0, #0x0
116126# jitlink-check: decode_operand(movt_prel, 2) = \
117127# jitlink-check: ((external_func - movt_prel)&0xffff0000>>16)
118128.globl movt_prel
0 commit comments