Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <math.h>
  2. int
  3. __isnanf (float _x)
  4. {
  5.   unsigned short _sw;
  6.   __asm__ ("fxam;"
  7.            "fstsw %%ax": "=a" (_sw) : "t" (_x) );
  8.   return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
  9.     == FP_NAN;
  10. }
  11.  
  12. int __attribute__ ((alias ("__isnanf"))) isnanf (float);
  13.