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/i386/fenv.s | |
parent | d8764bf84022397ff9d22310f78fcd78d801e2bf (diff) | |
download | musl-a6b0170a7f51fdea9beec57ae794221290af232b.tar.gz musl-a6b0170a7f51fdea9beec57ae794221290af232b.tar.bz2 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/i386/fenv.s')
-rw-r--r-- | src/fenv/i386/fenv.s | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fenv/i386/fenv.s b/src/fenv/i386/fenv.s index a8540add..eaeb6bed 100644 --- a/src/fenv/i386/fenv.s +++ b/src/fenv/i386/fenv.s @@ -4,6 +4,7 @@ .type feclearexcept,@function feclearexcept: mov 4(%esp),%ecx + and $0x3f,%ecx fnstsw %ax # consider sse fenv as well if the cpu has XMM capability call 1f @@ -50,6 +51,7 @@ feclearexcept: .type feraiseexcept,@function feraiseexcept: mov 4(%esp),%eax + and $0x3f,%eax sub $32,%esp fnstenv (%esp) or %al,4(%esp) @@ -58,9 +60,9 @@ feraiseexcept: xor %eax,%eax ret -.global fesetround -.type fesetround,@function -fesetround: +.global __fesetround +.type __fesetround,@function +__fesetround: mov 4(%esp),%ecx push %eax xor %eax,%eax @@ -147,6 +149,7 @@ fesetenv: .type fetestexcept,@function fetestexcept: mov 4(%esp),%ecx + and $0x3f,%ecx fnstsw %ax # consider sse fenv as well if the cpu has XMM capability call 1f |