public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: libc-ports@sourceware.org
Subject: Ports updates for soft-fp changes
Date: Wed, 30 May 2012 21:41:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1205302137080.8161@digraph.polyomino.org.uk> (raw)

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

                 reply	other threads:[~2012-05-30 21:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1205302137080.8161@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).