Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5141 | serge | 1 | #include |
2 | |||
3 | /* 7.6.2.5 |
||
4 | The fetestexcept function determines which of a specified subset of |
||
5 | the exception flags are currently set. The excepts argument |
||
6 | specifies the exception flags to be queried. |
||
7 | The fetestexcept function returns the value of the bitwise OR of the |
||
8 | exception macros corresponding to the currently set exceptions |
||
9 | included in excepts. |
||
10 | */ |
||
11 | |||
12 | int fetestexcept (int excepts) |
||
13 | { |
||
14 | unsigned short _sw; |
||
15 | __asm__ ("fnstsw %%ax" : "=a" (_sw)); |
||
16 | return _sw & excepts & FE_ALL_EXCEPT; |
||
17 | } |