Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #include <fenv.h>
  2.  
  3. /* 7.6.2.1
  4.     The feclearexcept function clears the supported exceptions
  5.     represented by its argument.
  6. */
  7.  
  8. int feclearexcept (int excepts)
  9. {
  10.     fenv_t _env;
  11.     __asm__ volatile ("fnstenv %0;" : "=m" (_env)); /* get the env */
  12.     _env.__status_word &= ~(excepts & FE_ALL_EXCEPT); /* clear the except */
  13.     __asm__ volatile ("fldenv %0;" :: "m" (_env)); /*set the env */
  14.     return 0;
  15. }
  16.