[klibc] [PATCH klibc 1/4] mips: setjmp.S: don't save and restore floating-point registers

Ben Hutchings ben at decadent.org.uk
Sun Dec 31 08:06:57 PST 2017


From: YunQiang Su <wzssyqa at gmail.com>

Klibc FTBFS with '-mno-odd-spreg' on mips32(el) platforms,
As it try to save/restore odd-number FPR.

Indeed no other architectures save/restore FPR at all.
It shouldn't be needed.

References: https://bugs.debian.org/789683
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
 usr/klibc/arch/mips/setjmp.S | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/usr/klibc/arch/mips/setjmp.S b/usr/klibc/arch/mips/setjmp.S
index 68eed19d3286..21e41151dd41 100644
--- a/usr/klibc/arch/mips/setjmp.S
+++ b/usr/klibc/arch/mips/setjmp.S
@@ -29,18 +29,6 @@ LEAF(setjmp)
 	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
@@ -61,18 +49,6 @@ LEAF(longjmp)
 	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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <http://www.zytor.com/pipermail/klibc/attachments/20171231/e6007c2b/attachment.sig>


More information about the klibc mailing list