From ccffb2a2db302beb07493fca6b1365ff3c8135dc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 13 Mar 2013 09:51:37 -0700 Subject: ARM: Handle ARM_ALWAYS_BX in {add,sub}_n.S code. --- ports/ChangeLog.arm | 3 +++ ports/sysdeps/arm/add_n.S | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'ports') 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 + * sysdeps/arm/add_n.S: Include . + [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_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 @@ . */ #include +#include .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) -- cgit v1.2.3-70-g09d2