+2015-03-19 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/memcpy.S [ARM_ALWAYS_BX]: Fix computed-jump calculations
+ to account for alignment padding.
+ * sysdeps/arm/memmove.S: Likewise.
+
2015-03-19 Chris Metcalf <cmetcalf@ezchip.com>
* sysdeps/unix/sysv/linux/generic/README: New file.
push {r10}
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r10, 0)
- add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+0: add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+ /* If alignment is not perfect, then there will be some
+ padding (nop) instructions between this BX and label 6.
+ The computation above assumed that two instructions
+ later is exactly the right spot. */
+ add r10, #(6f - (0b + PC_OFS))
bx r10
#endif
.p2align ARM_BX_ALIGN_LOG2
add pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
nop
#else
- add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+0: add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+ /* If alignment is not perfect, then there will be some
+ padding (nop) instructions between this BX and label 66.
+ The computation above assumed that two instructions
+ later is exactly the right spot. */
+ add r10, #(66f - (0b + PC_OFS))
bx r10
#endif
.p2align ARM_BX_ALIGN_LOG2
- nop
+66: nop
.p2align ARM_BX_ALIGN_LOG2
sfi_breg r0, \
str r3, [\B], #4
push {r10}
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r10, 0)
- add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+0: add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+ /* If alignment is not perfect, then there will be some
+ padding (nop) instructions between this BX and label 6.
+ The computation above assumed that two instructions
+ later is exactly the right spot. */
+ add r10, #(6f - (0b + PC_OFS))
bx r10
#endif
.p2align ARM_BX_ALIGN_LOG2
add pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
nop
#else
- add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+0: add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)
+ /* If alignment is not perfect, then there will be some
+ padding (nop) instructions between this BX and label 66.
+ The computation above assumed that two instructions
+ later is exactly the right spot. */
+ add r10, #(66f - (0b + PC_OFS))
bx r10
#endif
.p2align ARM_BX_ALIGN_LOG2
- nop
+66: nop
.p2align ARM_BX_ALIGN_LOG2
sfi_breg r0, \
str r3, [\B, #-4]!