[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r3314 - in /branches/eglibc-2_6/ports: ./ sysdeps/powerpc/nofpu/ sysdeps/powerpc/powerpc32/e500/fpu/
- To: commits@xxxxxxxxxx
- Subject: [commits] r3314 - in /branches/eglibc-2_6/ports: ./ sysdeps/powerpc/nofpu/ sysdeps/powerpc/powerpc32/e500/fpu/
- From: dan@xxxxxxxxxx
- Date: Wed, 29 Aug 2007 20:26:26 -0000
Author: dan
Date: Wed Aug 29 13:26:26 2007
New Revision: 3314
Log:
* sysdeps/powerpc/powerpc32/e500/fpu/fsetexcptflg.c
(__fesetexceptflag): Do not clobber other exceptions. Do not raise
exceptions.
Backport:
2007-08-29 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
* 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.
Modified:
branches/eglibc-2_6/ports/ChangeLog.eglibc
branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/feupdateenv.c
branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c
branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c
branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/sim-full.c
branches/eglibc-2_6/ports/sysdeps/powerpc/powerpc32/e500/fpu/fsetexcptflg.c
Modified: branches/eglibc-2_6/ports/ChangeLog.eglibc
==============================================================================
--- branches/eglibc-2_6/ports/ChangeLog.eglibc (original)
+++ branches/eglibc-2_6/ports/ChangeLog.eglibc Wed Aug 29 13:26:26 2007
@@ -1,3 +1,19 @@
+2007-08-29 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/e500/fpu/fsetexcptflg.c
+ (__fesetexceptflag): Do not clobber other exceptions. Do not raise
+ exceptions.
+
+ Backport:
+ 2007-08-29 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
+ * 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-08-14 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
Backport:
Modified: branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/feupdateenv.c
==============================================================================
--- branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/feupdateenv.c (original)
+++ branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/feupdateenv.c Wed Aug 29 13:26:26 2007
@@ -21,12 +21,12 @@
#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. */
@@ -37,6 +37,8 @@
/* Raise old exceptions. */
__sim_exceptions |= saved_exceptions;
+ if (saved_exceptions & ~__sim_disabled_exceptions)
+ raise (SIGFPE);
return 0;
}
Modified: branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c
==============================================================================
--- branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c (original)
+++ branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c Wed Aug 29 13:26:26 2007
@@ -28,10 +28,7 @@
__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;
}
Modified: branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c
==============================================================================
--- branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c (original)
+++ branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c Wed Aug 29 13:26:26 2007
@@ -26,7 +26,7 @@
__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;
}
Modified: branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/sim-full.c
==============================================================================
--- branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/sim-full.c (original)
+++ branches/eglibc-2_6/ports/sysdeps/powerpc/nofpu/sim-full.c Wed Aug 29 13:26:26 2007
@@ -37,9 +37,6 @@
__simulate_exceptions (int x)
{
__sim_exceptions |= x;
- if (x == 0 || __sim_disabled_exceptions & x)
- /* Ignore exception. */
- ;
- else
+ if (x & ~__sim_disabled_exceptions)
raise (SIGFPE);
}
Modified: branches/eglibc-2_6/ports/sysdeps/powerpc/powerpc32/e500/fpu/fsetexcptflg.c
==============================================================================
--- branches/eglibc-2_6/ports/sysdeps/powerpc/powerpc32/e500/fpu/fsetexcptflg.c (original)
+++ branches/eglibc-2_6/ports/sysdeps/powerpc/powerpc32/e500/fpu/fsetexcptflg.c Wed Aug 29 13:26:26 2007
@@ -33,13 +33,10 @@
flag = *flagp & excepts;
/* Replace the exception status */
- spefscr = (spefscr & ~FE_ALL_EXCEPT) | flag;
+ spefscr = (spefscr & ~(FE_ALL_EXCEPT & excepts)) | flag;
- /* Store the new status word (along with the rest of the environment).
- This may cause floating-point exceptions if the restored state
- requests it. */
+ /* Store the new status word (along with the rest of the environment). */
fesetenv_register (spefscr);
- feraiseexcept (spefscr & FE_ALL_EXCEPT);
/* Success. */
return 0;