[klibc] [klibc:master] mips: don't save floating point registers in setjmp / longjmp

klibc-bot for James Cowgill james.cowgill at mips.com
Fri Jan 18 08:42:09 PST 2019


Commit-ID:  edf92a18d1f1725896c928cbcf580abc268f307c
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=edf92a18d1f1725896c928cbcf580abc268f307c
Author:     James Cowgill <james.cowgill at mips.com>
AuthorDate: Fri, 2 Mar 2018 08:33:03 -0800
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Wed, 2 Jan 2019 03:08:04 +0000

[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 at mips.com>
Link: https://www.zytor.com/pipermail/klibc/2018-March/003983.html
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 usr/include/arch/mips/klibc/archsetjmp.h | 14 --------------
 usr/klibc/arch/mips/setjmp.S             | 30 ------------------------------
 2 files changed, 44 deletions(-)

diff --git a/usr/include/arch/mips/klibc/archsetjmp.h b/usr/include/arch/mips/klibc/archsetjmp.h
index 1fbe83e..eeadffc 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 68eed19..9145dbc 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
 


More information about the klibc mailing list