diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-04-24 08:04:38 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-24 08:04:38 +0000 |
commit | caa9d12a2b675da20f5a3016e6f306a84ee96a2a (patch) | |
tree | 4ef92f0ee83700140ec99de85778563e3dbe29e6 /gcc/ada/gcc-interface/gigi.h | |
parent | 1275de7d6eb0240c3dc56206aa68bac7a6c2318b (diff) | |
download | gcc-caa9d12a2b675da20f5a3016e6f306a84ee96a2a.zip gcc-caa9d12a2b675da20f5a3016e6f306a84ee96a2a.tar.gz gcc-caa9d12a2b675da20f5a3016e6f306a84ee96a2a.tar.bz2 |
ttypes.ads (Target_Double_Float_Alignment): New variable.
* ttypes.ads (Target_Double_Float_Alignment): New variable.
(Target_Double_Scalar_Alignment): Likewise.
* get_targ.ads (Get_Strict_Alignment): Adjust external name.
(Get_Double_Float_Alignment): New imported function.
(Get_Double_Scalar_Alignment): Likewise.
* layout.adb (Set_Elem_Alignment): Take into account specific caps for
the alignment of "double" floating-point types and "double" or larger
scalar types, as parameterized by Target_Double_Float_Alignment and
Target_Double_Scalar_Alignment respectively.
* gcc-interface/gigi.h (double_float_alignment): Declare.
(double_scalar_alignment): Likewise.
(is_double_float_or_array): Likewise.
(is_double_scalar_or_array): Likewise.
(get_target_double_float_alignment): Likewise.
(get_target_double_scalar_alignment): Likewise.
* gcc-interface/targtyps.c (get_strict_alignment): Rename into...
(get_target_strict_alignment): ...this.
(get_target_double_float_alignment): New function.
(get_target_double_scalar_alignment): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
Test the presence of an alignment clause for under-aligned integer
types. Take into account specific caps for the alignment of "double"
floating-point types and "double" or larger scalar types, as
parameterized by Target_Double_Float_Alignment and
Target_Double_Scalar_Alignment respectively.
(validate_alignment): Likewise.
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Alignment>: Likewise.
(gigi): Initialize double_float_alignment and double_scalar_alignment.
* gcc-interface/utils.c (double_float_alignment): New global variable.
(double_scalar_alignment): Likewise.
(is_double_float_or_array): New predicate.
(is_double_scalar_or_array): Likewise.
From-SVN: r146675
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index fb183bf..8ccb39c 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -268,6 +268,16 @@ extern int max_gnat_nodes; /* If nonzero, pretend we are allocating at global level. */ extern int force_global; +/* The default alignment of "double" floating-point types, i.e. floating + point types whose size is equal to 64 bits, or 0 if this alignment is + not specifically capped. */ +extern int double_float_alignment; + +/* The default alignment of "double" or larger scalar types, i.e. scalar + types whose size is greater or equal to 64 bits, or 0 if this alignment + is not specifically capped. */ +extern int double_scalar_alignment; + /* Standard data type sizes. Most of these are not used. */ #ifndef CHAR_TYPE_SIZE @@ -730,6 +740,20 @@ extern tree unchecked_convert (tree type, tree expr, bool notrunc_p); the latter being a record type as predicated by Is_Record_Type. */ extern enum tree_code tree_code_for_record_type (Entity_Id gnat_type); +/* Return true if GNAT_TYPE is a "double" floating-point type, i.e. whose + size is equal to 64 bits, or an array of such a type. Set ALIGN_CLAUSE + according to the presence of an alignment clause on the type or, if it + is an array, on the component type. */ +extern bool is_double_float_or_array (Entity_Id gnat_type, + bool *align_clause); + +/* Return true if GNAT_TYPE is a "double" or larger scalar type, i.e. whose + size is greater or equal to 64 bits, or an array of such a type. Set + ALIGN_CLAUSE according to the presence of an alignment clause on the + type or, if it is an array, on the component type. */ +extern bool is_double_scalar_or_array (Entity_Id gnat_type, + bool *align_clause); + /* Return true if GNU_TYPE is suitable as the type of a non-aliased component of an aggregate type. */ extern bool type_for_nonaliased_component_p (tree gnu_type); @@ -899,15 +923,17 @@ extern Pos get_target_float_size (void); extern Pos get_target_double_size (void); extern Pos get_target_long_double_size (void); extern Pos get_target_pointer_size (void); -extern Pos get_target_maximum_alignment (void); -extern Pos get_target_default_allocator_alignment (void); extern Pos get_target_maximum_default_alignment (void); +extern Pos get_target_default_allocator_alignment (void); extern Pos get_target_maximum_allowed_alignment (void); +extern Pos get_target_maximum_alignment (void); extern Nat get_float_words_be (void); extern Nat get_words_be (void); extern Nat get_bytes_be (void); extern Nat get_bits_be (void); -extern Nat get_strict_alignment (void); +extern Nat get_target_strict_alignment (void); +extern Nat get_target_double_float_alignment (void); +extern Nat get_target_double_scalar_alignment (void); /* Let code know whether we are targetting VMS without need of intrusive preprocessor directives. */ @@ -921,4 +947,3 @@ extern Nat get_strict_alignment (void); #ifndef TARGET_MALLOC64 #define TARGET_MALLOC64 0 #endif - |