Back to index

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

Go to the source code of this file.


int feupdateenv (const fenv_t *envp)

Function Documentation

int feupdateenv ( const fenv_t envp)

Definition at line 25 of file feupdateenv.c.

  union { unsigned long long l; unsigned int sw[2]; } s;
  fenv_t temp;
  /* Get the current exception status */
  __asm__ ("fstd %%fr0,0(%1)       \n\t" 
           "fldd 0(%1),%%fr0       \n\t" 
          : "=m" (s.l) : "r" (&s.l));
  memcpy(&temp, envp, sizeof(fenv_t));
  /* Currently raised exceptions not cleared */
  temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27);
  /* Install new environment.  */
  fesetenv (&temp);
  /* Success.  */
  return 0;

Here is the call graph for this function: