diff options
author | Bob Duff <duff@adacore.com> | 2021-03-18 18:46:16 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-06-18 04:36:51 -0400 |
commit | 9324e07dbd14cf1da1627676b5f4aeb6ba606e4a (patch) | |
tree | 7b9fe5e2b551778b3212ca37735e8ada974a3990 /gcc/ada/einfo-utils.adb | |
parent | f44441d80fa8523a2e1b294b8563180202879727 (diff) | |
download | gcc-9324e07dbd14cf1da1627676b5f4aeb6ba606e4a.zip gcc-9324e07dbd14cf1da1627676b5f4aeb6ba606e4a.tar.gz gcc-9324e07dbd14cf1da1627676b5f4aeb6ba606e4a.tar.bz2 |
[Ada] Remove AAMP from compiler sources
gcc/ada/
* ada_get_targ.adb, aspects.ads, checks.adb, cstand.adb,
einfo.ads, exp_attr.adb, freeze.adb, get_targ.adb,
libgnat/a-textio.ads, libgnat/g-memdum.ads,
libgnat/s-scaval__128.adb, libgnat/s-scaval.adb, make.adb,
osint.ads, par-prag.adb, sem_ch13.adb, sem_prag.adb,
sem_prag.ads, set_targ.adb, set_targ.ads, snames.ads-tmpl,
targparm.ads, types.ads: Remove AAMP-specific code.
* switch.ads: Minor reformatting.
* gen_il-fields.ads, gen_il-gen.adb,
gen_il-gen-gen_entities.adb, gen_il-types.ads, einfo-utils.adb,
einfo-utils.ads: Package Types now contains "type Float_Rep_Kind
is (IEEE_Binary);", which used to also have an enumeral AAMP.
Gen_IL can't handle fields of this type, which would be zero
sized. Therefore, we move the Float_Rep field into Einfo.Utils
as a synthesized attribute. (We do not delete the field
altogether, in case we want new floating-point representations
in the future.)
* doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/implementation_defined_aspects.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst: Remove
AAMP-specific documentation.
* gnat_rm.texi, gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/einfo-utils.adb')
-rw-r--r-- | gcc/ada/einfo-utils.adb | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index 0ef5e1d..0641862 100644 --- a/gcc/ada/einfo-utils.adb +++ b/gcc/ada/einfo-utils.adb @@ -913,6 +913,22 @@ package body Einfo.Utils is end if; end First_Formal_With_Extras; + --------------- + -- Float_Rep -- + --------------- + + function Float_Rep (N : Entity_Id) return Float_Rep_Kind is + pragma Unreferenced (N); + pragma Assert (Float_Rep_Kind'First = Float_Rep_Kind'Last); + + -- There is only one value, so we don't need to store it, see types.ads. + + Val : constant Float_Rep_Kind := IEEE_Binary; + + begin + return Val; + end Float_Rep; + ------------------------------------- -- Get_Attribute_Definition_Clause -- ------------------------------------- @@ -1835,9 +1851,6 @@ package body Einfo.Utils is when 16 .. 33 => return 2**14; when others => return No_Uint; end case; - - when AAMP => - return Uint_2 ** Uint_7 - Uint_1; end case; end Machine_Emax_Value; @@ -1849,7 +1862,6 @@ package body Einfo.Utils is begin case Float_Rep (Id) is when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id); - when AAMP => return -Machine_Emax_Value (Id); end case; end Machine_Emin_Value; @@ -1870,13 +1882,6 @@ package body Einfo.Utils is when 19 .. 33 => return UI_From_Int (113); when others => return No_Uint; end case; - - when AAMP => - case Digs is - when 1 .. 6 => return Uint_24; - when 7 .. 9 => return UI_From_Int (40); - when others => return No_Uint; - end case; end case; end Machine_Mantissa_Value; @@ -1887,9 +1892,7 @@ package body Einfo.Utils is function Machine_Radix_Value (Id : E) return U is begin case Float_Rep (Id) is - when AAMP - | IEEE_Binary - => + when IEEE_Binary => return Uint_2; end case; end Machine_Radix_Value; @@ -2767,6 +2770,18 @@ package body Einfo.Utils is Set_DIC_Procedure (Id, V); end Set_Partial_DIC_Procedure; + ------------------- + -- Set_Float_Rep -- + ------------------- + + procedure Set_Float_Rep + (Ignore_N : Entity_Id; Ignore_Val : Float_Rep_Kind) is + begin + pragma Assert (Float_Rep_Kind'First = Float_Rep_Kind'Last); + -- There is only one value, so we don't need to store it (see + -- types.ads). + end Set_Float_Rep; + ----------------------------- -- Set_Invariant_Procedure -- ----------------------------- |