Back to index

glibc  2.9
Functions
feenablxcpt.c File Reference
#include <fenv_libc.h>
#include <fpu_control.h>

Go to the source code of this file.

Functions

int feenableexcept (int excepts)

Function Documentation

int feenableexcept ( int  excepts)

Definition at line 25 of file feenablxcpt.c.

{
  fexcept_t temp, old_exc, new_flags;

  _FPU_GETCW (temp);
  old_exc = (temp & FPC_EXCEPTION_MASK) >> FPC_EXCEPTION_MASK_SHIFT;
  new_flags = (temp | ((excepts & FE_ALL_EXCEPT) <<  FPC_EXCEPTION_MASK_SHIFT));
  _FPU_SETCW (new_flags);

  return old_exc;
}