about summary refs log tree commit diff
path: root/src/fenv
diff options
context:
space:
mode:
Diffstat (limited to 'src/fenv')
-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