about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2015-02-08 18:56:52 +0100
committerSzabolcs Nagy <nsz@port70.net>2015-02-08 18:56:52 +0100
commit5fc1487832e16aa2119e735a388d5f36c8c139e2 (patch)
tree35fda5905acb60f81fc2615e9d3b8c7e898e3bbf
parent3f92f92cb9c448ba82da5ff2cbbea692c7701c0c (diff)
downloadmusl-5fc1487832e16aa2119e735a388d5f36c8c139e2.tar.gz
musl-5fc1487832e16aa2119e735a388d5f36c8c139e2.tar.xz
musl-5fc1487832e16aa2119e735a388d5f36c8c139e2.zip
fix fesetenv(FE_DFL_ENV) on mips
mips fesetenv did not handle FE_DFL_ENV, now fcsr is cleared in that
case.
-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