mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-16 03:42:35 +03:00
5a61e87775
git-svn-id: svn://kolibrios.org@5141 a494cfbc-eb01-0410-851d-a64ba20cac60
18 lines
527 B
C
18 lines
527 B
C
#include <fenv.h>
|
|
|
|
/* 7.6.2.5
|
|
The fetestexcept function determines which of a specified subset of
|
|
the exception flags are currently set. The excepts argument
|
|
specifies the exception flags to be queried.
|
|
The fetestexcept function returns the value of the bitwise OR of the
|
|
exception macros corresponding to the currently set exceptions
|
|
included in excepts.
|
|
*/
|
|
|
|
int fetestexcept (int excepts)
|
|
{
|
|
unsigned short _sw;
|
|
__asm__ ("fnstsw %%ax" : "=a" (_sw));
|
|
return _sw & excepts & FE_ALL_EXCEPT;
|
|
}
|