Home | History | Annotate | Download | only in arm
      1 @ Tests that are supposed to fail during encoding
      2 @ for LDR group relocations.
      3 
      4 	.text
      5 
      6 	.macro ldrtest load store sym offset
      7 
      8 	\load	r0, [r0, #:pc_g0:(\sym \offset)]
      9 	\load	r0, [r0, #:pc_g1:(\sym \offset)]
     10 	\load	r0, [r0, #:pc_g2:(\sym \offset)]
     11 	\load	r0, [r0, #:sb_g0:(\sym \offset)]
     12 	\load	r0, [r0, #:sb_g1:(\sym \offset)]
     13 	\load	r0, [r0, #:sb_g2:(\sym \offset)]
     14 
     15 	\store	r0, [r0, #:pc_g0:(\sym \offset)]
     16 	\store	r0, [r0, #:pc_g1:(\sym \offset)]
     17 	\store	r0, [r0, #:pc_g2:(\sym \offset)]
     18 	\store	r0, [r0, #:sb_g0:(\sym \offset)]
     19 	\store	r0, [r0, #:sb_g1:(\sym \offset)]
     20 	\store	r0, [r0, #:sb_g2:(\sym \offset)]
     21 
     22 	.endm
     23 
     24 @ LDR/STR/LDRB/STRB only have 12 bits available for the magnitude of the addend.
     25 @ So these should all fail.
     26 
     27 	ldrtest ldr str f "+ 4096"
     28 	ldrtest ldrb strb f "+ 4096"
     29 	ldrtest ldr str f "- 4096"
     30 	ldrtest ldrb strb f "- 4096"
     31 
     32 	ldrtest ldr str localsym "+ 4096"
     33 	ldrtest ldrb strb localsym "+ 4096"
     34 	ldrtest ldr str localsym "- 4096"
     35 	ldrtest ldrb strb localsym "- 4096"
     36 
     37 localsym:
     38 	mov	r0, #0
     39 
     40