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/libgnat/s-scaval.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/libgnat/s-scaval.adb')
-rw-r--r-- | gcc/ada/libgnat/s-scaval.adb | 66 |
1 files changed, 16 insertions, 50 deletions
diff --git a/gcc/ada/libgnat/s-scaval.adb b/gcc/ada/libgnat/s-scaval.adb index 71578ee..81394af 100644 --- a/gcc/ada/libgnat/s-scaval.adb +++ b/gcc/ada/libgnat/s-scaval.adb @@ -60,26 +60,17 @@ package body System.Scalar_Values is EFloat : constant Boolean := Long_Long_Float'Size > Long_Float'Size; -- Set True if we are on an x86 with 96-bit floats for extended - AFloat : constant Boolean := - Long_Float'Size = 48 and then Long_Long_Float'Size = 48; - -- Set True if we are on an AAMP with 48-bit extended floating point - - type ByteLF is array (0 .. 7 - 2 * Boolean'Pos (AFloat)) of Byte1; + type ByteLF is array (0 .. 7) of Byte1; for ByteLF'Component_Size use 8; - -- Type used to hold Long_Float values on all targets and to initialize - -- 48-bit Long_Float values used on AAMP. On AAMP, this type is 6 bytes. - -- On other targets the type is 8 bytes, and type Byte8 is used for - -- values that are then converted to ByteLF. + -- Type used to hold Long_Float values on all targets. On most targets + -- the type is 8 bytes, and type Byte8 is used for values that are then + -- converted to ByteLF. - pragma Warnings (Off); -- why ??? function To_ByteLF is new Ada.Unchecked_Conversion (Byte8, ByteLF); - pragma Warnings (On); - type ByteLLF is - array (0 .. 7 + 4 * Boolean'Pos (EFloat) - 2 * Boolean'Pos (AFloat)) - of Byte1; + type ByteLLF is array (0 .. 7 + 4 * Boolean'Pos (EFloat)) of Byte1; for ByteLLF'Component_Size use 8; @@ -186,16 +177,9 @@ package body System.Scalar_Values is IS_Iz4 := 16#0000_0000#; IS_Iz8 := 16#0000_0000_0000_0000#; - if AFloat then - IV_Isf := 16#FFFF_FF00#; - IV_Ifl := 16#FFFF_FF00#; - IV_Ilf := (0, 16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#FF#); - - else - IV_Isf := IS_Iu4; - IV_Ifl := IS_Iu4; - IV_Ilf := To_ByteLF (IS_Iu8); - end if; + IV_Isf := IS_Iu4; + IV_Ifl := IS_Iu4; + IV_Ilf := To_ByteLF (IS_Iu8); if EFloat then IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#C0#, 16#FF#, 16#FF#, 0, 0); @@ -219,16 +203,9 @@ package body System.Scalar_Values is IS_Iz4 := 16#0000_0000#; IS_Iz8 := 16#0000_0000_0000_0000#; - if AFloat then - IV_Isf := 16#0000_0001#; - IV_Ifl := 16#0000_0001#; - IV_Ilf := (1, 0, 0, 0, 0, 0); - - else - IV_Isf := 16#FF80_0000#; - IV_Ifl := 16#FF80_0000#; - IV_Ilf := To_ByteLF (16#FFF0_0000_0000_0000#); - end if; + IV_Isf := 16#FF80_0000#; + IV_Ifl := 16#FF80_0000#; + IV_Ilf := To_ByteLF (16#FFF0_0000_0000_0000#); if EFloat then IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#FF#, 0, 0); @@ -252,16 +229,9 @@ package body System.Scalar_Values is IS_Iz4 := 16#FFFF_FFFF#; IS_Iz8 := 16#FFFF_FFFF_FFFF_FFFF#; - if AFloat then - IV_Isf := 16#7FFF_FFFF#; - IV_Ifl := 16#7FFF_FFFF#; - IV_Ilf := (16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#7F#); - - else - IV_Isf := 16#7F80_0000#; - IV_Ifl := 16#7F80_0000#; - IV_Ilf := To_ByteLF (16#7FF0_0000_0000_0000#); - end if; + IV_Isf := 16#7F80_0000#; + IV_Ifl := 16#7F80_0000#; + IV_Ilf := To_ByteLF (16#7FF0_0000_0000_0000#); if EFloat then IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#7F#, 0, 0); @@ -301,11 +271,7 @@ package body System.Scalar_Values is IV_Isf := IS_Is4; IV_Ifl := IS_Is4; - if AFloat then - IV_Ill := (B, B, B, B, B, B); - else - IV_Ilf := To_ByteLF (IS_Is8); - end if; + IV_Ilf := To_ByteLF (IS_Is8); if EFloat then IV_Ill := (B, B, B, B, B, B, B, B, B, B, B, B); @@ -317,7 +283,7 @@ package body System.Scalar_Values is if not EFloat then declare - pragma Warnings (Off); -- why??? + pragma Warnings (Off); -- because sizes don't match function To_ByteLLF is new Ada.Unchecked_Conversion (ByteLF, ByteLLF); pragma Warnings (On); |