9
9
.text
10
10
.syntax unified
11
11
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
13
13
# 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>
17
18
# We decode the operand with index 2, because bl generates two leading implicit
18
19
# 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)
20
22
.globl call_site
21
23
.type call_site,%function
22
24
.p2align 1
23
25
.code 16
24
26
.thumb_func
25
27
call_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
28
31
29
- .globl call_target
30
- .type call_target ,%function
32
+ .globl call_target_thumb
33
+ .type call_target_thumb ,%function
31
34
.p2align 1
32
35
.code 16
33
36
.thumb_func
34
- call_target :
37
+ call_target_thumb :
35
38
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
37
48
38
49
# 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>
43
53
# b.w generates two implicit predicate operands as well, but they are trailing
44
54
# operands, so there is no need to adjust the operand index.
45
55
# jitlink-check: decode_operand(jump24_site, 0) = jump24_target - next_pc(jump24_site)
@@ -62,8 +72,8 @@ jump24_target:
62
72
.size jump24_target, .-jump24_target
63
73
64
74
# 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
67
77
# jitlink-check: decode_operand(movw, 1) = (data_symbol&0x0000ffff)
68
78
.globl movw
69
79
.type movw ,%function
75
85
.size movw , .-movw
76
86
77
87
# 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
80
90
# We decode the operand with index 2, because movt generates one leading implicit
81
91
# predicate operand that we have to skip in order to decode the data_symbol operand
82
92
# jitlink-check: decode_operand(movt, 2) = (data_symbol&0xffff0000>>16)
@@ -97,8 +107,8 @@ data_symbol:
97
107
.text
98
108
99
109
# 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
102
112
# jitlink-check: decode_operand(movw_prel, 1) = \
103
113
# jitlink-check: ((external_func - movw_prel)&0x0000ffff)
104
114
.globl movw_prel
@@ -111,8 +121,8 @@ movw_prel:
111
121
.size movw_prel, .-movw_prel
112
122
113
123
# 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
116
126
# jitlink-check: decode_operand(movt_prel, 2) = \
117
127
# jitlink-check: ((external_func - movt_prel)&0xffff0000>>16)
118
128
.globl movt_prel
0 commit comments