Welcome to mirror list, hosted at ThFree Co, Russian Federation.

feclearexcept.c « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e6017fc9d89e66a82b419e1891fee578cd297480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
}