* [PATCH] or1k: Do not clear existing FPU exceptions before updating
@ 2023-03-18 8:04 Stafford Horne
2023-03-19 6:48 ` Stafford Horne
0 siblings, 1 reply; 2+ messages in thread
From: Stafford Horne @ 2023-03-18 8:04 UTC (permalink / raw)
To: GCC patches; +Cc: Linux OpenRISC, Stafford Horne
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] or1k: Do not clear existing FPU exceptions before updating
2023-03-18 8:04 [PATCH] or1k: Do not clear existing FPU exceptions before updating Stafford Horne
@ 2023-03-19 6:48 ` Stafford Horne
0 siblings, 0 replies; 2+ messages in thread
From: Stafford Horne @ 2023-03-19 6:48 UTC (permalink / raw)
To: GCC patches; +Cc: Linux OpenRISC
Hello,
I pushed this upstream.
On Sat, Mar 18, 2023 at 05:04:05PM +0900, Stafford Horne wrote:
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-19 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 8:04 [PATCH] or1k: Do not clear existing FPU exceptions before updating Stafford Horne
2023-03-19 6:48 ` Stafford Horne
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).