[Ada] Implement part of System.Fat_Gen more efficiently
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 19 Nov 2020 14:35:35 +0000 (15:35 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 14 Dec 2020 15:51:52 +0000 (10:51 -0500)
commitf3dd0581a51be1e4354bdcf23f1eee7f5c707a3a
tree4ff2a0588200a32fe7e68f97b7769bb10835a810
parent3cde9f1cc56d7039f44d3cd4f4ebebd02815b8a9
[Ada] Implement part of System.Fat_Gen more efficiently

gcc/ada/

* libgnat/s-fatgen.ads (Compose): Add pragma Inline.
(Copy_Sign): Likewise.
(Exponent): Likewise.
(Fraction): Likewise.
* libgnat/s-fatgen.adb: Remove with clause for System, add
with and use clauses for System.Unsigned_Types.
Add pragma Warnings (Off) for non-static constants.
Remove precomputed tables of powers of radix and add a few
constants describing the floating-point format.
(Gradual_Scaling): Delete.
(Copy_Sign): Reimplement directly.
(Decompose): Likewise.
(Scaling): Likewise.
(Pred): Speed up.
(Succ): Likewise.
(Truncation): Tidy up.
(Valid): Move constants to library level.
gcc/ada/libgnat/s-fatgen.adb
gcc/ada/libgnat/s-fatgen.ads