00001 /* Data structure definitions for a generic GCC target. 00002 Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 00003 00004 This program is free software; you can redistribute it and/or modify it 00005 under the terms of the GNU General Public License as published by the 00006 Free Software Foundation; either version 2, or (at your option) any 00007 later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 In other words, you are welcome to use, share and improve this program. 00019 You are forbidden to forbid anyone else to use, share and improve 00020 what you give them. Help stamp out software-hoarding! */ 00021 00022 /* This file contains a data structure that describes a GCC target. 00023 At present it is incomplete, but in future it should grow to 00024 contain most or all target machine and target O/S specific 00025 information. 00026 00027 This structure has its initializer declared in target-def.h in the 00028 form of large macro TARGET_INITIALIZER that expands to many smaller 00029 macros. 00030 00031 The smaller macros each initialize one component of the structure, 00032 and each has a default. Each target should have a file that 00033 includes target.h and target-def.h, and overrides any inappropriate 00034 defaults by undefining the relevant macro and defining a suitable 00035 replacement. That file should then contain the definition of 00036 "targetm" like so: 00037 00038 struct gcc_target targetm = TARGET_INITIALIZER; 00039 00040 Doing things this way allows us to bring together everything that 00041 defines a GCC target. By supplying a default that is appropriate 00042 to most targets, we can easily add new items without needing to 00043 edit dozens of target configuration files. It should also allow us 00044 to gradually reduce the amount of conditional compilation that is 00045 scattered throughout GCC. */ 00046 00047 #ifndef GCC_TARGET_H 00048 #define GCC_TARGET_H 00049 00050 #include "tm.h" 00051 #include "insn-modes.h" 00052 00053 struct gcc_target 00054 { 00055 /* Functions that output assembler for the target. */ 00056 struct asm_out 00057 { 00058 /* Opening and closing parentheses for asm expression grouping. */ 00059 const char *open_paren, *close_paren; 00060 00061 /* Assembler instructions for creating various kinds of integer object. */ 00062 const char *byte_op; 00063 struct asm_int_op 00064 { 00065 const char *hi; 00066 const char *si; 00067 const char *di; 00068 const char *ti; 00069 } aligned_op, unaligned_op; 00070 00071 /* Try to output the assembler code for an integer object whose 00072 value is given by X. SIZE is the size of the object in bytes and 00073 ALIGNED_P indicates whether it is aligned. Return true if 00074 successful. Only handles cases for which BYTE_OP, ALIGNED_OP 00075 and UNALIGNED_OP are NULL. */ 00076 bool (* integer) (rtx x, unsigned int size, int aligned_p); 00077 00078 /* Output code that will globalize a label. */ 00079 void (* globalize_label) (FILE *, const char *); 00080 00081 /* Output code that will emit a label for unwind info, if this 00082 target requires such labels. Second argument is the decl the 00083 unwind info is associated with, third is a boolean: true if 00084 this is for exception handling, fourth is a boolean: true if 00085 this is only a placeholder for an omitted FDE. */ 00086 void (* unwind_label) (FILE *, tree, int, int); 00087 00088 /* Emit any directives required to unwind this instruction. */ 00089 void (* unwind_emit) (FILE *, rtx); 00090 00091 /* Output an internal label. */ 00092 void (* internal_label) (FILE *, const char *, unsigned long); 00093 00094 /* Emit an assembler directive to set visibility for the symbol 00095 associated with the tree decl. */ 00096 void (* visibility) (tree, int); 00097 00098 /* Output the assembler code for entry to a function. */ 00099 void (* function_prologue) (FILE *, HOST_WIDE_INT); 00100 00101 /* Output the assembler code for end of prologue. */ 00102 void (* function_end_prologue) (FILE *); 00103 00104 /* Output the assembler code for start of epilogue. */ 00105 void (* function_begin_epilogue) (FILE *); 00106 00107 /* Output the assembler code for function exit. */ 00108 void (* function_epilogue) (FILE *, HOST_WIDE_INT); 00109 00110 /* Tell assembler to change to section NAME with attributes FLAGS. 00111 If DECL is non-NULL, it is the VAR_DECL or FUNCTION_DECL with 00112 which this section is associated. */ 00113 void (* named_section) (const char *name, unsigned int flags, tree decl); 00114 00115 /* Switch to the section that holds the exception table. */ 00116 void (* exception_section) (void); 00117 00118 /* Switch to the section that holds the exception frames. */ 00119 void (* eh_frame_section) (void); 00120 00121 /* Select and switch to a section for EXP. It may be a DECL or a 00122 constant. RELOC is nonzero if runtime relocations must be applied; 00123 bit 1 will be set if the runtime relocations require non-local 00124 name resolution. ALIGN is the required alignment of the data. */ 00125 void (* select_section) (tree, int, unsigned HOST_WIDE_INT); 00126 00127 /* Select and switch to a section for X with MODE. ALIGN is 00128 the desired alignment of the data. */ 00129 void (* select_rtx_section) (enum machine_mode, rtx, 00130 unsigned HOST_WIDE_INT); 00131 00132 /* Select a unique section name for DECL. RELOC is the same as 00133 for SELECT_SECTION. */ 00134 void (* unique_section) (tree, int); 00135 00136 /* Tell assembler to switch to the readonly data section associated 00137 with function DECL. */ 00138 void (* function_rodata_section) (tree); 00139 00140 /* Output a constructor for a symbol with a given priority. */ 00141 void (* constructor) (rtx, int); 00142 00143 /* Output a destructor for a symbol with a given priority. */ 00144 void (* destructor) (rtx, int); 00145 00146 /* Output the assembler code for a thunk function. THUNK_DECL is the 00147 declaration for the thunk function itself, FUNCTION is the decl for 00148 the target function. DELTA is an immediate constant offset to be 00149 added to THIS. If VCALL_OFFSET is nonzero, the word at 00150 *(*this + vcall_offset) should be added to THIS. */ 00151 void (* output_mi_thunk) (FILE *file, tree thunk_decl, 00152 HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, 00153 tree function_decl); 00154 00155 /* Determine whether output_mi_thunk would succeed. */ 00156 /* ??? Ideally, this hook would not exist, and success or failure 00157 would be returned from output_mi_thunk directly. But there's 00158 too much undo-able setup involved in invoking output_mi_thunk. 00159 Could be fixed by making output_mi_thunk emit rtl instead of 00160 text to the output file. */ 00161 bool (* can_output_mi_thunk) (tree thunk_decl, HOST_WIDE_INT delta, 00162 HOST_WIDE_INT vcall_offset, 00163 tree function_decl); 00164 00165 /* Output any boilerplate text needed at the beginning of a 00166 translation unit. */ 00167 void (*file_start) (void); 00168 00169 /* Output any boilerplate text needed at the end of a 00170 translation unit. */ 00171 void (*file_end) (void); 00172 00173 /* Output an assembler pseudo-op to declare a library function name 00174 external. */ 00175 void (*external_libcall) (rtx); 00176 00177 /* Output an assembler directive to mark decl live. This instructs 00178 linker to not dead code strip this symbol. */ 00179 void (*mark_decl_preserved) (const char *); 00180 00181 } asm_out; 00182 00183 /* Functions relating to instruction scheduling. */ 00184 struct sched 00185 { 00186 /* Given the current cost, COST, of an insn, INSN, calculate and 00187 return a new cost based on its relationship to DEP_INSN through 00188 the dependence LINK. The default is to make no adjustment. */ 00189 int (* adjust_cost) (rtx insn, rtx link, rtx def_insn, int cost); 00190 00191 /* Adjust the priority of an insn as you see fit. Returns the new 00192 priority. */ 00193 int (* adjust_priority) (rtx, int); 00194 00195 /* Function which returns the maximum number of insns that can be 00196 scheduled in the same machine cycle. This must be constant 00197 over an entire compilation. The default is 1. */ 00198 int (* issue_rate) (void); 00199 00200 /* Calculate how much this insn affects how many more insns we 00201 can emit this cycle. Default is they all cost the same. */ 00202 int (* variable_issue) (FILE *, int, rtx, int); 00203 00204 /* Initialize machine-dependent scheduling code. */ 00205 void (* md_init) (FILE *, int, int); 00206 00207 /* Finalize machine-dependent scheduling code. */ 00208 void (* md_finish) (FILE *, int); 00209 00210 /* Initialize machine-dependent function while scheduling code. */ 00211 void (* md_init_global) (FILE *, int, int); 00212 00213 /* Finalize machine-dependent function wide scheduling code. */ 00214 void (* md_finish_global) (FILE *, int); 00215 00216 /* Reorder insns in a machine-dependent fashion, in two different 00217 places. Default does nothing. */ 00218 int (* reorder) (FILE *, int, rtx *, int *, int); 00219 int (* reorder2) (FILE *, int, rtx *, int *, int); 00220 00221 /* The following member value is a pointer to a function called 00222 after evaluation forward dependencies of insns in chain given 00223 by two parameter values (head and tail correspondingly). */ 00224 void (* dependencies_evaluation_hook) (rtx, rtx); 00225 00226 /* The values of the following four members are pointers to 00227 functions used to simplify the automaton descriptions. 00228 dfa_pre_cycle_insn and dfa_post_cycle_insn give functions 00229 returning insns which are used to change the pipeline hazard 00230 recognizer state when the new simulated processor cycle 00231 correspondingly starts and finishes. The function defined by 00232 init_dfa_pre_cycle_insn and init_dfa_post_cycle_insn are used 00233 to initialize the corresponding insns. The default values of 00234 the members result in not changing the automaton state when 00235 the new simulated processor cycle correspondingly starts and 00236 finishes. */ 00237 void (* init_dfa_pre_cycle_insn) (void); 00238 rtx (* dfa_pre_cycle_insn) (void); 00239 void (* init_dfa_post_cycle_insn) (void); 00240 rtx (* dfa_post_cycle_insn) (void); 00241 00242 /* The following member value is a pointer to a function returning value 00243 which defines how many insns in queue `ready' will we try for 00244 multi-pass scheduling. If the member value is nonzero and the 00245 function returns positive value, the DFA based scheduler will make 00246 multi-pass scheduling for the first cycle. In other words, we will 00247 try to choose ready insn which permits to start maximum number of 00248 insns on the same cycle. */ 00249 int (* first_cycle_multipass_dfa_lookahead) (void); 00250 00251 /* The following member value is pointer to a function controlling 00252 what insns from the ready insn queue will be considered for the 00253 multipass insn scheduling. If the hook returns zero for insn 00254 passed as the parameter, the insn will be not chosen to be 00255 issued. */ 00256 int (* first_cycle_multipass_dfa_lookahead_guard) (rtx); 00257 00258 /* The following member value is pointer to a function called by 00259 the insn scheduler before issuing insn passed as the third 00260 parameter on given cycle. If the hook returns nonzero, the 00261 insn is not issued on given processors cycle. Instead of that, 00262 the processor cycle is advanced. If the value passed through 00263 the last parameter is zero, the insn ready queue is not sorted 00264 on the new cycle start as usually. The first parameter passes 00265 file for debugging output. The second one passes the scheduler 00266 verbose level of the debugging output. The forth and the fifth 00267 parameter values are correspondingly processor cycle on which 00268 the previous insn has been issued and the current processor 00269 cycle. */ 00270 int (* dfa_new_cycle) (FILE *, int, rtx, int, int, int *); 00271 00272 /* The following member value is a pointer to a function called 00273 by the insn scheduler. It should return true if there exists a 00274 dependence which is considered costly by the target, between 00275 the insn passed as the first parameter, and the insn passed as 00276 the second parameter. The third parameter is the INSN_DEPEND 00277 link that represents the dependence between the two insns. The 00278 fourth argument is the cost of the dependence as estimated by 00279 the scheduler. The last argument is the distance in cycles 00280 between the already scheduled insn (first parameter) and the 00281 the second insn (second parameter). */ 00282 bool (* is_costly_dependence) (rtx, rtx, rtx, int, int); 00283 } sched; 00284 00285 /* Functions relating to vectorization. */ 00286 struct vectorize 00287 { 00288 /* The following member value is a pointer to a function called 00289 by the vectorizer, and return the decl of the target builtin 00290 function. */ 00291 tree (* builtin_mask_for_load) (void); 00292 } vectorize; 00293 00294 /* Return machine mode for filter value. */ 00295 enum machine_mode (* eh_return_filter_mode) (void); 00296 00297 /* Given two decls, merge their attributes and return the result. */ 00298 tree (* merge_decl_attributes) (tree, tree); 00299 00300 /* Given two types, merge their attributes and return the result. */ 00301 tree (* merge_type_attributes) (tree, tree); 00302 00303 /* Table of machine attributes and functions to handle them. 00304 Ignored if NULL. */ 00305 const struct attribute_spec *attribute_table; 00306 00307 /* Return zero if the attributes on TYPE1 and TYPE2 are incompatible, 00308 one if they are compatible and two if they are nearly compatible 00309 (which causes a warning to be generated). */ 00310 int (* comp_type_attributes) (tree type1, tree type2); 00311 00312 /* Assign default attributes to the newly defined TYPE. */ 00313 void (* set_default_type_attributes) (tree type); 00314 00315 /* Insert attributes on the newly created DECL. */ 00316 void (* insert_attributes) (tree decl, tree *attributes); 00317 00318 /* Return true if FNDECL (which has at least one machine attribute) 00319 can be inlined despite its machine attributes, false otherwise. */ 00320 bool (* function_attribute_inlinable_p) (tree fndecl); 00321 00322 /* Return true if bitfields in RECORD_TYPE should follow the 00323 Microsoft Visual C++ bitfield layout rules. */ 00324 bool (* ms_bitfield_layout_p) (tree record_type); 00325 00326 /* Return true if anonymous bitfields affect structure alignment. */ 00327 bool (* align_anon_bitfield) (void); 00328 00329 /* Set up target-specific built-in functions. */ 00330 void (* init_builtins) (void); 00331 00332 /* Expand a target-specific builtin. */ 00333 rtx (* expand_builtin) (tree exp, rtx target, rtx subtarget, 00334 enum machine_mode mode, int ignore); 00335 00336 /* Fold a target-specific builtin. */ 00337 tree (* fold_builtin) (tree exp, bool ignore); 00338 00339 /* For a vendor-specific fundamental TYPE, return a pointer to 00340 a statically-allocated string containing the C++ mangling for 00341 TYPE. In all other cases, return NULL. */ 00342 const char * (* mangle_fundamental_type) (tree type); 00343 00344 /* Make any adjustments to libfunc names needed for this target. */ 00345 void (* init_libfuncs) (void); 00346 00347 /* Given a decl, a section name, and whether the decl initializer 00348 has relocs, choose attributes for the section. */ 00349 /* ??? Should be merged with SELECT_SECTION and UNIQUE_SECTION. */ 00350 unsigned int (* section_type_flags) (tree, const char *, int); 00351 00352 /* True if new jumps cannot be created, to replace existing ones or 00353 not, at the current point in the compilation. */ 00354 bool (* cannot_modify_jumps_p) (void); 00355 00356 /* Return a register class for which branch target register 00357 optimizations should be applied. */ 00358 int (* branch_target_register_class) (void); 00359 00360 /* Return true if branch target register optimizations should include 00361 callee-saved registers that are not already live during the current 00362 function. AFTER_PE_GEN is true if prologues and epilogues have 00363 already been generated. */ 00364 bool (* branch_target_register_callee_saved) (bool after_pe_gen); 00365 00366 /* True if the constant X cannot be placed in the constant pool. */ 00367 bool (* cannot_force_const_mem) (rtx); 00368 00369 /* True if the insn X cannot be duplicated. */ 00370 bool (* cannot_copy_insn_p) (rtx); 00371 00372 /* Given an address RTX, undo the effects of LEGITIMIZE_ADDRESS. */ 00373 rtx (* delegitimize_address) (rtx); 00374 00375 /* True if it is OK to do sibling call optimization for the specified 00376 call expression EXP. DECL will be the called function, or NULL if 00377 this is an indirect call. */ 00378 bool (*function_ok_for_sibcall) (tree decl, tree exp); 00379 00380 /* True if EXP should be placed in a "small data" section. */ 00381 bool (* in_small_data_p) (tree); 00382 00383 /* True if EXP names an object for which name resolution must resolve 00384 to the current module. */ 00385 bool (* binds_local_p) (tree); 00386 00387 /* Do something target-specific to record properties of the DECL into 00388 the associated SYMBOL_REF. */ 00389 void (* encode_section_info) (tree, rtx, int); 00390 00391 /* Undo the effects of encode_section_info on the symbol string. */ 00392 const char * (* strip_name_encoding) (const char *); 00393 00394 /* If shift optabs for MODE are known to always truncate the shift count, 00395 return the mask that they apply. Return 0 otherwise. */ 00396 unsigned HOST_WIDE_INT (* shift_truncation_mask) (enum machine_mode mode); 00397 00398 /* True if MODE is valid for a pointer in __attribute__((mode("MODE"))). */ 00399 bool (* valid_pointer_mode) (enum machine_mode mode); 00400 00401 /* True if MODE is valid for the target. By "valid", we mean able to 00402 be manipulated in non-trivial ways. In particular, this means all 00403 the arithmetic is supported. */ 00404 bool (* scalar_mode_supported_p) (enum machine_mode mode); 00405 00406 /* Similarly for vector modes. "Supported" here is less strict. At 00407 least some operations are supported; need to check optabs or builtins 00408 for further details. */ 00409 bool (* vector_mode_supported_p) (enum machine_mode mode); 00410 00411 /* True if a vector is opaque. */ 00412 bool (* vector_opaque_p) (tree); 00413 00414 /* Compute a (partial) cost for rtx X. Return true if the complete 00415 cost has been computed, and false if subexpressions should be 00416 scanned. In either case, *TOTAL contains the cost result. */ 00417 /* Note that CODE and OUTER_CODE ought to be RTX_CODE, but that's 00418 not necessarily defined at this point. */ 00419 bool (* rtx_costs) (rtx x, int code, int outer_code, int *total); 00420 00421 /* Compute the cost of X, used as an address. Never called with 00422 invalid addresses. */ 00423 int (* address_cost) (rtx x); 00424 00425 /* Given a register, this hook should return a parallel of registers 00426 to represent where to find the register pieces. Define this hook 00427 if the register and its mode are represented in Dwarf in 00428 non-contiguous locations, or if the register should be 00429 represented in more than one register in Dwarf. Otherwise, this 00430 hook should return NULL_RTX. */ 00431 rtx (* dwarf_register_span) (rtx); 00432 00433 /* Fetch the fixed register(s) which hold condition codes, for 00434 targets where it makes sense to look for duplicate assignments to 00435 the condition codes. This should return true if there is such a 00436 register, false otherwise. The arguments should be set to the 00437 fixed register numbers. Up to two condition code registers are 00438 supported. If there is only one for this target, the int pointed 00439 at by the second argument should be set to -1. */ 00440 bool (* fixed_condition_code_regs) (unsigned int *, unsigned int *); 00441 00442 /* If two condition code modes are compatible, return a condition 00443 code mode which is compatible with both, such that a comparison 00444 done in the returned mode will work for both of the original 00445 modes. If the condition code modes are not compatible, return 00446 VOIDmode. */ 00447 enum machine_mode (* cc_modes_compatible) (enum machine_mode, 00448 enum machine_mode); 00449 00450 /* Do machine-dependent code transformations. Called just before 00451 delayed-branch scheduling. */ 00452 void (* machine_dependent_reorg) (void); 00453 00454 /* Create the __builtin_va_list type. */ 00455 tree (* build_builtin_va_list) (void); 00456 00457 /* Gimplifies a VA_ARG_EXPR. */ 00458 tree (* gimplify_va_arg_expr) (tree valist, tree type, tree *pre_p, 00459 tree *post_p); 00460 00461 /* Validity-checking routines for PCH files, target-specific. 00462 get_pch_validity returns a pointer to the data to be stored, 00463 and stores the size in its argument. pch_valid_p gets the same 00464 information back and returns NULL if the PCH is valid, 00465 or an error message if not. 00466 */ 00467 void * (* get_pch_validity) (size_t *); 00468 const char * (* pch_valid_p) (const void *, size_t); 00469 00470 /* True if the compiler should give an enum type only as many 00471 bytes as it takes to represent the range of possible values of 00472 that type. */ 00473 bool (* default_short_enums) (void); 00474 00475 /* This target hook returns an rtx that is used to store the address 00476 of the current frame into the built-in setjmp buffer. */ 00477 rtx (* builtin_setjmp_frame_value) (void); 00478 00479 /* This target hook should add STRING_CST trees for any hard regs 00480 the port wishes to automatically clobber for all asms. */ 00481 tree (* md_asm_clobbers) (tree); 00482 00483 /* This target hook allows the backend to specify a calling convention 00484 in the debug information. This function actually returns an 00485 enum dwarf_calling_convention, but because of forward declarations 00486 and not wanting to include dwarf2.h everywhere target.h is included 00487 the function is being declared as an int. */ 00488 int (* dwarf_calling_convention) (tree); 00489 00490 /* This target hook allows the backend to emit frame-related insns that 00491 contain UNSPECs or UNSPEC_VOLATILEs. The call frame debugging info 00492 engine will invoke it on insns of the form 00493 (set (reg) (unspec [...] UNSPEC_INDEX)) 00494 and 00495 (set (reg) (unspec_volatile [...] UNSPECV_INDEX)) 00496 to let the backend emit the call frame instructions. */ 00497 void (* dwarf_handle_frame_unspec) (const char *, rtx, int); 00498 00499 /* Functions relating to calls - argument passing, returns, etc. */ 00500 struct calls { 00501 bool (*promote_function_args) (tree fntype); 00502 bool (*promote_function_return) (tree fntype); 00503 bool (*promote_prototypes) (tree fntype); 00504 rtx (*struct_value_rtx) (tree fndecl, int incoming); 00505 bool (*return_in_memory) (tree type, tree fndecl); 00506 bool (*return_in_msb) (tree type); 00507 00508 /* Return true if a parameter must be passed by reference. TYPE may 00509 be null if this is a libcall. CA may be null if this query is 00510 from __builtin_va_arg. */ 00511 bool (*pass_by_reference) (CUMULATIVE_ARGS *ca, enum machine_mode mode, 00512 tree type, bool named_arg); 00513 00514 rtx (*expand_builtin_saveregs) (void); 00515 /* Returns pretend_argument_size. */ 00516 void (*setup_incoming_varargs) (CUMULATIVE_ARGS *ca, enum machine_mode mode, 00517 tree type, int *pretend_arg_size, 00518 int second_time); 00519 bool (*strict_argument_naming) (CUMULATIVE_ARGS *ca); 00520 /* Returns true if we should use 00521 targetm.calls.setup_incoming_varargs() and/or 00522 targetm.calls.strict_argument_naming(). */ 00523 bool (*pretend_outgoing_varargs_named) (CUMULATIVE_ARGS *ca); 00524 00525 /* Given a complex type T, return true if a parameter of type T 00526 should be passed as two scalars. */ 00527 bool (* split_complex_arg) (tree type); 00528 00529 /* Return true if type T, mode MODE, may not be passed in registers, 00530 but must be passed on the stack. */ 00531 /* ??? This predicate should be applied strictly after pass-by-reference. 00532 Need audit to verify that this is the case. */ 00533 bool (* must_pass_in_stack) (enum machine_mode mode, tree t); 00534 00535 /* Return true if type TYPE, mode MODE, which is passed by reference, 00536 should have the object copy generated by the callee rather than 00537 the caller. It is never called for TYPE requiring constructors. */ 00538 bool (* callee_copies) (CUMULATIVE_ARGS *ca, enum machine_mode mode, 00539 tree type, bool named); 00540 00541 /* Return zero for arguments passed entirely on the stack or entirely 00542 in registers. If passed in both, return the number of bytes passed 00543 in registers; the balance is therefore passed on the stack. */ 00544 int (* arg_partial_bytes) (CUMULATIVE_ARGS *ca, enum machine_mode mode, 00545 tree type, bool named); 00546 } calls; 00547 00548 /* Functions specific to the C++ frontend. */ 00549 struct cxx { 00550 /* Return the integer type used for guard variables. */ 00551 tree (*guard_type) (void); 00552 /* Return true if only the low bit of the guard should be tested. */ 00553 bool (*guard_mask_bit) (void); 00554 /* Returns the size of the array cookie for an array of type. */ 00555 tree (*get_cookie_size) (tree); 00556 /* Returns true if the element size should be stored in the 00557 array cookie. */ 00558 bool (*cookie_has_size) (void); 00559 /* Allows backends to perform additional processing when 00560 deciding if a class should be exported or imported. */ 00561 int (*import_export_class) (tree, int); 00562 /* Returns true if constructors and destructors return "this". */ 00563 bool (*cdtor_returns_this) (void); 00564 /* Returns true if the key method for a class can be an inline 00565 function, so long as it is not declared inline in the class 00566 itself. Returning true is the behavior required by the Itanium 00567 C++ ABI. */ 00568 bool (*key_method_may_be_inline) (void); 00569 /* Returns true if all class data (virtual tables, type info, 00570 etc.) should be exported from the current DLL, even when the 00571 associated class is not exported. */ 00572 bool (*export_class_data) (void); 00573 } cxx; 00574 00575 /* Leave the boolean fields at the end. */ 00576 00577 /* True if arbitrary sections are supported. */ 00578 bool have_named_sections; 00579 00580 /* True if "native" constructors and destructors are supported, 00581 false if we're using collect2 for the job. */ 00582 bool have_ctors_dtors; 00583 00584 /* True if thread-local storage is supported. */ 00585 bool have_tls; 00586 00587 /* True if a small readonly data section is supported. */ 00588 bool have_srodata_section; 00589 00590 /* True if EH frame info sections should be zero-terminated. */ 00591 bool terminate_dw2_eh_frame_info; 00592 00593 /* True if #NO_APP should be emitted at the beginning of 00594 assembly output. */ 00595 bool file_start_app_off; 00596 00597 /* True if output_file_directive should be called for main_input_filename 00598 at the beginning of assembly output. */ 00599 bool file_start_file_directive; 00600 00601 /* True if #pragma redefine_extname is to be supported. */ 00602 bool handle_pragma_redefine_extname; 00603 00604 /* True if #pragma extern_prefix is to be supported. */ 00605 bool handle_pragma_extern_prefix; 00606 00607 /* True if the target is allowed to reorder memory accesses unless 00608 synchronization is explicitly requested. */ 00609 bool relaxed_ordering; 00610 00611 /* Leave the boolean fields at the end. */ 00612 }; 00613 00614 extern struct gcc_target targetm; 00615 00616 #endif /* GCC_TARGET_H */
1.5.6