From 8dd9c51eb2f6c5dc659b426dc3bd114751adb405 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 31 Jan 2002 15:49:34 +0000 Subject: Fixup setjmp and longjmp so they behave themselves properly now on both x86 and arm... -Erik --- libc/sysdeps/linux/arm/setjmp.S | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'libc/sysdeps/linux/arm/setjmp.S') diff --git a/libc/sysdeps/linux/arm/setjmp.S b/libc/sysdeps/linux/arm/setjmp.S index a993f8c59..166e4efab 100644 --- a/libc/sysdeps/linux/arm/setjmp.S +++ b/libc/sysdeps/linux/arm/setjmp.S @@ -17,25 +17,24 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #define _SETJMP_H #define _ASM #include - /* Binary compatibility entry point. */ -.globl _setjmp; -.type _setjmp,#function -.align 4; -_setjmp: - mov r1, #0 - - .globl __sigsetjmp; -.type __sigsetjmp,#function +.type __sigsetjmp,%function .align 4; __sigsetjmp: /* Save registers */ - stmia r0, {v1-v6, sl, fp, sp, lr} +#ifdef __UCLIBC_HAS_FLOATS__ + sfmea f4, 4, [r0]! +#endif + stmia r0, {v1-v6, sl, fp, sp, lr} + + /* Restore pointer to jmp_buf */ + sub r0, r0, #48 /* Make a tail call to __sigjmp_save; it takes the same args. */ - B __sigjmp_save + B __sigjmp_save (PLT) .size __sigsetjmp,.-__sigsetjmp; -- cgit v1.2.3