[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r3318 - in /fsf/trunk/ports: ./ sysdeps/powerpc/nofpu/



Author: eglibc
Date: Thu Aug 30 00:05:13 2007
New Revision: 3318

Log:
Import glibc-ports-mainline for 2007-08-30

Modified:
    fsf/trunk/ports/ChangeLog.powerpc
    fsf/trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c
    fsf/trunk/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c
    fsf/trunk/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c
    fsf/trunk/ports/sysdeps/powerpc/nofpu/sim-full.c

Modified: fsf/trunk/ports/ChangeLog.powerpc
==============================================================================
--- fsf/trunk/ports/ChangeLog.powerpc (original)
+++ fsf/trunk/ports/ChangeLog.powerpc Thu Aug 30 00:05:13 2007
@@ -1,3 +1,13 @@
+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-07-13  Steven Munroe  <sjmunroe@xxxxxxxxxx>
 
 	* sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support.

Modified: fsf/trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c
==============================================================================
--- fsf/trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c (original)
+++ fsf/trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c Thu Aug 30 00:05:13 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: fsf/trunk/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c
==============================================================================
--- fsf/trunk/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c (original)
+++ fsf/trunk/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c Thu Aug 30 00:05:13 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: fsf/trunk/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c
==============================================================================
--- fsf/trunk/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c (original)
+++ fsf/trunk/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c Thu Aug 30 00:05:13 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: fsf/trunk/ports/sysdeps/powerpc/nofpu/sim-full.c
==============================================================================
--- fsf/trunk/ports/sysdeps/powerpc/nofpu/sim-full.c (original)
+++ fsf/trunk/ports/sysdeps/powerpc/nofpu/sim-full.c Thu Aug 30 00:05:13 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);
 }