Back to index

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

Go to the source code of this file.


int feenableexcept (int excepts)

Function Documentation

int feenableexcept ( int  excepts)

Definition at line 24 of file feenablxcpt.c.

  fenv_t old_fpsr;
  fenv_t new_fpsr;

  /* Get the current fpsr.  */
  __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (old_fpsr));

  new_fpsr = old_fpsr & ~((fenv_t) excepts & FE_ALL_EXCEPT);

  __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (new_fpsr) : "memory");

  return (old_fpsr ^ FE_ALL_EXCEPT) & FE_ALL_EXCEPT;

Here is the call graph for this function: