1 /* Default initializers for a generic GCC target.
2 Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 2, or (at your option) any
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 In other words, you are welcome to use, share and improve this program.
19 You are forbidden to forbid anyone else to use, share and improve
20 what you give them. Help stamp out software-hoarding! */
22 /* See target.h for a description of what this file contains and how to
25 We want to have non-NULL default definitions of all hook functions,
26 even if they do nothing. */
28 /* Note that if one of these macros must be defined in an OS .h file
29 rather than the .c file, then we need to wrap the default
30 definition in a #ifndef, since files include tm.h before this one. */
32 /* Assembler output. */
33 #define TARGET_ASM_OPEN_PAREN "("
34 #define TARGET_ASM_CLOSE_PAREN ")"
35 #define TARGET_ASM_BYTE_OP "\t.byte\t"
37 #define TARGET_ASM_ALIGNED_HI_OP "\t.short\t"
38 #define TARGET_ASM_ALIGNED_SI_OP "\t.long\t"
39 #define TARGET_ASM_ALIGNED_DI_OP NULL
40 #define TARGET_ASM_ALIGNED_TI_OP NULL
42 /* GAS and SYSV4 assemblers accept these. */
43 #if defined (OBJECT_FORMAT_ELF)
44 #define TARGET_ASM_UNALIGNED_HI_OP "\t.2byte\t"
45 #define TARGET_ASM_UNALIGNED_SI_OP "\t.4byte\t"
46 #define TARGET_ASM_UNALIGNED_DI_OP "\t.8byte\t"
47 #define TARGET_ASM_UNALIGNED_TI_OP NULL
49 #define TARGET_ASM_UNALIGNED_HI_OP NULL
50 #define TARGET_ASM_UNALIGNED_SI_OP NULL
51 #define TARGET_ASM_UNALIGNED_DI_OP NULL
52 #define TARGET_ASM_UNALIGNED_TI_OP NULL
53 #endif /* OBJECT_FORMAT_ELF */
55 #define TARGET_ASM_INTEGER default_assemble_integer
57 #ifndef TARGET_ASM_GLOBALIZE_LABEL
58 #define TARGET_ASM_GLOBALIZE_LABEL default_globalize_label
61 #ifndef TARGET_ASM_EMIT_UNWIND_LABEL
62 #define TARGET_ASM_EMIT_UNWIND_LABEL default_emit_unwind_label
65 #ifndef TARGET_ASM_INTERNAL_LABEL
66 #define TARGET_ASM_INTERNAL_LABEL default_internal_label
69 #ifndef TARGET_ASM_ASSEMBLE_VISIBILITY
70 #define TARGET_ASM_ASSEMBLE_VISIBILITY default_assemble_visibility
73 #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
74 #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
75 #define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
76 #define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
78 #ifndef TARGET_ASM_SELECT_SECTION
79 #define TARGET_ASM_SELECT_SECTION default_select_section
82 #ifndef TARGET_ASM_UNIQUE_SECTION
83 #define TARGET_ASM_UNIQUE_SECTION default_unique_section
86 #ifndef TARGET_ASM_SELECT_RTX_SECTION
87 #define TARGET_ASM_SELECT_RTX_SECTION default_select_rtx_section
90 #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
91 # ifdef CTORS_SECTION_ASM_OP
92 # define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
94 # ifdef TARGET_ASM_NAMED_SECTION
95 # define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
97 # define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
102 #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
103 # ifdef DTORS_SECTION_ASM_OP
104 # define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
106 # ifdef TARGET_ASM_NAMED_SECTION
107 # define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
109 # define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
114 #define TARGET_ASM_OUTPUT_MI_THUNK NULL
115 #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_false
117 #if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
118 #define TARGET_HAVE_CTORS_DTORS true
120 #define TARGET_HAVE_CTORS_DTORS false
121 #define TARGET_ASM_CONSTRUCTOR NULL
122 #define TARGET_ASM_DESTRUCTOR NULL
125 #ifdef TARGET_ASM_NAMED_SECTION
126 #define TARGET_HAVE_NAMED_SECTIONS true
128 #define TARGET_ASM_NAMED_SECTION default_no_named_section
129 #define TARGET_HAVE_NAMED_SECTIONS false
132 #ifndef TARGET_HAVE_TLS
133 #define TARGET_HAVE_TLS false
136 #ifndef TARGET_HAVE_SRODATA_SECTION
137 #define TARGET_HAVE_SRODATA_SECTION false
140 #ifndef TARGET_TERMINATE_DW2_EH_FRAME_INFO
141 #ifdef EH_FRAME_SECTION_NAME
142 #define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
144 #define TARGET_TERMINATE_DW2_EH_FRAME_INFO true
148 #define TARGET_DWARF_REGISTER_SPAN hook_rtx_rtx_null
150 #ifndef TARGET_ASM_EXCEPTION_SECTION
151 #define TARGET_ASM_EXCEPTION_SECTION default_exception_section
154 #ifndef TARGET_ASM_EH_FRAME_SECTION
155 #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section
158 #ifndef TARGET_ASM_FILE_START
159 #define TARGET_ASM_FILE_START default_file_start
162 #ifndef TARGET_ASM_FILE_END
163 #define TARGET_ASM_FILE_END hook_void_void
166 #ifndef TARGET_ASM_FILE_START_APP_OFF
167 #define TARGET_ASM_FILE_START_APP_OFF false
170 #ifndef TARGET_ASM_FILE_START_FILE_DIRECTIVE
171 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE false
174 #ifndef TARGET_ASM_EXTERNAL_LIBCALL
175 #define TARGET_ASM_EXTERNAL_LIBCALL default_external_libcall
178 #define TARGET_ASM_ALIGNED_INT_OP \
179 {TARGET_ASM_ALIGNED_HI_OP, \
180 TARGET_ASM_ALIGNED_SI_OP, \
181 TARGET_ASM_ALIGNED_DI_OP, \
182 TARGET_ASM_ALIGNED_TI_OP}
184 #define TARGET_ASM_UNALIGNED_INT_OP \
185 {TARGET_ASM_UNALIGNED_HI_OP, \
186 TARGET_ASM_UNALIGNED_SI_OP, \
187 TARGET_ASM_UNALIGNED_DI_OP, \
188 TARGET_ASM_UNALIGNED_TI_OP}
190 #define TARGET_ASM_OUT {TARGET_ASM_OPEN_PAREN, \
191 TARGET_ASM_CLOSE_PAREN, \
192 TARGET_ASM_BYTE_OP, \
193 TARGET_ASM_ALIGNED_INT_OP, \
194 TARGET_ASM_UNALIGNED_INT_OP, \
195 TARGET_ASM_INTEGER, \
196 TARGET_ASM_GLOBALIZE_LABEL, \
197 TARGET_ASM_EMIT_UNWIND_LABEL, \
198 TARGET_ASM_INTERNAL_LABEL, \
199 TARGET_ASM_ASSEMBLE_VISIBILITY, \
200 TARGET_ASM_FUNCTION_PROLOGUE, \
201 TARGET_ASM_FUNCTION_END_PROLOGUE, \
202 TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, \
203 TARGET_ASM_FUNCTION_EPILOGUE, \
204 TARGET_ASM_NAMED_SECTION, \
205 TARGET_ASM_EXCEPTION_SECTION, \
206 TARGET_ASM_EH_FRAME_SECTION, \
207 TARGET_ASM_SELECT_SECTION, \
208 TARGET_ASM_SELECT_RTX_SECTION, \
209 TARGET_ASM_UNIQUE_SECTION, \
210 TARGET_ASM_CONSTRUCTOR, \
211 TARGET_ASM_DESTRUCTOR, \
212 TARGET_ASM_OUTPUT_MI_THUNK, \
213 TARGET_ASM_CAN_OUTPUT_MI_THUNK, \
214 TARGET_ASM_FILE_START, \
215 TARGET_ASM_FILE_END, \
216 TARGET_ASM_EXTERNAL_LIBCALL}
218 /* Scheduler hooks. All of these default to null pointers, which
219 haifa-sched.c looks for and handles. */
220 #define TARGET_SCHED_ADJUST_COST 0
221 #define TARGET_SCHED_ADJUST_PRIORITY 0
222 #define TARGET_SCHED_ISSUE_RATE 0
223 #define TARGET_SCHED_VARIABLE_ISSUE 0
224 #define TARGET_SCHED_INIT 0
225 #define TARGET_SCHED_FINISH 0
226 #define TARGET_SCHED_INIT_GLOBAL 0
227 #define TARGET_SCHED_FINISH_GLOBAL 0
228 #define TARGET_SCHED_REORDER 0
229 #define TARGET_SCHED_REORDER2 0
230 #define TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK 0
231 #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE 0
232 #define TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN 0
233 #define TARGET_SCHED_DFA_PRE_CYCLE_INSN 0
234 #define TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN 0
235 #define TARGET_SCHED_DFA_POST_CYCLE_INSN 0
236 #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD 0
237 #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD 0
238 #define TARGET_SCHED_DFA_NEW_CYCLE 0
239 #define TARGET_SCHED_INIT_DFA_BUBBLES 0
240 #define TARGET_SCHED_DFA_BUBBLE 0
241 #define TARGET_SCHED_IS_COSTLY_DEPENDENCE 0
243 #define TARGET_SCHED \
244 {TARGET_SCHED_ADJUST_COST, \
245 TARGET_SCHED_ADJUST_PRIORITY, \
246 TARGET_SCHED_ISSUE_RATE, \
247 TARGET_SCHED_VARIABLE_ISSUE, \
249 TARGET_SCHED_FINISH, \
250 TARGET_SCHED_INIT_GLOBAL, \
251 TARGET_SCHED_FINISH_GLOBAL, \
252 TARGET_SCHED_REORDER, \
253 TARGET_SCHED_REORDER2, \
254 TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK, \
255 TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, \
256 TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN, \
257 TARGET_SCHED_DFA_PRE_CYCLE_INSN, \
258 TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN, \
259 TARGET_SCHED_DFA_POST_CYCLE_INSN, \
260 TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, \
261 TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD, \
262 TARGET_SCHED_DFA_NEW_CYCLE, \
263 TARGET_SCHED_INIT_DFA_BUBBLES, \
264 TARGET_SCHED_DFA_BUBBLE, \
265 TARGET_SCHED_IS_COSTLY_DEPENDENCE}
268 #define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes
269 #define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes
270 #define TARGET_ATTRIBUTE_TABLE NULL
273 #define TARGET_ADDRESS_COST default_address_cost
276 #define TARGET_INIT_BUILTINS hook_void_void
277 #define TARGET_EXPAND_BUILTIN default_expand_builtin
280 #ifndef TARGET_SECTION_TYPE_FLAGS
281 #define TARGET_SECTION_TYPE_FLAGS default_section_type_flags
284 #ifndef TARGET_STRIP_NAME_ENCODING
285 #define TARGET_STRIP_NAME_ENCODING default_strip_name_encoding
288 #ifndef TARGET_BINDS_LOCAL_P
289 #define TARGET_BINDS_LOCAL_P default_binds_local_p
292 #ifndef TARGET_VALID_POINTER_MODE
293 #define TARGET_VALID_POINTER_MODE default_valid_pointer_mode
296 #ifndef TARGET_VECTOR_OPAQUE_P
297 #define TARGET_VECTOR_OPAQUE_P hook_bool_tree_false
301 #define TARGET_CANNOT_MODIFY_JUMPS_P hook_bool_void_false
302 #define TARGET_BRANCH_TARGET_REGISTER_CLASS hook_int_void_no_regs
303 #define TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED hook_bool_bool_false
304 #define TARGET_CANNOT_FORCE_CONST_MEM hook_bool_rtx_false
305 #define TARGET_CANNOT_COPY_INSN_P NULL
306 #define TARGET_DELEGITIMIZE_ADDRESS hook_rtx_rtx_identity
307 #define TARGET_FUNCTION_OK_FOR_SIBCALL hook_bool_tree_tree_false
308 #define TARGET_COMP_TYPE_ATTRIBUTES hook_int_tree_tree_1
309 #define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES hook_void_tree
310 #define TARGET_INSERT_ATTRIBUTES hook_void_tree_treeptr
311 #define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P hook_bool_tree_false
312 #define TARGET_MS_BITFIELD_LAYOUT_P hook_bool_tree_false
313 #define TARGET_RTX_COSTS hook_bool_rtx_int_int_intp_false
314 #define TARGET_MANGLE_FUNDAMENTAL_TYPE hook_constcharptr_tree_null
316 #ifndef TARGET_INIT_LIBFUNCS
317 #define TARGET_INIT_LIBFUNCS hook_void_void
320 #ifndef TARGET_IN_SMALL_DATA_P
321 #define TARGET_IN_SMALL_DATA_P hook_bool_tree_false
324 #ifndef TARGET_ENCODE_SECTION_INFO
325 #define TARGET_ENCODE_SECTION_INFO default_encode_section_info
328 #define TARGET_FIXED_CONDITION_CODE_REGS hook_bool_uintp_uintp_false
330 #define TARGET_CC_MODES_COMPATIBLE default_cc_modes_compatible
332 #define TARGET_MACHINE_DEPENDENT_REORG 0
334 #define TARGET_BUILD_BUILTIN_VA_LIST std_build_builtin_va_list
336 #define TARGET_GET_PCH_VALIDITY default_get_pch_validity
337 #define TARGET_PCH_VALID_P default_pch_valid_p
339 #define TARGET_DEFAULT_SHORT_ENUMS hook_bool_void_false
341 #define TARGET_BUILTIN_SETJMP_FRAME_VALUE default_builtin_setjmp_frame_value
343 #define TARGET_MD_ASM_CLOBBERS hook_tree_tree_identity
345 #define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_false
346 #define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_false
347 #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false
349 #define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null
350 #define TARGET_RETURN_IN_MEMORY default_return_in_memory
351 #define TARGET_RETURN_IN_MSB hook_bool_tree_false
353 #define TARGET_EXPAND_BUILTIN_SAVEREGS default_expand_builtin_saveregs
354 #define TARGET_SETUP_INCOMING_VARARGS default_setup_incoming_varargs
355 #define TARGET_STRICT_ARGUMENT_NAMING hook_bool_CUMULATIVE_ARGS_false
356 #define TARGET_PRETEND_OUTGOING_VARARGS_NAMED \
357 default_pretend_outgoing_varargs_named
358 #define TARGET_SPLIT_COMPLEX_ARG NULL
360 #define TARGET_CALLS { \
361 TARGET_PROMOTE_FUNCTION_ARGS, \
362 TARGET_PROMOTE_FUNCTION_RETURN, \
363 TARGET_PROMOTE_PROTOTYPES, \
364 TARGET_STRUCT_VALUE_RTX, \
365 TARGET_RETURN_IN_MEMORY, \
366 TARGET_RETURN_IN_MSB, \
367 TARGET_EXPAND_BUILTIN_SAVEREGS, \
368 TARGET_SETUP_INCOMING_VARARGS, \
369 TARGET_STRICT_ARGUMENT_NAMING, \
370 TARGET_PRETEND_OUTGOING_VARARGS_NAMED, \
371 TARGET_SPLIT_COMPLEX_ARG, \
374 /* The whole shebang. */
375 #define TARGET_INITIALIZER \
379 TARGET_MERGE_DECL_ATTRIBUTES, \
380 TARGET_MERGE_TYPE_ATTRIBUTES, \
381 TARGET_ATTRIBUTE_TABLE, \
382 TARGET_COMP_TYPE_ATTRIBUTES, \
383 TARGET_SET_DEFAULT_TYPE_ATTRIBUTES, \
384 TARGET_INSERT_ATTRIBUTES, \
385 TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, \
386 TARGET_MS_BITFIELD_LAYOUT_P, \
387 TARGET_INIT_BUILTINS, \
388 TARGET_EXPAND_BUILTIN, \
389 TARGET_MANGLE_FUNDAMENTAL_TYPE, \
390 TARGET_INIT_LIBFUNCS, \
391 TARGET_SECTION_TYPE_FLAGS, \
392 TARGET_CANNOT_MODIFY_JUMPS_P, \
393 TARGET_BRANCH_TARGET_REGISTER_CLASS, \
394 TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED, \
395 TARGET_CANNOT_FORCE_CONST_MEM, \
396 TARGET_CANNOT_COPY_INSN_P, \
397 TARGET_DELEGITIMIZE_ADDRESS, \
398 TARGET_FUNCTION_OK_FOR_SIBCALL, \
399 TARGET_IN_SMALL_DATA_P, \
400 TARGET_BINDS_LOCAL_P, \
401 TARGET_ENCODE_SECTION_INFO, \
402 TARGET_STRIP_NAME_ENCODING, \
403 TARGET_VALID_POINTER_MODE, \
404 TARGET_VECTOR_OPAQUE_P, \
406 TARGET_ADDRESS_COST, \
407 TARGET_DWARF_REGISTER_SPAN, \
408 TARGET_FIXED_CONDITION_CODE_REGS, \
409 TARGET_CC_MODES_COMPATIBLE, \
410 TARGET_MACHINE_DEPENDENT_REORG, \
411 TARGET_BUILD_BUILTIN_VA_LIST, \
412 TARGET_GET_PCH_VALIDITY, \
413 TARGET_PCH_VALID_P, \
414 TARGET_DEFAULT_SHORT_ENUMS, \
415 TARGET_BUILTIN_SETJMP_FRAME_VALUE, \
416 TARGET_MD_ASM_CLOBBERS, \
418 TARGET_HAVE_NAMED_SECTIONS, \
419 TARGET_HAVE_CTORS_DTORS, \
421 TARGET_HAVE_SRODATA_SECTION, \
422 TARGET_TERMINATE_DW2_EH_FRAME_INFO, \
423 TARGET_ASM_FILE_START_APP_OFF, \
424 TARGET_ASM_FILE_START_FILE_DIRECTIVE, \
428 #include "targhooks.h"