Back to index

glibc  2.9
fegetenv.c File Reference
#include <fenv_libc.h>
#include <shlib-compat.h>

Go to the source code of this file.


int __fegetenv (fenv_t *envp)
 versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2)

Function Documentation

int __fegetenv ( fenv_t envp)

Definition at line 24 of file fegetenv.c.

  unsigned long int fpcr;
  unsigned long int swcr;

  /* Get status from software and hardware.  Note that we don't need an
     excb because the callsys is an implied trap barrier.  */
  swcr = __ieee_get_fp_control ();
  __asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr));

  /* Merge the two bits of information.  */
  *envp = ((fpcr & FPCR_ROUND_MASK) | (swcr & SWCR_ALL_MASK));

  /* Success.  */
  return 0;

Here is the call graph for this function:

versioned_symbol ( libm  ,
__fegetenv  ,
fegetenv  ,