diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-01-21 13:12:50 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-06 03:51:38 -0400 |
commit | b6f9471df1a4c22de519c7049a390235508bbee9 (patch) | |
tree | 496fbe63c6895a36f3d2d5a3ce3cbfa071880d9e | |
parent | 1075946d061f01d767cf42f437be99aefe02ea97 (diff) | |
download | gcc-b6f9471df1a4c22de519c7049a390235508bbee9.zip gcc-b6f9471df1a4c22de519c7049a390235508bbee9.tar.gz gcc-b6f9471df1a4c22de519c7049a390235508bbee9.tar.bz2 |
[Ada] Do not second-guess the hardware for underflow handling of Scaling
gcc/ada/
* libgnat/s-fatgen.adb (Scaling): Use single handling of
underflow. Add pragma Annotate.
-rw-r--r-- | gcc/ada/libgnat/s-fatgen.adb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/libgnat/s-fatgen.adb b/gcc/ada/libgnat/s-fatgen.adb index 145d4ac..ec376e7 100644 --- a/gcc/ada/libgnat/s-fatgen.adb +++ b/gcc/ada/libgnat/s-fatgen.adb @@ -781,11 +781,9 @@ package body System.Fat_Gen is -- Check for underflow elsif Adjustment < IEEE_Emin - Exp then - -- Check for gradual underflow + -- Check for possibly gradual underflow (up to the hardware) - if T'Denorm - and then Adjustment >= IEEE_Emin - Mantissa - Exp - then + if Adjustment >= IEEE_Emin - Mantissa - Exp then Expf := IEEE_Emin; Expi := Exp + Adjustment - Expf; @@ -810,6 +808,9 @@ package body System.Fat_Gen is -- Given that Expi >= -Mantissa, only -64 is problematic if Expi = -64 then + pragma Annotate + (CodePeer, Intentional, "test always false", + "test always false in some instantiations"); XX := XX / 2.0; Expi := -63; end if; |