diff options
author | Szabolcs Nagy <nsz@port70.net> | 2013-08-18 20:08:18 +0000 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2013-08-18 20:08:18 +0000 |
commit | a6b0170a7f51fdea9beec57ae794221290af232b (patch) | |
tree | 22651ba3480fc272933133af780e6beb10ab2d3d /src/fenv/mips/fenv.s | |
parent | d8764bf84022397ff9d22310f78fcd78d801e2bf (diff) | |
download | musl-a6b0170a7f51fdea9beec57ae794221290af232b.tar.gz musl-a6b0170a7f51fdea9beec57ae794221290af232b.tar.xz musl-a6b0170a7f51fdea9beec57ae794221290af232b.zip |
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
Diffstat (limited to 'src/fenv/mips/fenv.s')
-rw-r--r-- | src/fenv/mips/fenv.s | 9 |
1 files changed, 6 insertions, 3 deletions
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 |