From a6b0170a7f51fdea9beec57ae794221290af232b Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 18 Aug 2013 20:08:18 +0000 Subject: fix fenv exception functions to mask their argument fesetround.c is a wrapper to do the arch independent argument check (on archs where rounding mode is not stored in 2 bits __fesetround still has to check its arguments) on powerpc fe*except functions do not accept the extra invalid flags of its fpscr register the useless FENV_ACCESS pragma was removed from feupdateenv --- src/fenv/mips/fenv.s | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/fenv/mips') diff --git a/src/fenv/mips/fenv.s b/src/fenv/mips/fenv.s index 49ff36c0..095cb606 100644 --- a/src/fenv/mips/fenv.s +++ b/src/fenv/mips/fenv.s @@ -3,6 +3,7 @@ .global feclearexcept .type feclearexcept,@function feclearexcept: + and $4, $4, 0x7c cfc1 $5, $31 or $5, $5, $4 xor $5, $5, $4 @@ -13,6 +14,7 @@ feclearexcept: .global feraiseexcept .type feraiseexcept,@function feraiseexcept: + and $4, $4, 0x7c cfc1 $5, $31 or $5, $5, $4 ctc1 $5, $31 @@ -22,6 +24,7 @@ feraiseexcept: .global fetestexcept .type fetestexcept,@function fetestexcept: + and $4, $4, 0x7c cfc1 $2, $31 jr $ra and $2, $2, $4 @@ -33,9 +36,9 @@ fegetround: jr $ra andi $2, $2, 3 -.global fesetround -.type fesetround,@function -fesetround: +.global __fesetround +.type __fesetround,@function +__fesetround: cfc1 $5, $31 li $6, -4 and $5, $5, $6 -- cgit v1.2.1