1 @ Tests for group relocations.
3 @ Beware when editing this file: it is carefully crafted so that
4 @ specific PC- and SB-relative offsets arise.
6 @ Note that the gas tests have already checked that group relocations are
7 @ handled in the same way for local and external symbols.
9 @ We will place .text at 0x8000.
17 @ Instructions start at .text + 0x0
18 add r0, r15, #:pc_g0:(one_group_needed_alu_pc)
20 @ Instructions start at .text + 0x4
21 add r0, r15, #:pc_g0_nc:(two_groups_needed_alu_pc)
22 add r0, r0, #:pc_g1:(two_groups_needed_alu_pc + 4)
24 @ Instructions start at .text + 0xc
25 add r0, r15, #:pc_g0_nc:(three_groups_needed_alu_pc)
26 add r0, r0, #:pc_g1_nc:(three_groups_needed_alu_pc + 4)
27 add r0, r0, #:pc_g2:(three_groups_needed_alu_pc + 8)
31 @ Instructions start at .text + 0x18
32 add r0, r0, #:sb_g0:(one_group_needed_alu_sb)
34 @ Instructions start at .text + 0x1c
35 add r0, r0, #:sb_g0_nc:(two_groups_needed_alu_sb)
36 add r0, r0, #:sb_g1:(two_groups_needed_alu_sb)
38 @ Instructions start at .text + 0x24
39 add r0, r0, #:sb_g0_nc:(three_groups_needed_alu_sb)
40 add r0, r0, #:sb_g1_nc:(three_groups_needed_alu_sb)
41 add r0, r0, #:sb_g2:(three_groups_needed_alu_sb)
45 @ Instructions start at .text + 0x30
46 add r0, pc, #:pc_g0_nc:(two_groups_needed_ldr_pc)
47 ldr r1, [r0, #:pc_g1:(two_groups_needed_ldr_pc + 4)]
49 @ Instructions start at .text + 0x38
50 add r0, pc, #:pc_g0_nc:(three_groups_needed_ldr_pc)
51 add r0, r0, #:pc_g1_nc:(three_groups_needed_ldr_pc + 4)
52 ldr r1, [r0, #:pc_g2:(three_groups_needed_ldr_pc + 8)]
56 @ Instructions start at .text + 0x44
57 ldr r1, [r0, #:sb_g0:(one_group_needed_ldr_sb)]
59 @ Instructions start at .text + 0x48
60 add r0, r0, #:sb_g0_nc:(two_groups_needed_ldr_sb)
61 ldr r1, [r0, #:sb_g1:(two_groups_needed_ldr_sb)]
63 @ Instructions start at .text + 0x50
64 add r0, r0, #:sb_g0_nc:(three_groups_needed_ldr_sb)
65 add r0, r0, #:sb_g1_nc:(three_groups_needed_ldr_sb)
66 ldr r1, [r0, #:sb_g2:(three_groups_needed_ldr_sb)]
70 @ Instructions start at .text + 0x5c
71 ldrd r2, [pc, #:pc_g0:(one_group_needed_ldrs_pc)]
73 @ Instructions start at .text + 0x60
74 add r0, pc, #:pc_g0_nc:(two_groups_needed_ldrs_pc)
75 ldrd r2, [r0, #:pc_g1:(two_groups_needed_ldrs_pc + 4)]
77 @ Instructions start at .text + 0x68
78 add r0, pc, #:pc_g0_nc:(three_groups_needed_ldrs_pc)
79 add r0, r0, #:pc_g1_nc:(three_groups_needed_ldrs_pc + 4)
80 ldrd r2, [r0, #:pc_g2:(three_groups_needed_ldrs_pc + 8)]
84 @ Instructions start at .text + 0x74
85 ldrd r2, [r0, #:sb_g0:(one_group_needed_ldrs_sb)]
87 @ Instructions start at .text + 0x78
88 add r0, r0, #:sb_g0_nc:(two_groups_needed_ldrs_sb)
89 ldrd r2, [r0, #:sb_g1:(two_groups_needed_ldrs_sb)]
91 @ Instructions start at .text + 0x80
92 add r0, r0, #:sb_g0_nc:(three_groups_needed_ldrs_sb)
93 add r0, r0, #:sb_g1_nc:(three_groups_needed_ldrs_sb)
94 ldrd r2, [r0, #:sb_g2:(three_groups_needed_ldrs_sb)]
98 @ Instructions start at .text + 0x8c
99 ldc 0, c0, [pc, #:pc_g0:(one_group_needed_ldc_pc)]
101 @ Instructions start at .text + 0x90
102 add r0, pc, #:pc_g0_nc:(two_groups_needed_ldc_pc)
103 ldc 0, c0, [r0, #:pc_g1:(two_groups_needed_ldc_pc + 4)]
105 @ Instructions start at .text + 0x98
106 add r0, pc, #:pc_g0_nc:(three_groups_needed_ldc_pc)
107 add r0, r0, #:pc_g1_nc:(three_groups_needed_ldc_pc + 4)
108 ldc 0, c0, [r0, #:pc_g2:(three_groups_needed_ldc_pc + 8)]
112 @ Instructions start at .text + 0xa4
113 ldc 0, c0, [r0, #:sb_g0:(one_group_needed_ldc_sb)]
115 @ Instructions start at .text + 0xa8
116 add r0, r0, #:sb_g0_nc:(two_groups_needed_ldc_sb)
117 ldc 0, c0, [r0, #:sb_g1:(two_groups_needed_ldc_sb)]
119 @ Instructions start at .text + 0xb0
120 add r0, r0, #:sb_g0_nc:(three_groups_needed_ldc_sb)
121 add r0, r0, #:sb_g1_nc:(three_groups_needed_ldc_sb)
122 ldc 0, c0, [r0, #:sb_g2:(three_groups_needed_ldc_sb)]
124 @ This point in the file is .text + 0xbc.
126 one_group_needed_alu_pc:
127 one_group_needed_ldrs_pc:
128 one_group_needed_ldc_pc:
131 @ We will place the section .data at 0x03000000
136 one_group_needed_alu_sb:
137 one_group_needed_ldr_sb:
138 one_group_needed_ldrs_sb:
139 one_group_needed_ldc_sb:
141 .fill 0xeef0 - 16, 1, 0
142 two_groups_needed_alu_sb:
143 two_groups_needed_ldr_sb:
144 two_groups_needed_ldrs_sb:
145 two_groups_needed_ldc_sb:
146 .word 2 @ Offset 0xeef0
147 .fill 0xffeef0 - 0xeef0 - 4, 1, 0
148 three_groups_needed_alu_sb:
149 three_groups_needed_ldr_sb:
150 three_groups_needed_ldrs_sb:
151 three_groups_needed_ldc_sb:
152 .word 3 @ Offset 0xffeef0
154 @ We will place the section alpha at 0xeef0.
158 two_groups_needed_alu_pc:
159 two_groups_needed_ldr_pc:
160 two_groups_needed_ldrs_pc:
161 two_groups_needed_ldc_pc:
164 @ We will place the section beta at 0xffeef0.
168 three_groups_needed_alu_pc:
169 three_groups_needed_ldr_pc:
170 three_groups_needed_ldrs_pc:
171 three_groups_needed_ldc_pc: