Back to index

glibc  2.9
fgetexcptflg.c File Reference
#include <fenv.h>

Go to the source code of this file.


int fegetexceptflag (fexcept_t *flagp, int excepts)

Function Documentation

int fegetexceptflag ( fexcept_t flagp,
int  excepts 

Definition at line 23 of file fgetexcptflg.c.

  fexcept_t temp;
  unsigned int mxscr;

  /* Get the current exceptions for the x87 FPU and SSE unit.  */
  __asm__ ("fnstsw %0\n"
          "stmxcsr %1" : "=m" (*&temp), "=m" (*&mxscr));

  *flagp = (temp | mxscr) & FE_ALL_EXCEPT & excepts;

  /* Success.  */
  return 0;

Here is the call graph for this function: