struct stdarg_info;
+/* The struct used by the secondary_reload target hook. */
+typedef struct secondary_reload_info
+{
+ /* icode is actually an enum insn_code, but we don't want to force every
+ file that includes target.h to include optabs.h . */
+ int icode;
+ int extra_cost; /* Cost for using (a) scratch register(s) to be taken
+ into account by copy_cost. */
+ /* The next two members are for the use of the backward
+ compatibility hook. */
+ struct secondary_reload_info *prev_sri;
+ int t_icode; /* Actually an enum insn_code - see above. */
+} secondary_reload_info;
+
+
struct gcc_target
{
/* Functions that output assembler for the target. */
/* Output an internal label. */
void (* internal_label) (FILE *, const char *, unsigned long);
+ /* Emit a ttype table reference to a typeinfo object. */
+ bool (* ttype) (rtx);
+
/* Emit an assembler directive to set visibility for the symbol
associated with the tree decl. */
void (* visibility) (tree, int);
/* Output the assembler code for function exit. */
void (* function_epilogue) (FILE *, HOST_WIDE_INT);
+ /* Initialize target-specific sections. */
+ void (* init_sections) (void);
+
/* Tell assembler to change to section NAME with attributes FLAGS.
If DECL is non-NULL, it is the VAR_DECL or FUNCTION_DECL with
which this section is associated. */
void (* named_section) (const char *name, unsigned int flags, tree decl);
- /* Switch to the section that holds the exception table. */
- void (* exception_section) (void);
+ /* Return a section for EXP. It may be a DECL or a constant. RELOC
+ is nonzero if runtime relocations must be applied; bit 1 will be
+ set if the runtime relocations require non-local name resolution.
+ ALIGN is the required alignment of the data. */
+ section *(* select_section) (tree, int, unsigned HOST_WIDE_INT);
- /* Switch to the section that holds the exception frames. */
- void (* eh_frame_section) (void);
-
- /* Select and switch to a section for EXP. It may be a DECL or a
- constant. RELOC is nonzero if runtime relocations must be applied;
- bit 1 will be set if the runtime relocations require non-local
- name resolution. ALIGN is the required alignment of the data. */
- void (* select_section) (tree, int, unsigned HOST_WIDE_INT);
-
- /* Select and switch to a section for X with MODE. ALIGN is
- the desired alignment of the data. */
- void (* select_rtx_section) (enum machine_mode, rtx,
- unsigned HOST_WIDE_INT);
+ /* Return a section for X. MODE is X's mode and ALIGN is its
+ alignment in bits. */
+ section *(* select_rtx_section) (enum machine_mode, rtx,
+ unsigned HOST_WIDE_INT);
/* Select a unique section name for DECL. RELOC is the same as
for SELECT_SECTION. */
void (* unique_section) (tree, int);
- /* Tell assembler to switch to the readonly data section associated
- with function DECL. */
- void (* function_rodata_section) (tree);
+ /* Return the readonly data section associated with function DECL. */
+ section *(* function_rodata_section) (tree);
/* Output a constructor for a symbol with a given priority. */
void (* constructor) (rtx, int);
Microsoft Visual C++ bitfield layout rules. */
bool (* ms_bitfield_layout_p) (tree record_type);
+ /* True if the target supports decimal floating point. */
+ bool (* decimal_float_supported_p) (void);
+
/* Return true if anonymous bitfields affect structure alignment. */
bool (* align_anon_bitfield) (void);
/* True if the insn X cannot be duplicated. */
bool (* cannot_copy_insn_p) (rtx);
+ /* True if X is considered to be commutative. */
+ bool (* commutative_p) (rtx, int);
+
/* Given an address RTX, undo the effects of LEGITIMIZE_ADDRESS. */
rtx (* delegitimize_address) (rtx);
invalid addresses. */
int (* address_cost) (rtx x);
+ /* Return where to allocate pseudo for a given hard register initial
+ value. */
+ rtx (* allocate_initial_value) (rtx x);
+
/* Given a register, this hook should return a parallel of registers
to represent where to find the register pieces. Define this hook
if the register and its mode are represented in Dwarf in
/* Returns NULL if target supports the insn within a doloop block,
otherwise it returns an error message. */
const char * (*invalid_within_doloop) (rtx);
+
+ /* DECL is a variable or function with __attribute__((dllimport))
+ specified. Use this hook if the target needs to add extra validation
+ checks to handle_dll_attribute (). */
+ bool (* valid_dllimport_attribute_p) (tree decl);
/* Functions relating to calls - argument passing, returns, etc. */
struct calls {
is not allowed for this 'val' argument; NULL otherwise. */
const char *(*invalid_arg_for_unprototyped_fn) (tree typelist,
tree funcdecl, tree val);
+
+ /* Return an rtx for the return value location of the function
+ specified by FN_DECL_OR_TYPE with a return type of RET_TYPE. */
+ rtx (*function_value) (tree ret_type, tree fn_decl_or_type,
+ bool outgoing);
+
+ /* Return an rtx for the argument pointer incoming to the
+ current function. */
+ rtx (*internal_arg_pointer) (void);
} calls;
+ /* Return the diagnostic message string if conversion from FROMTYPE
+ to TOTYPE is not allowed, NULL otherwise. */
+ const char *(*invalid_conversion) (tree fromtype, tree totype);
+
+ /* Return the diagnostic message string if the unary operation OP is
+ not permitted on TYPE, NULL otherwise. */
+ const char *(*invalid_unary_op) (int op, tree type);
+
+ /* Return the diagnostic message string if the binary operation OP
+ is not permitted on TYPE1 and TYPE2, NULL otherwise. */
+ const char *(*invalid_binary_op) (int op, tree type1, tree type2);
+
+ /* Return the class for a secondary reload, and fill in extra information. */
+ enum reg_class (*secondary_reload) (bool, rtx, enum reg_class,
+ enum machine_mode,
+ struct secondary_reload_info *);
+
/* Functions specific to the C++ frontend. */
struct cxx {
/* Return the integer type used for guard variables. */
/* Returns true if __aeabi_atexit should be used to register static
destructors. */
bool (*use_aeabi_atexit) (void);
+ /* TYPE is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that
+ has just been defined. Use this hook to make adjustments to the
+ class (eg, tweak visibility or perform any other required
+ target modifications). */
+ void (*adjust_class_at_definition) (tree type);
} cxx;
+ /* True if unwinding tables should be generated by default. */
+ bool unwind_tables_default;
+
/* Leave the boolean fields at the end. */
/* True if arbitrary sections are supported. */
synchronization is explicitly requested. */
bool relaxed_ordering;
+ /* Returns true if we should generate exception tables for use with the
+ ARM EABI. The effects the encoding of function exception specifications.
+ */
+ bool arm_eabi_unwinder;
+
/* Leave the boolean fields at the end. */
};