summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/__longjmp.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/sh/__longjmp.S')
-rw-r--r--libc/sysdeps/linux/sh/__longjmp.S16
1 files changed, 16 insertions, 0 deletions
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;