From 2607bee41906da4f47d98a92749c11533396838c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 29 Jan 2006 21:02:08 +0000 Subject: Patch by Joseph S. Myers to add support for ARM EABI --- libc/sysdeps/linux/arm/__longjmp.S | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'libc/sysdeps/linux/arm/__longjmp.S') 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) -- cgit v1.2.3