path: root/src/setjmp/mips/longjmp.s
diff options
authorRich Felker <>2012-12-05 12:52:40 -0500
committerRich Felker <>2012-12-05 12:52:40 -0500
commitb088f85582d8787911ef48449574bed4131b44a2 (patch)
tree24ff727622ed97f3467e4384a4fdba670745e6ba /src/setjmp/mips/longjmp.s
parent91b05889098c65425920b4c3bcd0712b73ea97eb (diff)
remove mips setjmp/longjmp code to save/restore fenv
nothing in the standard requires or even allows the fenv state to be restored by longjmp. restoring the exception flags is not such a big deal since it's probably valid to clobber them completely, but restoring the rounding mode yields an observable side effect not sanctioned by ISO C. saving/restoring it also wastes a few cycles and 16 bytes of code. as for historical behavior, reportedly SGI IRIX did save/restore fenv, and this is where glibc and uClibc got the behavior from. a few other systems save/restore it too (on archs other than mips), even though this is apparently wrong. further details are documented here: as musl aims for standards conformance rather than coddling historical programs expecting non-conforming behavior, and as it's unlikely that any historical programs actually depend on the incorrect behavior (such programs would break on other archs, anyway), I'm making the change not to save/restore fenv on mips.
Diffstat (limited to 'src/setjmp/mips/longjmp.s')
1 files changed, 1 insertions, 3 deletions
diff --git a/src/setjmp/mips/longjmp.s b/src/setjmp/mips/longjmp.s
index fc8e7260..a972d677 100644
--- a/src/setjmp/mips/longjmp.s
+++ b/src/setjmp/mips/longjmp.s
@@ -10,9 +10,7 @@ longjmp:
bne $2, $0, 1f
addu $2, $2, 1
-1: lw $8, 48($4)
- ctc1 $8, $31
- lwc1 $20, 56($4)
+1: lwc1 $20, 56($4)
lwc1 $21, 60($4)
lwc1 $22, 64($4)
lwc1 $23, 68($4)