From: Stafford Horne Date: Sat, 18 Mar 2023 07:43:05 +0000 (+0900) Subject: or1k: Do not clear existing FPU exceptions before updating X-Git-Tag: basepoints/gcc-14~455 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33fb1625992ba8180b42988e714460bcab08ca0f;p=thirdparty%2Fgcc.git or1k: Do not clear existing FPU exceptions before updating 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. --- diff --git a/libgcc/config/or1k/sfp-machine.h b/libgcc/config/or1k/sfp-machine.h index 162c6bc53262..c804270fb3cb 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)); \ } \