This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[PATCH roland/arm-avoid-pc] ARM: Handle ARM_ALWAYS_BX in {add,sub}_n.S code.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-ports at sourceware dot org
- Date: Mon, 11 Mar 2013 14:31:10 -0700 (PDT)
- Subject: [PATCH roland/arm-avoid-pc] ARM: Handle ARM_ALWAYS_BX in {add,sub}_n.S code.
This is on the same unmerged branch, so assumes at least the first patch.
OK?
Thanks,
Roland
ports/ChangeLog.arm
* sysdeps/arm/add_n.S: Include <arm-features.h>.
[ARM_ALWAYS_BX]: Don't pop into pc.
--- a/ports/sysdeps/arm/add_n.S
+++ b/ports/sysdeps/arm/add_n.S
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <arm-features.h>
.syntax unified
.text
@@ -80,5 +81,10 @@ ENTRY (FUNC)
9:
RETC /* copy carry out */
+#ifndef ARM_ALWAYS_BX
pop { r4, r5, r6, r7, r8, r10, pc }
+#else
+ pop { r4, r5, r6, r7, r8, r10, lr }
+ bx lr
+#endif
END (FUNC)