diff options
author | James Cowgill <james.cowgill@mips.com> | 2018-03-02 08:33:03 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-01-02 03:08:04 +0000 |
commit | edf92a18d1f1725896c928cbcf580abc268f307c (patch) | |
tree | abaf9477ff6c4a655faae3f166629d37cc146c30 | |
parent | 59f3f33338f371b3a30163406fbb5fe323503939 (diff) | |
download | klibc-edf92a18d1f1725896c928cbcf580abc268f307c.tar.gz |
[klibc] mips: don't save floating point registers in setjmp / longjmp
Don't bother saving any floating point registers in setjmp or restoring
them in longjmp. This causes issues when compiling for the FPXX ABI, and
is unnessesary as klibc does not support floating point code.
Additionally, remove the unused parts of __jmp_buf.
Signed-off-by: James Cowgill <james.cowgill@mips.com>
Link: https://www.zytor.com/pipermail/klibc/2018-March/003983.html
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | usr/include/arch/mips/klibc/archsetjmp.h | 14 | ||||
-rw-r--r-- | usr/klibc/arch/mips/setjmp.S | 30 |
2 files changed, 0 insertions, 44 deletions
diff --git a/usr/include/arch/mips/klibc/archsetjmp.h b/usr/include/arch/mips/klibc/archsetjmp.h index 1fbe83ef5ebb63..eeadffceace1c1 100644 --- a/usr/include/arch/mips/klibc/archsetjmp.h +++ b/usr/include/arch/mips/klibc/archsetjmp.h @@ -18,20 +18,6 @@ struct __jmp_buf { unsigned long __sp; unsigned long __s8; unsigned long __ra; - unsigned long __f20; - unsigned long __f21; - unsigned long __f22; - unsigned long __f23; - unsigned long __f24; - unsigned long __f25; - unsigned long __f26; - unsigned long __f27; - unsigned long __f28; - unsigned long __f29; - unsigned long __f30; - unsigned long __f31; - unsigned long __fcr31; - unsigned long __unused; } __attribute__ ((aligned(8))); typedef struct __jmp_buf jmp_buf[1]; diff --git a/usr/klibc/arch/mips/setjmp.S b/usr/klibc/arch/mips/setjmp.S index 68eed19d32867f..9145dbc03a5969 100644 --- a/usr/klibc/arch/mips/setjmp.S +++ b/usr/klibc/arch/mips/setjmp.S @@ -9,8 +9,6 @@ # sp # s8 # ra -# f20..f31 -# fcr31 # #include <machine/asm.h> @@ -28,20 +26,6 @@ LEAF(setjmp) sw sp, 36(a0) sw s8, 40(a0) sw ra, 44(a0) - cfc1 t0,$31 - swc1 $f20,48(a0) - swc1 $f21,52(a0) - swc1 $f22,56(a0) - swc1 $f23,60(a0) - swc1 $f24,64(a0) - swc1 $f25,68(a0) - swc1 $f26,72(a0) - swc1 $f27,76(a0) - swc1 $f28,80(a0) - swc1 $f29,84(a0) - swc1 $f30,88(a0) - swc1 $f31,92(a0) - sw t0,96(a0) move v0,zero jr ra @@ -60,20 +44,6 @@ LEAF(longjmp) lw sp, 36(a0) lw s8, 40(a0) lw ra, 44(a0) - lw t0, 96(a0) - lwc1 $f20,48(a0) - lwc1 $f21,52(a0) - lwc1 $f22,56(a0) - lwc1 $f23,60(a0) - lwc1 $f24,64(a0) - lwc1 $f25,68(a0) - lwc1 $f26,72(a0) - lwc1 $f27,76(a0) - lwc1 $f28,80(a0) - lwc1 $f29,84(a0) - lwc1 $f30,88(a0) - lwc1 $f31,92(a0) - ctc1 t0,$31 move v0,a1 jr ra |