Пример #1
0
int
__feupdateenv (const fenv_t *envp)
{
  fpu_control_t temp;

  _FPU_GETCW (temp);
  temp = (temp & FE_ALL_EXCEPT);

  /* Raise the saved exception. Incidently for us the implementation
    defined format of the values in objects of type fexcept_t is the
    same as the ones specified using the FE_* constants. */
  __fesetenv (envp);
  __feraiseexcept ((int) temp);

  return 0;
}
Пример #2
0
int
__feupdateenv (const fenv_t *envp)
{
  fexcept_t temp;

  _FPU_GETCW (temp);
  temp = (temp & FPC_FLAGS_MASK) >> FPC_FLAGS_SHIFT;

  /* Raise the exceptions since the last call to feholdenv  */
  /* re install saved environment.  */
  __fesetenv (envp);
  __feraiseexcept ((int) temp);

  /* Success.  */
  return 0;
}
Пример #3
0
int
__feupdateenv (const fenv_t *envp)
{
  int exc;

  /* Save the currently set exceptions.  */
  exc = fegetenv_register () & SPEFSCR_ALL_EXCEPT;

  /* Install new environment.  */
  __fesetenv (envp);

  /* Raise (if appropriate) saved exceptions. */
  __feraiseexcept_spe (exc);

  /* Success.  */
  return 0;
}
Пример #4
0
int
__feupdateenv (const fenv_t *envp)
{
  int saved_exceptions;

  /* Save currently set exceptions.  */
  saved_exceptions = __sim_exceptions_thread;

  /* Set environment.  */
  __fesetenv (envp);

  /* Raise old exceptions.  */
  __sim_exceptions_thread |= saved_exceptions;
  SIM_SET_GLOBAL (__sim_exceptions_global, __sim_exceptions_thread);
  if (saved_exceptions & ~__sim_disabled_exceptions_thread)
    raise (SIGFPE);

  return 0;
}
Пример #5
0
int
__feupdateenv (const fenv_t *envp)
{
  unsigned long int tmp;

  /* Get the current exception state.  */
  tmp = __ieee_get_fp_control ();

  /* Install new environment.  */
  __fesetenv (envp);

  /* Raise the saved exception.  Incidently for us the implementation
     defined format of the values in objects of type fexcept_t is the
     same as the ones specified using the FE_* constants.  */
  __feraiseexcept (tmp & SWCR_STATUS_MASK);

  /* Success.  */
  return 0;
}
Пример #6
0
int
__feupdateenv (const fenv_t *envp)
{
  int temp;

  /* Save current exceptions.  */
  _FPU_GETCW (temp);
  temp &= FE_ALL_EXCEPT;

  /* Install new environment.  */
  __fesetenv (envp);

  /* Raise the safed exception.  Incidently for us the implementation
     defined format of the values in objects of type fexcept_t is the
     same as the ones specified using the FE_* constants.  */
  __feraiseexcept (temp);

  /* Success.  */
  return 0;
}