* include/elf/arm.h: Correct names of R_ARM_LDC_G{0,1,2}
[binutils.git] / gas / testsuite / gas / arm / group-reloc-ldr.s
blob389042d70aff3abec0def8eb8c808f909197209c
1 @ Tests for LDR group relocations.
3 .text
5 .macro ldrtest load store sym offset
7 \load r0, [r0, #:pc_g0:(\sym \offset)]
8 \load r0, [r0, #:pc_g1:(\sym \offset)]
9 \load r0, [r0, #:pc_g2:(\sym \offset)]
10 \load r0, [r0, #:sb_g0:(\sym \offset)]
11 \load r0, [r0, #:sb_g1:(\sym \offset)]
12 \load r0, [r0, #:sb_g2:(\sym \offset)]
14 \store r0, [r0, #:pc_g0:(\sym \offset)]
15 \store r0, [r0, #:pc_g1:(\sym \offset)]
16 \store r0, [r0, #:pc_g2:(\sym \offset)]
17 \store r0, [r0, #:sb_g0:(\sym \offset)]
18 \store r0, [r0, #:sb_g1:(\sym \offset)]
19 \store r0, [r0, #:sb_g2:(\sym \offset)]
21 .endm
23 @ LDR/STR/LDRB/STRB only have 12 bits available for the magnitude of the addend.
24 @ So these should all (just) work.
26 ldrtest ldr str f "+ 4095"
27 ldrtest ldrb strb f "+ 4095"
28 ldrtest ldr str f "- 4095"
29 ldrtest ldrb strb f "- 4095"
31 @ The same as the above, but for a local symbol. These should not be
32 @ resolved by the assembler but instead left to the linker.
34 ldrtest ldr str localsym "+ 4095"
35 ldrtest ldrb strb localsym "+ 4095"
36 ldrtest ldr str localsym "- 4095"
37 ldrtest ldrb strb localsym "- 4095"
39 localsym:
40 mov r0, #0