diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2002-06-13 10:20:48 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2002-06-13 10:20:48 +0000 |
commit | dc8971488e7c174ab4084cbdb0a8f12c39b738d7 (patch) | |
tree | d679387fa379b6d5feb9756bdd7237347614453b /winsup/mingw/mingwex/feclearexcept.c | |
parent | 5f74ae83e5fba1ceb73a8d822cbe2b48c619127f (diff) | |
download | newlib-dc8971488e7c174ab4084cbdb0a8f12c39b738d7.zip newlib-dc8971488e7c174ab4084cbdb0a8f12c39b738d7.tar.gz newlib-dc8971488e7c174ab4084cbdb0a8f12c39b738d7.tar.bz2 |
* include/_mingw.h: Increment version to 2.0.
* Makefile.in: Ditto.
Merge in mingwex branch.
Diffstat (limited to 'winsup/mingw/mingwex/feclearexcept.c')
-rw-r--r-- | winsup/mingw/mingwex/feclearexcept.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/feclearexcept.c b/winsup/mingw/mingwex/feclearexcept.c new file mode 100644 index 0000000..e6017fc --- /dev/null +++ b/winsup/mingw/mingwex/feclearexcept.c @@ -0,0 +1,14 @@ +#include <fenv.h> + +/* 7.6.2.1 + The feclearexcept function clears the supported exceptions + represented by its argument. */ + +int feclearexcept (int excepts) +{ + fenv_t _env; + __asm__ volatile ("fnstenv %0;" : "=m" (_env)); /* get the env */ + _env.__status_word &= ~(excepts & FE_ALL_EXCEPT); /* clear the except */ + __asm__ volatile ("fldenv %0;" :: "m" (_env)); /*set the env */ + return 0; +} |