public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* Ports updates for soft-fp changes
@ 2012-05-30 21:41 Joseph S. Myers
  0 siblings, 0 replies; only message in thread
From: Joseph S. Myers @ 2012-05-30 21:41 UTC (permalink / raw)
  To: libc-ports

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-30 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-30 21:41 Ports updates for soft-fp changes Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).