From bb9393fa99f96a086572d2332e6ac8283b8fe954 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 15 Nov 2002 09:21:07 +0000 Subject: Stefan Allius writes: Hi Erik, I added the FPU support for the setjmp/longjmp stuff. This patch also moves the code from the bsd*.S files to the setjmp.S file, so we can use simple branch instructions instead of referencing over the .GOT/.PLT section. This makes the PIC code much easier, smaller and faster. (The idea comes from the SPARC target) Bye Stefan --- libc/sysdeps/linux/sh/__longjmp.S | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libc/sysdeps/linux/sh/__longjmp.S') diff --git a/libc/sysdeps/linux/sh/__longjmp.S b/libc/sysdeps/linux/sh/__longjmp.S index 163801969..7e2b0b16d 100644 --- a/libc/sysdeps/linux/sh/__longjmp.S +++ b/libc/sysdeps/linux/sh/__longjmp.S @@ -36,6 +36,21 @@ __longjmp: mov.l @r4+, r13 mov.l @r4+, r14 mov.l @r4+, r15 +#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__ + lds.l @r4+, pr + ldc.l @r4+, gbr + lds.l @r4+, fpscr + fmov.s @r4+, fr12 + fmov.s @r4+, fr13 + mov r5, r0 /* get the return value in place */ + tst r0, r0 + bf.s 1f + fmov.s @r4+, fr14 + mov #1,r0 /* can't let setjmp() return zero! */ +1: + rts + fmov.s @r4+, fr15 +#else mov r5, r0 /* get the return value in place */ tst r0, r0 bf.s 1f @@ -44,5 +59,6 @@ __longjmp: 1: rts ldc.l @r4+, gbr +#endif .size __longjmp,.-__longjmp; -- cgit v1.2.3