Back to index

glibc  2.9
Functions
fesetenv.c File Reference
#include <fenv.h>
#include <fpu_control.h>
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
#include <sysdep.h>
#include <shlib-compat.h>

Go to the source code of this file.

Functions

int __fesetenv (const fenv_t *envp)

Function Documentation

int __fesetenv ( const fenv_t envp)

Definition at line 29 of file fesetenv.c.

{
  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
    {
      unsigned int temp;

      _FPU_GETCW (temp);
      temp &= _FPU_RESERVED;

      if (envp == FE_DFL_ENV)
       temp |= _FPU_DEFAULT;
      else if (envp == FE_NOMASK_ENV)
       temp |= _FPU_IEEE;
      else
       temp |= envp->__cw & ~_FPU_RESERVED;

      _FPU_SETCW (temp);

      /* Success.  */
      return 0;
    }

  /* Unsupported, so fail.  */
  return 1;
}