Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5141 serge 1
#include 
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
}