This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]