Back to index

glibc  2.9
Functions
fsetexcptflg.c File Reference
#include <fenv.h>
#include <math.h>
#include <shlib-compat.h>

Go to the source code of this file.

Functions

int __fesetexceptflag (const fexcept_t *flagp, int excepts)
 versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2)

Function Documentation

int __fesetexceptflag ( const fexcept_t flagp,
int  excepts 
)

Definition at line 25 of file fsetexcptflg.c.

{
  fexcept_t fpsr;

  /* Get the current status register.  */
  __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));

  /* Install the new exception bits in the Accrued Exception Byte.  */
  fpsr &= ~(excepts & FE_ALL_EXCEPT);
  fpsr |= *flagp & excepts & FE_ALL_EXCEPT;

  /* Store the new status register.  */
  __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));

  /* Success.  */
  return 0;
}

Here is the call graph for this function:

versioned_symbol ( libm  ,
__fesetexceptflag  ,
fesetexceptflag  ,
GLIBC_2_2   
)