summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2013-03-13 09:51:37 -0700
committerRoland McGrath <roland@hack.frob.com>2013-03-13 09:51:37 -0700
commitccffb2a2db302beb07493fca6b1365ff3c8135dc (patch)
tree3db3df8819c16779a647ca7dd814ba03b1642340 /ports
parent9e1d4ac924d66f4cfbcca3e98bd1bd62a5d92d5f (diff)
downloadglibc-ccffb2a2db302beb07493fca6b1365ff3c8135dc.tar.gz
ARM: Handle ARM_ALWAYS_BX in {add,sub}_n.S code.
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.arm3
-rw-r--r--ports/sysdeps/arm/add_n.S6
2 files changed, 9 insertions, 0 deletions
diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 72060bac34..71520a6344 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,5 +1,8 @@
2013-03-13 Roland McGrath <roland@hack.frob.com>
+ * sysdeps/arm/add_n.S: Include <arm-features.h>.
+ [ARM_ALWAYS_BX]: Don't pop into pc.
+
* sysdeps/arm/arm-features.h: Add comment about ARM_ALWAYS_BX.
* sysdeps/arm/memcpy.S: Include <arm-features.h>.
[ARM_ALWAYS_BX]: Avoid pc as destination.
diff --git a/ports/sysdeps/arm/add_n.S b/ports/sysdeps/arm/add_n.S
index 119a9942d1..52927d997d 100644
--- 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)