about summary refs log tree commit diff
path: root/ports/sysdeps/arm/__longjmp.S
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-08-09 16:17:14 -0700
committerRoland McGrath <roland@hack.frob.com>2012-08-09 16:37:50 -0700
commit2aa5b9c146ae9a3efabd430b12cddb635bc29164 (patch)
treef5f4b220d3426044daf25e74283f94c1091c1824 /ports/sysdeps/arm/__longjmp.S
parent7f540252876b853889c9482c9086ac1c55fe6e3c (diff)
downloadglibc-2aa5b9c146ae9a3efabd430b12cddb635bc29164.tar.gz
glibc-2aa5b9c146ae9a3efabd430b12cddb635bc29164.tar.xz
glibc-2aa5b9c146ae9a3efabd430b12cddb635bc29164.zip
Make ARM setjmp/longjmp respect ARM_ASSUME_NO_IWMMXT macro.
Diffstat (limited to 'ports/sysdeps/arm/__longjmp.S')
-rw-r--r--ports/sysdeps/arm/__longjmp.S31
1 files changed, 21 insertions, 10 deletions
diff --git a/ports/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S
index aa5cf74ad0..b3c286083c 100644
--- a/ports/sysdeps/arm/__longjmp.S
+++ b/ports/sysdeps/arm/__longjmp.S
@@ -21,6 +21,7 @@
 #define _ASM
 #include <bits/setjmp.h>
 #include <rtld-global-offsets.h>
+#include <arm-features.h>
 
 /* __longjmp(jmpbuf, val) */
 
@@ -46,23 +47,29 @@ ENTRY (__longjmp)
 	cfi_restore (sp)
 	cfi_restore (lr)
 
-#ifdef IS_IN_rtld
+#if !defined ARM_ASSUME_NO_IWMMXT || defined __SOFTFP__
+# define NEED_HWCAP 1
+#endif
+
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
 	ldr	a2, 1f
 	ldr	a3, .Lrtld_local_ro
 0:	add	a2, pc, a2
 	add	a2, a2, a3
 	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-#ifdef PIC
+# else
+#  ifdef PIC
 	ldr	a2, 1f
 	ldr	a3, .Lrtld_global_ro
 0:	add	a2, pc, a2
 	ldr	a2, [a2, a3]
 	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
+#  else
 	ldr	a2, .Lhwcap
 	ldr	a2, [a2, #0]
-#endif
+#  endif
+# endif
 #endif
 
 #ifdef __SOFTFP__
@@ -79,6 +86,7 @@ ENTRY (__longjmp)
 	mcr	p10, 7, a3, cr1, cr0, 0
 .Lno_vfp:
 
+#ifndef ARM_ASSUME_NO_IWMMXT
 	tst	a2, #HWCAP_ARM_IWMMXT
 	beq	.Lno_iwmmxt
 
@@ -91,22 +99,25 @@ ENTRY (__longjmp)
 	ldcl	p1, cr14, [r12], #8
 	ldcl	p1, cr15, [r12], #8
 .Lno_iwmmxt:
+#endif
 
 	DO_RET(lr)
 
-#ifdef IS_IN_rtld
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
 .Lrtld_local_ro:
 	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-#else
-#ifdef PIC
+# else
+#  ifdef PIC
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
 .Lrtld_global_ro:
 	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-#else
+#  else
 .Lhwcap:
 	.long	C_SYMBOL_NAME(_dl_hwcap)
-#endif
+#  endif
+# endif
 #endif
 
 END (__longjmp)