Back to index

glibc  2.9
Functions
ftestexcept.c File Reference
#include <fenv.h>
#include <unistd.h>
#include <dl-procinfo.h>
#include <ldsodefs.h>

Go to the source code of this file.

Functions

int fetestexcept (int excepts)

Function Documentation

int fetestexcept ( int  excepts)

Definition at line 27 of file ftestexcept.c.

{
  short temp;
  int xtemp = 0;

  /* Get current exceptions.  */
  __asm__ ("fnstsw %0" : "=a" (temp));

  /* If the CPU supports SSE we test the MXCSR as well.  */
  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
    __asm__ ("stmxcsr %0" : "=m" (*&xtemp));

  return (temp | xtemp) & excepts & FE_ALL_EXCEPT;
}

Here is the call graph for this function: