about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-10-04 15:56:48 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-10-04 15:56:48 +0000
commit89c2003e8407ebaac93782dc56113676dab2ae8b (patch)
treef62ace89741e2f9f0a6b0e3366079c0812ef7ad2
parentcd78f7e767decd16ea8ddd5a147fa6027858882f (diff)
downloadglibc-89c2003e8407ebaac93782dc56113676dab2ae8b.tar.gz
glibc-89c2003e8407ebaac93782dc56113676dab2ae8b.tar.xz
glibc-89c2003e8407ebaac93782dc56113676dab2ae8b.zip
e500 port: fix fpu_control.h constant values.
-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 5a226dde29..1b18945336 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 86e5ab16f9..e82e7913cb 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;