Back to index

glibc  2.9
fedisblxcpt.c File Reference
#include <fenv.h>
#include <fenv_libc.h>
#include <fpu_control.h>

Go to the source code of this file.


int fedisableexcept (int excepts)

Function Documentation

int fedisableexcept ( int  excepts)

Definition at line 26 of file fedisblxcpt.c.

  unsigned int new_exc, old_exc;

  /* Get the current control word.  */
  _FPU_GETCW (new_exc);

  old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT;

  excepts &= FE_ALL_EXCEPT;

  new_exc &= ~(excepts << ENABLE_SHIFT);
  new_exc &= ~_FPU_RESERVED;
  _FPU_SETCW (new_exc);

  return old_exc;