ld: Xfail pr20995 and pr20995-2 for tic6x-*-*
[deliverable/binutils-gdb.git] / ld / testsuite / ld-arm / group-relocs.s
CommitLineData
4962c51a
MS
1@ Tests for group relocations.
2@
3@ Beware when editing this file: it is carefully crafted so that
4@ specific PC- and SB-relative offsets arise.
5@
6@ Note that the gas tests have already checked that group relocations are
7@ handled in the same way for local and external symbols.
8
9@ We will place .text at 0x8000.
10
11 .text
12 .globl _start
13
14_start:
15 @ ALU, PC-relative
16
17 @ Instructions start at .text + 0x0
18 add r0, r15, #:pc_g0:(one_group_needed_alu_pc)
19
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)
23
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)
28
29 @ ALU, SB-relative
30
31a91d61 31 @ Instructions start at .text + 0x18
4962c51a
MS
32 add r0, r0, #:sb_g0:(one_group_needed_alu_sb)
33
31a91d61
NC
34 @ Instructions start at .text + 0x1c
35 add r0, r0, #:sb_g0_nc:(two_groups_needed_alu_sb)
4962c51a
MS
36 add r0, r0, #:sb_g1:(two_groups_needed_alu_sb)
37
31a91d61 38 @ Instructions start at .text + 0x24
4962c51a
MS
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)
42
43 @ LDR, PC-relative
44
45 @ Instructions start at .text + 0x30
31a91d61 46 add r0, pc, #:pc_g0_nc:(two_groups_needed_ldr_pc)
4962c51a
MS
47 ldr r1, [r0, #:pc_g1:(two_groups_needed_ldr_pc + 4)]
48
49 @ Instructions start at .text + 0x38
31a91d61 50 add r0, pc, #:pc_g0_nc:(three_groups_needed_ldr_pc)
4962c51a
MS
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)]
53
54 @ LDR, SB-relative
55
31a91d61 56 @ Instructions start at .text + 0x44
4962c51a
MS
57 ldr r1, [r0, #:sb_g0:(one_group_needed_ldr_sb)]
58
31a91d61 59 @ Instructions start at .text + 0x48
4962c51a
MS
60 add r0, r0, #:sb_g0_nc:(two_groups_needed_ldr_sb)
61 ldr r1, [r0, #:sb_g1:(two_groups_needed_ldr_sb)]
62
31a91d61 63 @ Instructions start at .text + 0x50
4962c51a
MS
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)]
67
68 @ LDRS, PC-relative
69
70 @ Instructions start at .text + 0x5c
31a91d61 71 ldrd r2, [pc, #:pc_g0:(one_group_needed_ldrs_pc)]
4962c51a
MS
72
73 @ Instructions start at .text + 0x60
31a91d61 74 add r0, pc, #:pc_g0_nc:(two_groups_needed_ldrs_pc)
4962c51a
MS
75 ldrd r2, [r0, #:pc_g1:(two_groups_needed_ldrs_pc + 4)]
76
77 @ Instructions start at .text + 0x68
31a91d61 78 add r0, pc, #:pc_g0_nc:(three_groups_needed_ldrs_pc)
4962c51a
MS
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)]
81
82 @ LDRS, SB-relative
83
31a91d61 84 @ Instructions start at .text + 0x74
4962c51a
MS
85 ldrd r2, [r0, #:sb_g0:(one_group_needed_ldrs_sb)]
86
31a91d61 87 @ Instructions start at .text + 0x78
4962c51a
MS
88 add r0, r0, #:sb_g0_nc:(two_groups_needed_ldrs_sb)
89 ldrd r2, [r0, #:sb_g1:(two_groups_needed_ldrs_sb)]
90
31a91d61 91 @ Instructions start at .text + 0x80
4962c51a
MS
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)]
95
96 @ LDC, PC-relative
97
98 @ Instructions start at .text + 0x8c
31a91d61 99 ldc 0, c0, [pc, #:pc_g0:(one_group_needed_ldc_pc)]
4962c51a
MS
100
101 @ Instructions start at .text + 0x90
31a91d61 102 add r0, pc, #:pc_g0_nc:(two_groups_needed_ldc_pc)
4962c51a
MS
103 ldc 0, c0, [r0, #:pc_g1:(two_groups_needed_ldc_pc + 4)]
104
105 @ Instructions start at .text + 0x98
31a91d61 106 add r0, pc, #:pc_g0_nc:(three_groups_needed_ldc_pc)
4962c51a
MS
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)]
109
110 @ LDC, SB-relative
111
31a91d61 112 @ Instructions start at .text + 0xa4
4962c51a
MS
113 ldc 0, c0, [r0, #:sb_g0:(one_group_needed_ldc_sb)]
114
31a91d61 115 @ Instructions start at .text + 0xa8
4962c51a
MS
116 add r0, r0, #:sb_g0_nc:(two_groups_needed_ldc_sb)
117 ldc 0, c0, [r0, #:sb_g1:(two_groups_needed_ldc_sb)]
118
31a91d61 119 @ Instructions start at .text + 0xb0
4962c51a
MS
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)]
123
124@ This point in the file is .text + 0xbc.
125
126one_group_needed_alu_pc:
127one_group_needed_ldrs_pc:
128one_group_needed_ldc_pc:
129 mov r0, #0
130
31a91d61 131@ We will place the section .data at 0x03000000
4962c51a 132
31a91d61 133 .data
4962c51a 134
31a91d61 135 .word 0, 0, 0
4962c51a
MS
136one_group_needed_alu_sb:
137one_group_needed_ldr_sb:
138one_group_needed_ldrs_sb:
139one_group_needed_ldc_sb:
31a91d61
NC
140 .word 1 @ Offset 0xc
141 .fill 0xeef0 - 16, 1, 0
142two_groups_needed_alu_sb:
143two_groups_needed_ldr_sb:
144two_groups_needed_ldrs_sb:
145two_groups_needed_ldc_sb:
146 .word 2 @ Offset 0xeef0
147 .fill 0xffeef0 - 0xeef0 - 4, 1, 0
148three_groups_needed_alu_sb:
149three_groups_needed_ldr_sb:
150three_groups_needed_ldrs_sb:
151three_groups_needed_ldc_sb:
152 .word 3 @ Offset 0xffeef0
4962c51a
MS
153
154@ We will place the section alpha at 0xeef0.
155
c9ee9c4c 156 .section alpha, "x"
4962c51a 157
4962c51a
MS
158two_groups_needed_alu_pc:
159two_groups_needed_ldr_pc:
160two_groups_needed_ldrs_pc:
161two_groups_needed_ldc_pc:
162 mov r0, #0
163
164@ We will place the section beta at 0xffeef0.
165
c9ee9c4c 166 .section beta, "x"
4962c51a 167
4962c51a
MS
168three_groups_needed_alu_pc:
169three_groups_needed_ldr_pc:
170three_groups_needed_ldrs_pc:
171three_groups_needed_ldc_pc:
172 mov r0, #0
173
This page took 0.600654 seconds and 4 git commands to generate.