diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-03-14 12:58:29 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-17 10:21:06 +0200 |
commit | 9ff83f013eb1ea2eac11c17cc3be2024e96101a5 (patch) | |
tree | 8cf1a8edae71b08af4be1fcf44a279e47a9a4744 | |
parent | c8e5d90c4a0b736c2c4c5be3e8a3e9744e602d9d (diff) | |
download | gcc-9ff83f013eb1ea2eac11c17cc3be2024e96101a5.zip gcc-9ff83f013eb1ea2eac11c17cc3be2024e96101a5.tar.gz gcc-9ff83f013eb1ea2eac11c17cc3be2024e96101a5.tar.bz2 |
ada: Further adjustments coming from aliasing considerations
They are needed on 32-bit platforms because of different calling conventions
and again in the units implementing AltiVec and Streams support.
gcc/ada/
* libgnat/g-alvevi.ads: Add pragma Universal_Aliasing for all the
view types.
* libgnat/s-stratt.ads: Likewise for Fat_Pointer type.
-rw-r--r-- | gcc/ada/libgnat/g-alvevi.ads | 11 | ||||
-rw-r--r-- | gcc/ada/libgnat/s-stratt.ads | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/g-alvevi.ads b/gcc/ada/libgnat/g-alvevi.ads index b2beac7..b0f5879 100644 --- a/gcc/ada/libgnat/g-alvevi.ads +++ b/gcc/ada/libgnat/g-alvevi.ads @@ -58,6 +58,7 @@ package GNAT.Altivec.Vector_Views is type VUC_View is record Values : Varray_unsigned_char; end record; + pragma Universal_Aliasing (VUC_View); type Varray_signed_char is array (Vchar_Range) of signed_char; for Varray_signed_char'Alignment use VECTOR_ALIGNMENT; @@ -65,6 +66,7 @@ package GNAT.Altivec.Vector_Views is type VSC_View is record Values : Varray_signed_char; end record; + pragma Universal_Aliasing (VSC_View); type Varray_bool_char is array (Vchar_Range) of bool_char; for Varray_bool_char'Alignment use VECTOR_ALIGNMENT; @@ -72,6 +74,7 @@ package GNAT.Altivec.Vector_Views is type VBC_View is record Values : Varray_bool_char; end record; + pragma Universal_Aliasing (VBC_View); ---------------------- -- short components -- @@ -85,6 +88,7 @@ package GNAT.Altivec.Vector_Views is type VUS_View is record Values : Varray_unsigned_short; end record; + pragma Universal_Aliasing (VUS_View); type Varray_signed_short is array (Vshort_Range) of signed_short; for Varray_signed_short'Alignment use VECTOR_ALIGNMENT; @@ -92,6 +96,7 @@ package GNAT.Altivec.Vector_Views is type VSS_View is record Values : Varray_signed_short; end record; + pragma Universal_Aliasing (VSS_View); type Varray_bool_short is array (Vshort_Range) of bool_short; for Varray_bool_short'Alignment use VECTOR_ALIGNMENT; @@ -99,6 +104,7 @@ package GNAT.Altivec.Vector_Views is type VBS_View is record Values : Varray_bool_short; end record; + pragma Universal_Aliasing (VBS_View); -------------------- -- int components -- @@ -112,6 +118,7 @@ package GNAT.Altivec.Vector_Views is type VUI_View is record Values : Varray_unsigned_int; end record; + pragma Universal_Aliasing (VUI_View); type Varray_signed_int is array (Vint_Range) of signed_int; for Varray_signed_int'Alignment use VECTOR_ALIGNMENT; @@ -119,6 +126,7 @@ package GNAT.Altivec.Vector_Views is type VSI_View is record Values : Varray_signed_int; end record; + pragma Universal_Aliasing (VSI_View); type Varray_bool_int is array (Vint_Range) of bool_int; for Varray_bool_int'Alignment use VECTOR_ALIGNMENT; @@ -126,6 +134,7 @@ package GNAT.Altivec.Vector_Views is type VBI_View is record Values : Varray_bool_int; end record; + pragma Universal_Aliasing (VBI_View); ---------------------- -- float components -- @@ -139,6 +148,7 @@ package GNAT.Altivec.Vector_Views is type VF_View is record Values : Varray_float; end record; + pragma Universal_Aliasing (VF_View); ---------------------- -- pixel components -- @@ -152,5 +162,6 @@ package GNAT.Altivec.Vector_Views is type VP_View is record Values : Varray_pixel; end record; + pragma Universal_Aliasing (VP_View); end GNAT.Altivec.Vector_Views; diff --git a/gcc/ada/libgnat/s-stratt.ads b/gcc/ada/libgnat/s-stratt.ads index 1d4c82d..eee19f4 100644 --- a/gcc/ada/libgnat/s-stratt.ads +++ b/gcc/ada/libgnat/s-stratt.ads @@ -74,6 +74,9 @@ package System.Stream_Attributes is P2 : System.Address; end record; + pragma Universal_Aliasing (Fat_Pointer); + -- This avoids a copy for the aforementioned unchecked conversions + ------------------------------------ -- Treatment of enumeration types -- ------------------------------------ |