This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch roland/arm created. glibc-2.21-207-g6e0e137
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 18 Mar 2015 23:14:57 -0000
- Subject: GNU C Library master sources branch roland/arm created. glibc-2.21-207-g6e0e137
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, roland/arm has been created
at 6e0e1372cd43a88eb088dc20a68a87130db085b2 (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e0e1372cd43a88eb088dc20a68a87130db085b2
commit 6e0e1372cd43a88eb088dc20a68a87130db085b2
Author: Roland McGrath <roland@hack.frob.com>
Date: Wed Mar 18 16:13:27 2015 -0700
ARM: Fix memcpy & memmove for [ARM_ALWAYS_BX]
diff --git a/ChangeLog b/ChangeLog
index d449323..7cc2831 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-18 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-18 Joseph Myers <joseph@codesourcery.com>
[BZ #18138]
diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S
index 0602d99..e86c587 100644
--- a/sysdeps/arm/memcpy.S
+++ b/sysdeps/arm/memcpy.S
@@ -125,7 +125,12 @@ ENTRY(memcpy)
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
@@ -156,11 +161,16 @@ ENTRY(memcpy)
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 6.
+ 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
diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S
index f8a4eff..b89d08b 100644
--- a/sysdeps/arm/memmove.S
+++ b/sysdeps/arm/memmove.S
@@ -141,7 +141,12 @@ ENTRY(memmove)
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
@@ -172,11 +177,16 @@ ENTRY(memmove)
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 6.
+ 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]!
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources