This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Ports updates for soft-fp changes


I've applied this patch to update MIPS and powerpc-nofpu for the addition 
of FP_TRAPPING_EXCEPTIONS to soft-fp, and to remove FP_EX_DENORM for 
powerpc-nofpu as discussed on libc-alpha.  (The MIPS change doesn't matter 
for much; the only thing soft-fp gets used for at present is sqrtl, which 
can't produce underflow.)

alpha should probably also get a definition of FP_TRAPPING_EXCEPTIONS 
(assuming it supports enabling or disabling traps on particular 
exceptions, so that the logic about signaling underflow is meaningful 
there).

diff --git a/ChangeLog.mips b/ChangeLog.mips
index 7d07aa6..a63f051 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,8 @@
 2012-05-30  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/mips/mips64/soft-fp/sfp-machine.h
+	(FP_TRAPPING_EXCEPTIONS): Define.
+
 	* sysdeps/unix/sysv/linux/mips/Makefile (syscall-list-variants):
 	Rename to abi-variants.
 	(syscall-list-includes): Rename to abi-includes.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index 5e32abd..1f7ac97 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,8 @@
+2012-05-30  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/powerpc/soft-fp/sfp-machine.h (FP_EX_DENORM): Remove.
+	(FP_TRAPPING_EXCEPTIONS): Define.
+
 2012-05-21  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist
diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
index 9c1ee3b..c81067d 100644
--- a/sysdeps/mips/mips64/soft-fp/sfp-machine.h
+++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
@@ -69,6 +69,7 @@ do {						\
   if (__builtin_expect (_fex, 0))		\
     _FPU_SETCW (_fcw | _fex | (_fex << 10));	\
 } while (0)
+#define FP_TRAPPING_EXCEPTIONS ((_fcw >> 5) & 0x7c)
 #else
 #define FP_INIT_ROUNDMODE	_fcw = FP_RND_NEAREST
 #endif
diff --git a/sysdeps/powerpc/soft-fp/sfp-machine.h b/sysdeps/powerpc/soft-fp/sfp-machine.h
index e7eafe2..8a9afad 100644
--- a/sysdeps/powerpc/soft-fp/sfp-machine.h
+++ b/sysdeps/powerpc/soft-fp/sfp-machine.h
@@ -46,12 +46,12 @@
 #define FP_EX_INVALID         (1 << (31 - 2))
 #define FP_EX_OVERFLOW        (1 << (31 - 3))
 #define FP_EX_UNDERFLOW       (1 << (31 - 4))
-#define FP_EX_DENORM          FP_EX_UNDERFLOW
 #define FP_EX_DIVZERO         (1 << (31 - 5))
 #define FP_EX_INEXACT         (1 << (31 - 6))
 
 #define FP_HANDLE_EXCEPTIONS  __simulate_exceptions (_fex)
 #define FP_ROUNDMODE          __sim_round_mode
+#define FP_TRAPPING_EXCEPTIONS (~__sim_disabled_exceptions & 0x3e000000)
 
 extern int __sim_exceptions;
 libc_hidden_proto (__sim_exceptions);

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]