public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Cc: Linux OpenRISC <linux-openrisc@vger.kernel.org>,
	Stafford Horne <shorne@gmail.com>
Subject: [PATCH] or1k: Do not clear existing FPU exceptions before updating
Date: Sat, 18 Mar 2023 17:04:05 +0900	[thread overview]
Message-ID: <20230318080405.2799610-1-shorne@gmail.com> (raw)

We should always carry the exceptions forward.  This bug was found when
working on testing glibc math tests, many tests were failing with
Overflow and Underflow flags not set.  This was traced to here.

libgcc/ChangeLog:

	* config/or1k/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Remove
	statement clearing existing exceptions.
---
 libgcc/config/or1k/sfp-machine.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libgcc/config/or1k/sfp-machine.h b/libgcc/config/or1k/sfp-machine.h
index 162c6bc5326..c804270fb3c 100644
--- a/libgcc/config/or1k/sfp-machine.h
+++ b/libgcc/config/or1k/sfp-machine.h
@@ -73,7 +73,6 @@ do {								\
 do {								\
   if (__builtin_expect (_fex, 0))				\
     {								\
-      _fpcsr &= ~FP_EX_ALL;					\
       _fpcsr |= _fex;						\
       __asm__ volatile ("l.mtspr r0,%0,20" : : "r" (_fpcsr));	\
     }								\
-- 
2.39.1


             reply	other threads:[~2023-03-18  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18  8:04 Stafford Horne [this message]
2023-03-19  6:48 ` Stafford Horne

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=20230318080405.2799610-1-shorne@gmail.com \
    --to=shorne@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linux-openrisc@vger.kernel.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).