1
@ Tests that are meant to fail during encoding of 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) fail.
30
ldrtest ldrd strd f "+ 256"
31
ldrtest ldrh strh f "+ 256"
32
ldrtest2 ldrsh f "+ 256"
33
ldrtest2 ldrsb f "+ 256"
35
ldrtest ldrd strd f "- 256"
36
ldrtest ldrh strh f "- 256"
37
ldrtest2 ldrsh f "- 256"
38
ldrtest2 ldrsb f "- 256"
40
@ The same as the above, but for a local symbol.
42
ldrtest ldrd strd localsym "+ 256"
43
ldrtest ldrh strh localsym "+ 256"
44
ldrtest2 ldrsh localsym "+ 256"
45
ldrtest2 ldrsb localsym "+ 256"
47
ldrtest ldrd strd localsym "- 256"
48
ldrtest ldrh strh localsym "- 256"
49
ldrtest2 ldrsh localsym "- 256"
50
ldrtest2 ldrsb localsym "- 256"