Back to index

glibc  2.9
feupdateenv.c File Reference
#include <fenv.h>
#include <bp-sym.h>
#include <unistd.h>
#include <dl-procinfo.h>
#include <ldsodefs.h>
#include <shlib-compat.h>

Go to the source code of this file.


int __feupdateenv (const fenv_t *envp)
 versioned_symbol (libm, BP_SYM(__feupdateenv), BP_SYM(feupdateenv), GLIBC_2_2)

Function Documentation

Definition at line 28 of file feupdateenv.c.

  fexcept_t temp;
  unsigned int xtemp = 0;

  /* Save current exceptions.  */
  __asm__ ("fnstsw %0" : "=m" (*&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));

  temp = (temp | xtemp) & FE_ALL_EXCEPT;

  /* Install new environment.  */
  fesetenv (envp);

  /* Raise the saved exception.  Incidently for us the implementation
     defined format of the values in objects of type fexcept_t is the
     same as the ones specified using the FE_* constants.  */
  feraiseexcept ((int) temp);

  /* Success.  */
  return 0;

Here is the call graph for this function:

versioned_symbol ( libm  ,
BP_SYM(__feupdateenv ,
BP_SYM(feupdateenv ,