]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
or1k: Do not clear existing FPU exceptions before updating
authorStafford Horne <shorne@gmail.com>
Sat, 18 Mar 2023 07:43:05 +0000 (16:43 +0900)
committerStafford Horne <shorne@gmail.com>
Sun, 19 Mar 2023 06:41:22 +0000 (15:41 +0900)
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

index 162c6bc532623f978009cf32d6c9a94cce82476f..c804270fb3cb51c7db7e12a739ea914550297956 100644 (file)
@@ -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));  \
     }                                                          \