summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm/__longjmp.S
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-29 21:02:08 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-29 21:02:08 +0000
commit2607bee41906da4f47d98a92749c11533396838c (patch)
tree0ac6b10026422c6863e63d843305c2ac2f3030f8 /libc/sysdeps/linux/arm/__longjmp.S
parentceb83067f2248eb6f9517440c127250c98bbd8f3 (diff)
Patch by Joseph S. Myers to add support for ARM EABI
Diffstat (limited to 'libc/sysdeps/linux/arm/__longjmp.S')
-rw-r--r--libc/sysdeps/linux/arm/__longjmp.S20
1 files changed, 12 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/arm/__longjmp.S b/libc/sysdeps/linux/arm/__longjmp.S
index ee588b2c8..b73474aa2 100644
--- a/libc/sysdeps/linux/arm/__longjmp.S
+++ b/libc/sysdeps/linux/arm/__longjmp.S
@@ -32,8 +32,18 @@ __longjmp:
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+ ldmia ip!, {v1-v6, sl, fp, sp, lr}
+
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
-# ifdef __MAVERICK__
+#ifdef __VFP_FP__
+ /* Restore the VFP registers. */
+ /* Following instruction is fldmiax ip!, {d8-d15}. */
+ ldc p11, cr8, [r12], #68
+ /* Restore the floating-point status register. */
+ ldr r1, [ip], #4
+ /* Following instruction is fmxr fpscr, r1. */
+ mcr p10, 7, r1, cr1, cr0, 0
+# elif defined __MAVERICK__
cfldrd mvd4, [ip], #8 ; nop
cfldrd mvd5, [ip], #8 ; nop
cfldrd mvd6, [ip], #8 ; nop
@@ -49,15 +59,9 @@ __longjmp:
# else
lfmfd f4, 4, [ip] ! /* load the floating point regs */
# endif
-#else
-# ifdef __MAVERICK__
- add ip, ip, #96 /* skip the FP registers */
-# else
- add ip, ip, #48 /* skip the FP registers */
-# endif
#endif
- ldmia ip , {v1-v6, sl, fp, sp, pc}
+ mov pc, lr
.size __longjmp,.-__longjmp
libc_hidden_def(__longjmp)