2 #include "cpu_features.h"
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. */
11 int fetestexcept (int excepts)
15 __asm__ ("fnstsw %%ax" : "=a" (_res));
18 /* If SSE supported, return the union of the FPU and SSE flags. */
22 __asm__ volatile("stmxcsr %0" : "=m" (_csr));
26 return (_res & excepts & FE_ALL_EXCEPT);