1 @ Tests for LDRS group relocations.
5 .macro ldrtest2 load sym offset
7 \load r0, [r0, #:pc_g1:(\sym \offset)]
8 \load r0, [r0, #:pc_g2:(\sym \offset)]
9 \load r0, [r0, #:sb_g0:(\sym \offset)]
10 \load r0, [r0, #:sb_g1:(\sym \offset)]
11 \load r0, [r0, #:sb_g2:(\sym \offset)]
15 .macro ldrtest load store sym offset
17 ldrtest2 \load \sym \offset
19 \store r0, [r0, #:pc_g1:(\sym \offset)]
20 \store r0, [r0, #:pc_g2:(\sym \offset)]
21 \store r0, [r0, #:sb_g0:(\sym \offset)]
22 \store r0, [r0, #:sb_g1:(\sym \offset)]
23 \store r0, [r0, #:sb_g2:(\sym \offset)]
27 @ LDRD/STRD/LDRH/STRH/LDRSH/LDRSB only have 8 bits available for the
28 @ magnitude of the addend. So these should all (just) work.
30 ldrtest ldrd strd f "+ 255"
31 ldrtest ldrh strh f "+ 255"
32 ldrtest2 ldrsh f "+ 255"
33 ldrtest2 ldrsb f "+ 255"
35 ldrtest ldrd strd f "- 255"
36 ldrtest ldrh strh f "- 255"
37 ldrtest2 ldrsh f "- 255"
38 ldrtest2 ldrsb f "- 255"
40 @ The same as the above, but for a local symbol.
42 ldrtest ldrd strd localsym "+ 255"
43 ldrtest ldrh strh localsym "+ 255"
44 ldrtest2 ldrsh localsym "+ 255"
45 ldrtest2 ldrsb localsym "+ 255"
47 ldrtest ldrd strd localsym "- 255"
48 ldrtest ldrh strh localsym "- 255"
49 ldrtest2 ldrsh localsym "- 255"
50 ldrtest2 ldrsb localsym "- 255"