clobber other exceptions.
* sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Raise new
exceptions.
* sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Handle
multiple new exceptions if some are disabled.
* sysdeps/powerpc/nofpu/sim-full.c (__simulate_exceptions): Likewise.
+2007-08-29 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/powerpc/nofpu/fsetexcptflg.c (__fesetexceptflag): Do not
+ clobber other exceptions.
+ * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Raise new
+ exceptions.
+ * sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Handle
+ multiple new exceptions if some are disabled.
+ * sysdeps/powerpc/nofpu/sim-full.c (__simulate_exceptions): Likewise.
+
2007-07-13 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support.
#include "soft-fp.h"
#include "soft-supp.h"
+#include <signal.h>
#include <bp-sym.h>
int
__feupdateenv (const fenv_t *envp)
{
- fenv_union_t u;
int saved_exceptions;
/* Save currently set exceptions. */
/* Raise old exceptions. */
__sim_exceptions |= saved_exceptions;
+ if (saved_exceptions & ~__sim_disabled_exceptions)
+ raise (SIGFPE);
return 0;
}
__feraiseexcept (int x)
{
__sim_exceptions |= x;
- if (x == 0 || __sim_disabled_exceptions & x)
- /* Ignore exception. */
- ;
- else
+ if (x & ~__sim_disabled_exceptions)
raise (SIGFPE);
return 0;
}
__fesetexceptflag(const fexcept_t *flagp, int excepts)
{
/* Ignore exceptions not listed in 'excepts'. */
- __sim_exceptions = *flagp & excepts;
+ __sim_exceptions = (__sim_exceptions & ~excepts) | (*flagp & excepts);
return 0;
}
__simulate_exceptions (int x)
{
__sim_exceptions |= x;
- if (x == 0 || __sim_disabled_exceptions & x)
- /* Ignore exception. */
- ;
- else
+ if (x & ~__sim_disabled_exceptions)
raise (SIGFPE);
}