* *
* C Header File *
* *
- * Copyright (C) 1992-2009, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2010, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
/* Declare all functions and types used by gigi. */
-/* The largest alignment, in bits, that is needed for using the widest
- move instruction. */
-extern unsigned int largest_move_alignment;
-
-/* Compute the alignment of the largest mode that can be used for copying
- objects. */
-extern void gnat_compute_largest_alignment (void);
-
-/* GNU_TYPE is a type. Determine if it should be passed by reference by
- default. */
-extern bool default_pass_by_ref (tree gnu_type);
-
-/* GNU_TYPE is the type of a subprogram parameter. Determine from the type
- if it should be passed by reference. */
-extern bool must_pass_by_ref (tree gnu_type);
-
-/* Initialize DUMMY_NODE_TABLE. */
-extern void init_dummy_type (void);
-
-/* Given GNAT_ENTITY, an entity in the incoming GNAT tree, return a
- GCC type corresponding to that entity. GNAT_ENTITY is assumed to
- refer to an Ada type. */
-extern tree gnat_to_gnu_type (Entity_Id gnat_entity);
-
/* Given GNAT_ENTITY, a GNAT defining identifier node, which denotes some Ada
entity, this routine returns the equivalent GCC tree for that entity
(an ..._DECL node) and associates the ..._DECL node with the input GNAT
FIELD_DECL. */
extern tree gnat_to_gnu_field_decl (Entity_Id gnat_entity);
+/* Similar, but GNAT_ENTITY is assumed to refer to a GNAT type. Return
+ the GCC type corresponding to that entity. */
+extern tree gnat_to_gnu_type (Entity_Id gnat_entity);
+
/* Wrap up compilation of T, a TYPE_DECL, possibly deferring it. */
extern void rest_of_type_decl_compilation (tree t);
Get SLOC from GNAT_ENTITY. */
extern void add_decl_expr (tree gnu_decl, Entity_Id gnat_entity);
-/* Mark nodes rooted at *TP with TREE_VISITED and types as having their
+/* Mark nodes rooted at T with TREE_VISITED and types as having their
sized gimplified. We use this to indicate all variable sizes and
positions in global types may not be shared by any subprogram. */
-extern void mark_visited (tree *);
+extern void mark_visited (tree t);
+
+/* This macro calls the above function but short-circuits the common
+ case of a constant to save time and also checks for NULL. */
+
+#define MARK_VISITED(EXP) \
+do { \
+ if((EXP) && !TREE_CONSTANT (EXP)) \
+ mark_visited (EXP); \
+} while (0)
/* Finalize any From_With_Type incomplete types. We do this after processing
our compilation unit and after processing its spec, if this is a body. */
for its representation, return GNAT_ENTITY. If a type is supposed to
exist, but does not, abort unless annotating types, in which case
return Empty. If GNAT_ENTITY is Empty, return Empty. */
-extern Entity_Id Gigi_Equivalent_Type (Entity_Id);
+extern Entity_Id Gigi_Equivalent_Type (Entity_Id gnat_entity);
/* Given GNAT_ENTITY, elaborate all expressions that are required to
be elaborated at the point of its definition, but do nothing else. */
any entities on its entity chain similarly. */
extern void mark_out_of_scope (Entity_Id gnat_entity);
-/* Make a dummy type corresponding to GNAT_TYPE. */
-extern tree make_dummy_type (Entity_Id gnat_type);
-
/* Get the unpadded version of a GNAT type. */
extern tree get_unpadded_type (Entity_Id gnat_entity);
-/* Called when we need to protect a variable object using a save_expr. */
-extern tree maybe_variable (tree gnu_operand);
-
/* Create a record type that contains a SIZE bytes long field of TYPE with a
starting bit position so that it is aligned to ALIGN bits, and leaving at
least ROOM bytes free before the field. BASE_ALIGN is the alignment the
/* Ensure that TYPE has SIZE and ALIGN. Make and return a new padded type
if needed. We have already verified that SIZE and TYPE are large enough.
-
- GNAT_ENTITY and NAME_TRAILER are used to name the resulting record and
- to issue a warning.
-
- IS_USER_TYPE is true if we must be sure we complete the original type.
-
- DEFINITION is true if this type is being defined.
-
- SAME_RM_SIZE is true if the RM_Size of the resulting type is to be
- set to its TYPE_SIZE; otherwise, it's set to the RM_Size of the original
- type. */
+ GNAT_ENTITY is used to name the resulting record and to issue a warning.
+ IS_COMPONENT_TYPE is true if this is being done for the component type
+ of an array. IS_USER_TYPE is true if we must complete the original type.
+ DEFINITION is true if this type is being defined. SAME_RM_SIZE is true
+ if the RM size of the resulting type is to be set to SIZE too; otherwise,
+ it's set to the RM size of the original type. */
extern tree maybe_pad_type (tree type, tree size, unsigned int align,
- Entity_Id gnat_entity, const char *name_trailer,
+ Entity_Id gnat_entity, bool is_component_type,
bool is_user_type, bool definition,
- bool same_rm_size);
+ bool same_rm_size);
/* Given a GNU tree and a GNAT list of choices, generate an expression to test
the value passed against the list of choices. */
extern tree choices_to_gnu (tree operand, Node_Id choices);
+/* Given GNAT_ENTITY, an object (constant, variable, parameter, exception)
+ and GNU_TYPE, its corresponding GCC type, set Esize and Alignment to the
+ size and alignment used by Gigi. Prefer SIZE over TYPE_SIZE if non-null.
+ BY_REF is true if the object is used by reference. */
+extern void annotate_object (Entity_Id gnat_entity, tree gnu_type, tree size,
+ bool by_ref);
+
/* Given a type T, a FIELD_DECL F, and a replacement value R, return a new
type with all size expressions that contain F updated by replacing F
with R. If F is NULL_TREE, always make a new RECORD_TYPE, even if
nothing has changed. */
extern tree substitute_in_type (tree t, tree f, tree r);
-/* Return the "RM size" of GNU_TYPE. This is the actual number of bits
+/* Return the RM size of GNU_TYPE. This is the actual number of bits
needed to represent the object. */
extern tree rm_size (tree gnu_type);
/* GNU_STMT is a statement. We generate code for that statement. */
extern void gnat_expand_stmt (tree gnu_stmt);
-/* ??? missing documentation */
+/* Generate GIMPLE in place for the expression at *EXPR_P. */
extern int gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p,
gimple_seq *post_p ATTRIBUTE_UNUSED);
/* Post an error message. MSG is the error message, properly annotated.
NODE is the node at which to post the error and the node to use for the
"&" substitution. */
-extern void post_error (const char *, Node_Id);
+extern void post_error (const char *msg, Node_Id node);
/* Similar, but NODE is the node at which to post the error and ENT
is the node to use for the "&" substitution. */
extern void post_error_ne_tree_2 (const char *msg, Node_Id node, Entity_Id ent,
tree t, int num);
-/* Protect EXP from multiple evaluation. This may make a SAVE_EXPR. */
-extern tree protect_multiple_eval (tree exp);
-
/* Return a label to branch to for the exception type in KIND or NULL_TREE
if none. */
-extern tree get_exception_label (char);
+extern tree get_exception_label (char kind);
/* Current node being treated, in case gigi_abort or Check_Elaboration_Code
called. */
extern Node_Id error_gnat_node;
-/* This is equivalent to stabilize_reference in tree.c, but we know how to
- handle our own nodes and we take extra arguments. FORCE says whether to
- force evaluation of everything. We set SUCCESS to true unless we walk
- through something we don't know how to stabilize. */
-extern tree maybe_stabilize_reference (tree ref, bool force, bool *success);
-
/* Highest number in the front-end node table. */
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
/* Function declaration nodes for run-time functions for allocating memory.
Ada allocators cause calls to these functions to be generated. Malloc32
- is used only on 64bit systems needing to allocate 32bit memory. */
+ is used only on 64bit systems needing to allocate 32bit memory. */
ADT_malloc_decl,
ADT_malloc32_decl,
/* Likewise for freeing memory. */
ADT_free_decl,
- /* Function decl node for 64-bit multiplication with overflow checking */
+ /* Function decl node for 64-bit multiplication with overflow checking. */
ADT_mulv64_decl,
+ /* Identifier for the name of the _Parent field in tagged record types. */
+ ADT_parent_name_id,
+
/* Types and decls used by our temporary exception mechanism. See
init_gigi_decls for details. */
ADT_jmpbuf_type,
#define malloc32_decl gnat_std_decls[(int) ADT_malloc32_decl]
#define free_decl gnat_std_decls[(int) ADT_free_decl]
#define mulv64_decl gnat_std_decls[(int) ADT_mulv64_decl]
+#define parent_name_id gnat_std_decls[(int) ADT_parent_name_id]
#define jmpbuf_type gnat_std_decls[(int) ADT_jmpbuf_type]
#define jmpbuf_ptr_type gnat_std_decls[(int) ADT_jmpbuf_ptr_type]
#define get_jmpbuf_decl gnat_std_decls[(int) ADT_get_jmpbuf_decl]
/* Returns nonzero if we are currently in the global binding level. */
extern int global_bindings_p (void);
-/* Enter and exit a new binding level. */
+/* Enter and exit a new binding level. */
extern void gnat_pushlevel (void);
extern void gnat_poplevel (void);
/* Routines created solely for the tree translator's sake. Their prototypes
can be changed as desired. */
+/* Initialize the association of GNAT nodes to GCC trees. */
+extern void init_gnat_to_gnu (void);
+
/* GNAT_ENTITY is a GNAT tree node for a defining identifier.
GNU_DECL is the GCC tree which is to be associated with
GNAT_ENTITY. Such gnu tree node is always an ..._DECL node.
/* Return nonzero if a GCC tree has been associated with GNAT_ENTITY. */
extern bool present_gnu_tree (Entity_Id gnat_entity);
-/* Initialize tables for above routines. */
-extern void init_gnat_to_gnu (void);
+/* Initialize the association of GNAT nodes to GCC trees as dummies. */
+extern void init_dummy_type (void);
+
+/* Make a dummy type corresponding to GNAT_TYPE. */
+extern tree make_dummy_type (Entity_Id gnat_type);
/* Record TYPE as a builtin type for Ada. NAME is the name of the type. */
extern void record_builtin_type (const char *name, tree type);
-/* Given a record type RECORD_TYPE and a chain of FIELD_DECL nodes FIELDLIST,
+/* Given a record type RECORD_TYPE and a list of FIELD_DECL nodes FIELD_LIST,
finish constructing the record or union type. If REP_LEVEL is zero, this
record has no representation clause and so will be entirely laid out here.
If REP_LEVEL is one, this record has a representation clause and has been
laid out already; only set the sizes and alignment. If REP_LEVEL is two,
this record is derived from a parent record and thus inherits its layout;
- only make a pass on the fields to finalize them. If DO_NOT_FINALIZE is
- true, the record type is expected to be modified afterwards so it will
- not be sent to the back-end for finalization. */
-extern void finish_record_type (tree record_type, tree fieldlist,
- int rep_level, bool do_not_finalize);
-
-/* Wrap up compilation of RECORD_TYPE, i.e. most notably output all
- the debug information associated with it. It need not be invoked
- directly in most cases since finish_record_type takes care of doing
- so, unless explicitly requested not to through DO_NOT_FINALIZE. */
+ only make a pass on the fields to finalize them. DEBUG_INFO_P is true if
+ we need to write debug information about this type. */
+extern void finish_record_type (tree record_type, tree field_list,
+ int rep_level, bool debug_info_p);
+
+/* Wrap up compilation of RECORD_TYPE, i.e. output all the debug information
+ associated with it. It need not be invoked directly in most cases since
+ finish_record_type takes care of doing so, but this can be necessary if
+ a parallel type is to be attached to the record type. */
extern void rest_of_record_type_compilation (tree record_type);
/* Append PARALLEL_TYPE on the chain of parallel types for decl. */
/* Return the parallel type associated to a type, if any. */
extern tree get_parallel_type (tree type);
-/* Returns a FUNCTION_TYPE node. RETURN_TYPE is the type returned by the
- subprogram. If it is void_type_node, then we are dealing with a procedure,
- otherwise we are dealing with a function. PARAM_DECL_LIST is a list of
- PARM_DECL nodes that are the subprogram arguments. CICO_LIST is the
- copy-in/copy-out list to be stored into TYPE_CI_CO_LIST.
- RETURNS_UNCONSTRAINED is true if the function returns an unconstrained
- object. RETURNS_BY_REF is true if the function returns by reference.
- RETURNS_BY_TARGET_PTR is true if the function is to be passed (as its
- first parameter) the address of the place to copy its result. */
+/* Return a FUNCTION_TYPE node. RETURN_TYPE is the type returned by the
+ subprogram. If it is VOID_TYPE, then we are dealing with a procedure,
+ otherwise we are dealing with a function. PARAM_DECL_LIST is a list of
+ PARM_DECL nodes that are the subprogram parameters. CICO_LIST is the
+ copy-in/copy-out list to be stored into the TYPE_CICO_LIST field.
+ RETURN_UNCONSTRAINED_P is true if the function returns an unconstrained
+ object. RETURN_BY_DIRECT_REF_P is true if the function returns by direct
+ reference. RETURN_BY_INVISI_REF_P is true if the function returns by
+ invisible reference. */
extern tree create_subprog_type (tree return_type, tree param_decl_list,
- tree cico_list, bool returns_unconstrained,
- bool returns_by_ref,
- bool returns_by_target_ptr);
+ tree cico_list, bool return_unconstrained_p,
+ bool return_by_direct_ref_p,
+ bool return_by_invisi_ref_p);
/* Return a copy of TYPE, but safe to modify in any way. */
extern tree copy_type (tree type);
-/* Return an INTEGER_TYPE of SIZETYPE with range MIN to MAX and whose
- TYPE_INDEX_TYPE is INDEX. GNAT_NODE is used for the position of
- the decl. */
+/* Return a subtype of sizetype with range MIN to MAX and whose
+ TYPE_INDEX_TYPE is INDEX. GNAT_NODE is used for the position
+ of the associated TYPE_DECL. */
extern tree create_index_type (tree min, tree max, tree index,
Node_Id gnat_node);
+/* Return a subtype of TYPE with range MIN to MAX. If TYPE is NULL,
+ sizetype is used. */
+extern tree create_range_type (tree type, tree min, tree max);
+
/* Return a TYPE_DECL node suitable for the TYPE_STUB_DECL field of a type.
TYPE_NAME gives the name of the type and TYPE is a ..._TYPE node giving
its data type. */
it indicates whether to always allocate storage to the variable.
GNAT_NODE is used for the position of the decl. */
-tree
+extern tree
create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init,
bool const_flag, bool public_flag, bool extern_flag,
bool static_flag, bool const_decl_allowed_p,
/* Given a DECL and ATTR_LIST, apply the listed attributes. */
extern void process_attributes (tree decl, struct attrib *attr_list);
-/* Record a global renaming pointer. */
-void record_global_renaming_pointer (tree);
+/* Record DECL as a global renaming pointer. */
+extern void record_global_renaming_pointer (tree decl);
-/* Invalidate the global renaming pointers. */
-void invalidate_global_renaming_pointers (void);
+/* Invalidate the global renaming pointers. */
+extern void invalidate_global_renaming_pointers (void);
-/* Returns a FIELD_DECL node. FIELD_NAME the field name, FIELD_TYPE is its
- type, and RECORD_TYPE is the type of the parent. PACKED is nonzero if
- this field is in a record type with a "pragma pack". If SIZE is nonzero
- it is the specified size for this field. If POS is nonzero, it is the bit
- position. If ADDRESSABLE is nonzero, it means we are allowed to take
- the address of this field for aliasing purposes. */
+/* Return a FIELD_DECL node. FIELD_NAME is the field's name, FIELD_TYPE is
+ its type and RECORD_TYPE is the type of the enclosing record. PACKED is
+ 1 if the enclosing record is packed, -1 if it has Component_Alignment of
+ Storage_Unit. If SIZE is nonzero, it is the specified size of the field.
+ If POS is nonzero, it is the bit position. If ADDRESSABLE is nonzero, it
+ means we are allowed to take the address of the field; if it is negative,
+ we should not make a bitfield, which is used by make_aligning_type. */
extern tree create_field_decl (tree field_name, tree field_type,
tree record_type, int packed, tree size,
tree pos, int addressable);
/* Returns a PARM_DECL node. PARAM_NAME is the name of the parameter,
PARAM_TYPE is its type. READONLY is true if the parameter is
readonly (either an In parameter or an address of a pass-by-ref
- parameter). */
+ parameter). */
extern tree create_param_decl (tree param_name, tree param_type,
bool readonly);
appearing in the subprogram. */
extern void begin_subprog_body (tree subprog_decl);
-/* Finish the definition of the current subprogram BODY and compile it all the
- way to assembler language output. ELAB_P tells if this is called for an
- elaboration routine, to be entirely discarded if empty. */
-extern void end_subprog_body (tree body, bool elab_p);
+/* Finish the definition of the current subprogram BODY and finalize it. */
+extern void end_subprog_body (tree body);
/* Build a template of type TEMPLATE_TYPE from the array bounds of ARRAY_TYPE.
EXPR is an expression that we can use to locate any PLACEHOLDER_EXPRs.
extern tree build_vms_descriptor (tree type, Mechanism_Type mech,
Entity_Id gnat_entity);
-/* Build a 32bit VMS descriptor from a Mechanism_Type. See above. */
+/* Build a 32bit VMS descriptor from a Mechanism_Type. See above. */
extern tree build_vms_descriptor32 (tree type, Mechanism_Type mech,
Entity_Id gnat_entity);
tree name);
/* Same as build_unc_object_type, but taking a thin or fat pointer type
- instead of the template type. */
+ instead of the template type. */
extern tree build_unc_object_type_from_ptr (tree thin_fat_ptr_type,
tree object_type, tree name);
likewise return an expression pointing to the underlying array. */
extern tree maybe_unconstrained_array (tree exp);
+/* If EXP's type is a VECTOR_TYPE, return EXP converted to the associated
+ TYPE_REPRESENTATIVE_ARRAY. */
+extern tree maybe_vector_array (tree exp);
+
/* Return an expression that does an unchecked conversion of EXPR to TYPE.
If NOTRUNC_P is true, truncation operations should be suppressed. */
extern tree unchecked_convert (tree type, tree expr, bool notrunc_p);
-/* Return the appropriate GCC tree code for the specified GNAT type,
+/* Return the appropriate GCC tree code for the specified GNAT_TYPE,
the latter being a record type as predicated by Is_Record_Type. */
-extern enum tree_code tree_code_for_record_type (Entity_Id);
+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);
-
-/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
- operation.
-
- This preparation consists of taking the ordinary
- representation of an expression EXPR and producing a valid tree
- boolean expression describing whether EXPR is nonzero. We could
- simply always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1),
- but we optimize comparisons, &&, ||, and !.
-
- The resulting type should always be the same as the input type.
- This function is simpler than the corresponding C version since
- the only possible operands will be things of Boolean type. */
-extern tree gnat_truthvalue_conversion (tree expr);
+extern bool type_for_nonaliased_component_p (tree gnu_type);
/* Return the base type of TYPE. */
extern tree get_base_type (tree type);
extern unsigned int known_alignment (tree exp);
/* Return true if VALUE is a multiple of FACTOR. FACTOR must be a power
- of 2. */
+ of 2. */
extern bool value_factor_p (tree value, HOST_WIDE_INT factor);
/* Make a binary operation of kind OP_CODE. RESULT_TYPE is the type
extern tree build_binary_op (enum tree_code op_code, tree result_type,
tree left_operand, tree right_operand);
-/* Similar, but make unary operation. */
+/* Similar, but make unary operation. */
extern tree build_unary_op (enum tree_code op_code, tree result_type,
tree operand);
tree true_operand, tree false_operand);
/* Similar, but for RETURN_EXPR. */
-extern tree build_return_expr (tree result_decl, tree ret_val);
+extern tree build_return_expr (tree ret_obj, tree ret_val);
/* Build a CALL_EXPR to call FUNDECL with one argument, ARG. Return
the CALL_EXPR. */
If GNU_OBJ is nonzero, it is an object to deallocate. Otherwise,
generate an allocator.
- GNU_SIZE is the size of the object and ALIGN is the alignment.
- GNAT_PROC, if present is a procedure to call and GNAT_POOL is the
- storage pool to use. If not preset, malloc and free will be used. */
+ GNU_SIZE is the number of bytes to allocate and GNU_TYPE is the contained
+ object type, used to determine the to-be-honored address alignment.
+ GNAT_PROC, if present, is a procedure to call and GNAT_POOL is the storage
+ pool to use. If not present, malloc and free are used. GNAT_NODE is used
+ to provide an error location for restriction violation messages. */
extern tree build_call_alloc_dealloc (tree gnu_obj, tree gnu_size,
- unsigned align, Entity_Id gnat_proc,
+ tree gnu_type, Entity_Id gnat_proc,
Entity_Id gnat_pool, Node_Id gnat_node);
/* Build a GCC tree to correspond to allocating an object of TYPE whose
initial value if INIT, if INIT is nonzero. Convert the expression to
RESULT_TYPE, which must be some type of pointer. Return the tree.
+
GNAT_PROC and GNAT_POOL optionally give the procedure to call and
the storage pool to use. GNAT_NODE is used to provide an error
- location for restriction violations messages. If IGNORE_INIT_TYPE is
+ location for restriction violation messages. If IGNORE_INIT_TYPE is
true, ignore the type of INIT for the purpose of determining the size;
this will cause the maximum size to be allocated if TYPE is of
self-referential size. */
extern tree fill_vms_descriptor (tree expr, Entity_Id gnat_formal,
Node_Id gnat_actual);
-/* Indicate that we need to make the address of EXPR_NODE and it therefore
- should not be allocated in a register. Return true if successful. */
-extern bool gnat_mark_addressable (tree expr_node);
+/* Indicate that we need to take the address of T and that it therefore
+ should not be allocated in a register. Returns true if successful. */
+extern bool gnat_mark_addressable (tree t);
+
+/* Save EXP for later use or reuse. This is equivalent to save_expr in tree.c
+ but we know how to handle our own nodes. */
+extern tree gnat_save_expr (tree exp);
+
+/* Protect EXP for immediate reuse. This is a variant of gnat_save_expr that
+ is optimized under the assumption that EXP's value doesn't change before
+ its subsequent reuse(s) except through its potential reevaluation. */
+extern tree gnat_protect_expr (tree exp);
+
+/* This is equivalent to stabilize_reference in tree.c but we know how to
+ handle our own nodes and we take extra arguments. FORCE says whether to
+ force evaluation of everything. We set SUCCESS to true unless we walk
+ through something we don't know how to stabilize. */
+extern tree gnat_stabilize_reference (tree ref, bool force, bool *success);
/* Implementation of the builtin_function langhook. */
extern tree gnat_builtin_function (tree decl);
Return the first node found, if any, or NULL_TREE otherwise. */
extern tree builtin_decl_for (tree name);
+/* GNU_TYPE is a type. Determine if it should be passed by reference by
+ default. */
+extern bool default_pass_by_ref (tree gnu_type);
+
+/* GNU_TYPE is the type of a subprogram parameter. Determine from the type
+ if it should be passed by reference. */
+extern bool must_pass_by_ref (tree gnu_type);
+
/* This function is called by the front end to enumerate all the supported
modes for the machine. We pass a function which is called back with
the following integer parameters:
extern void enumerate_modes (void (*f) (int, int, int, int, int, int,
unsigned int));
-/* These are temporary function to deal with recent GCC changes related to
- FP type sizes and precisions. */
+/* Return the size of the FP mode with precision PREC. */
extern int fp_prec_to_size (int prec);
+
+/* Return the precision of the FP mode with size SIZE. */
extern int fp_size_to_prec (int size);
/* These functions return the basic data type sizes and related parameters
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. */
/* VMS macro set by default, when clear forces 32bit mallocs and 32bit
Descriptors. Always used in combination with TARGET_ABI_OPEN_VMS
- so no effect on non-VMS systems. */
+ so no effect on non-VMS systems. */
#ifndef TARGET_MALLOC64
#define TARGET_MALLOC64 0
#endif
+/* Convenient shortcuts. */
+#define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) == VECTOR_TYPE)