/* Data structure definitions for a generic GCC target.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any
+ later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>.
+
+ In other words, you are welcome to use, share and improve this program.
+ You are forbidden to forbid anyone else to use, share and improve
+ what you give them. Help stamp out software-hoarding! */
- In other words, you are welcome to use, share and improve this program.
- You are forbidden to forbid anyone else to use, share and improve
- what you give them. Help stamp out software-hoarding! */
/* This file contains a data structure that describes a GCC target.
At present it is incomplete, but in future it should grow to
which this section is associated. */
void (* named_section) (const char *name, unsigned int flags, tree decl);
+ /* Return a mask describing how relocations should be treated when
+ selecting sections. Bit 1 should be set if global relocations
+ should be placed in a read-write section; bit 0 should be set if
+ local relocations should be placed in a read-write section. */
+ int (*reloc_rw_mask) (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.
void (* init_dfa_post_cycle_insn) (void);
rtx (* dfa_post_cycle_insn) (void);
+ /* The values of the following two members are pointers to
+ functions used to simplify the automaton descriptions.
+ dfa_pre_advance_cycle and dfa_post_advance_cycle are getting called
+ immediatelly before and after cycle is advanced. */
+ void (* dfa_pre_advance_cycle) (void);
+ void (* dfa_post_advance_cycle) (void);
+
/* The following member value is a pointer to a function returning value
which defines how many insns in queue `ready' will we try for
multi-pass scheduling. If the member value is nonzero and the
element-by-element products for the odd elements. */
tree (* builtin_mul_widen_even) (tree);
tree (* builtin_mul_widen_odd) (tree);
+
+ /* Returns the cost to be added to the overheads involved with
+ executing the vectorized version of a loop. */
+ int (*builtin_vectorization_cost) (bool);
+
+ /* Return true if vector alignment is reachable (by peeling N
+ iterations) for the given type. */
+ bool (* vector_alignment_reachable) (tree, bool);
} vectorize;
/* The initial value of target_flags. */
form was. Return true if the switch was valid. */
bool (* handle_option) (size_t code, const char *arg, int value);
+ /* Display extra, target specific information in response to a
+ --target-help switch. */
+ void (* target_help) (void);
+
/* Return machine mode for filter value. */
enum machine_mode (* eh_return_filter_mode) (void);
+ /* Return machine mode for libgcc expanded cmp instructions. */
+ enum machine_mode (* libgcc_cmp_return_mode) (void);
+
+ /* Return machine mode for libgcc expanded shift instructions. */
+ enum machine_mode (* libgcc_shift_count_mode) (void);
+
/* Given two decls, merge their attributes and return the result. */
tree (* merge_decl_attributes) (tree, tree);
/* True if the target supports decimal floating point. */
bool (* decimal_float_supported_p) (void);
+ /* True if the target supports fixed-point. */
+ bool (* fixed_point_supported_p) (void);
+
/* Return true if anonymous bitfields affect structure alignment. */
bool (* align_anon_bitfield) (void);
/* Fold a target-specific builtin. */
tree (* fold_builtin) (tree fndecl, tree arglist, bool ignore);
- /* For a vendor-specific fundamental TYPE, return a pointer to
- a statically-allocated string containing the C++ mangling for
- TYPE. In all other cases, return NULL. */
- const char * (* mangle_fundamental_type) (tree type);
+ /* Returns a code for a target-specific builtin that implements
+ reciprocal of the function, or NULL_TREE if not available. */
+ tree (* builtin_reciprocal) (unsigned, bool, bool);
+
+ /* For a vendor-specific TYPE, return a pointer to a statically-allocated
+ string containing the C++ mangling for TYPE. In all other cases, return
+ NULL. */
+ const char * (* mangle_type) (tree type);
/* Make any adjustments to libfunc names needed for this target. */
void (* init_libfuncs) (void);
to the current module. */
bool (* binds_local_p) (tree);
+ /* Modify and return the identifier of a DECL's external name,
+ originally identified by ID, as required by the target,
+ (eg, append @nn to windows32 stdcall function names).
+ The default is to return ID without modification. */
+ tree (* mangle_decl_assembler_name) (tree decl, tree id);
+
/* Do something target-specific to record properties of the DECL into
the associated SYMBOL_REF. */
void (* encode_section_info) (tree, rtx, int);
enum machine_mode,
struct secondary_reload_info *);
+ /* Functions specific to the C family of frontends. */
+ struct c {
+ /* Return machine mode for non-standard suffix
+ or VOIDmode if non-standard suffixes are unsupported. */
+ enum machine_mode (*mode_for_suffix) (char);
+ } c;
+
/* Functions specific to the C++ frontend. */
struct cxx {
/* Return the integer type used for guard variables. */