aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--sysdeps/powerpc/fpu_control.h18
2 files changed, 17 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a226dd..1b18945 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2013-10-04 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/powerpc/fpu_control.h [__NO_FPRS__ && !_SOFT_FLOAT]
+ (_FPU_MASK_OM): Define as 0x04.
+ [__NO_FPRS__ && !_SOFT_FLOAT] (_FPU_MASK_UM): Define as 0x08.
+ [__NO_FPRS__ && !_SOFT_FLOAT] (_FPU_RESERVED): Define as
+ 0x00c10080.
+ [__NO_FPRS__ && !_SOFT_FLOAT] (_FPU_DEFAULT): Define as
+ 0x0000003c.
+ [__NO_FPRS__ && !_SOFT_FLOAT] (_FPU_IEEE): Define as _FPU_DEFAULT.
+
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
(__CONTEXT_FUNC_NAME) [__CONTEXT_ENABLE_E500]: Use
getcontext_e500.
diff --git a/sysdeps/powerpc/fpu_control.h b/sysdeps/powerpc/fpu_control.h
index 86e5ab1..e82e791 100644
--- a/sysdeps/powerpc/fpu_control.h
+++ b/sysdeps/powerpc/fpu_control.h
@@ -38,20 +38,18 @@ extern fpu_control_t __fpu_control;
/* masking of interrupts */
# define _FPU_MASK_ZM 0x10 /* zero divide */
-# define _FPU_MASK_OM 0x40 /* overflow */
-# define _FPU_MASK_UM 0x80 /* underflow */
+# define _FPU_MASK_OM 0x04 /* overflow */
+# define _FPU_MASK_UM 0x08 /* underflow */
# define _FPU_MASK_XM 0x40 /* inexact */
# define _FPU_MASK_IM 0x20 /* invalid operation */
-# define _FPU_RESERVED 0xff3fff7f /* These bits are reserved and not changed. */
-
-/* The fdlibm code requires no interrupts for exceptions. */
-# define _FPU_DEFAULT 0x00000000 /* Default value. */
+# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
-/* IEEE: same as above, but (some) exceptions;
- we leave the 'inexact' exception off.
- */
-# define _FPU_IEEE 0x000003c0
+/* Correct IEEE semantics require traps to be enabled at the hardware
+ level; the kernel then does the emulation and determines whether
+ generation of signals from those traps was enabled using prctl. */
+# define _FPU_DEFAULT 0x0000003c /* Default value. */
+# define _FPU_IEEE _FPU_DEFAULT
/* Type of the control word. */
typedef unsigned int fpu_control_t;