floating point environment, untested

at present the i386 code does not support sse floating point, which is
not part of the standard i386 abi. while it may be desirable to
support it later, doing so will reduce performance and require some
tricks to probe if sse support is present.

this first commit is i386-only, but it should be trivial to port the
asm to x86_64.
This commit is contained in:
Rich Felker
2011-06-12 15:58:15 -04:00
parent 2afebbbcd1
commit b09b78905b
6 changed files with 144 additions and 0 deletions

9
src/fenv/feupdateenv.c Normal file
View File

@ -0,0 +1,9 @@
#include <fenv.h>
int feupdateenv(const fenv_t *envp)
{
int ex = fetestexcept(FE_ALL_EXCEPT);
fesetenv(envp);
feraiseexcept(ex);
return 0;
}