summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2015-02-08 18:56:52 +0100
committerRich Felker <dalias@aerifal.cx>2015-03-30 01:45:20 -0400
commitf035f7d9711cb815709802f453c78ac0c611e882 (patch)
treee0a2fd2ff1e685da60a5ee7c97c8abca4abb8f6c
parentd670873b7ed315001f5a9dcc5208b54c383c9176 (diff)
downloadmusl-f035f7d9711cb815709802f453c78ac0c611e882.tar.gz
fix fesetenv(FE_DFL_ENV) on mips
mips fesetenv did not handle FE_DFL_ENV, now fcsr is cleared in that case. (cherry picked from commit 5fc1487832e16aa2119e735a388d5f36c8c139e2)
-rw-r--r--src/fenv/mips/fenv.s4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fenv/mips/fenv.s b/src/fenv/mips/fenv.s
index 095cb606..a3233c1e 100644
--- a/src/fenv/mips/fenv.s
+++ b/src/fenv/mips/fenv.s
@@ -57,7 +57,9 @@ fegetenv:
.global fesetenv
.type fesetenv,@function
fesetenv:
+ addiu $5, $4, 1
+ beq $5, $0, 1f
lw $5, 0($4)
- ctc1 $5, $31
+1: ctc1 $5, $31
jr $ra
li $2, 0