* config/i386/uwin.h: Remove SUBTARGET_PROLOGUE.
[official-gcc.git] / gcc / target-def.h
blob65d25c3e3a952094332943e48048c313c5e1af54
1 /* Default initializers for a generic GCC target.
2 Copyright (C) 2001, 2002, 2003 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
7 later version.
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
23 use it.
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) || defined (OBJECT_FORMAT_ROSE)
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
48 #else
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 || OBJECT_FORMAT_ROSE */
55 #define TARGET_ASM_INTEGER default_assemble_integer
57 #ifndef TARGET_ASM_GLOBALIZE_LABEL
58 #define TARGET_ASM_GLOBALIZE_LABEL default_globalize_label
59 #endif
60 #ifndef TARGET_ASM_INTERNAL_LABEL
61 #define TARGET_ASM_INTERNAL_LABEL default_internal_label
62 #endif
64 #ifndef TARGET_ASM_ASSEMBLE_VISIBILITY
65 #define TARGET_ASM_ASSEMBLE_VISIBILITY default_assemble_visibility
66 #endif
68 #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
69 #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
70 #define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
71 #define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
73 #ifndef TARGET_ASM_SELECT_SECTION
74 #define TARGET_ASM_SELECT_SECTION default_select_section
75 #endif
77 #ifndef TARGET_ASM_UNIQUE_SECTION
78 #define TARGET_ASM_UNIQUE_SECTION default_unique_section
79 #endif
81 #ifndef TARGET_ASM_SELECT_RTX_SECTION
82 #define TARGET_ASM_SELECT_RTX_SECTION default_select_rtx_section
83 #endif
85 #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
86 # ifdef CTORS_SECTION_ASM_OP
87 # define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
88 # else
89 # ifdef TARGET_ASM_NAMED_SECTION
90 # define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
91 # else
92 # define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
93 # endif
94 # endif
95 #endif
97 #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
98 # ifdef DTORS_SECTION_ASM_OP
99 # define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
100 # else
101 # ifdef TARGET_ASM_NAMED_SECTION
102 # define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
103 # else
104 # define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
105 # endif
106 # endif
107 #endif
109 #define TARGET_ASM_OUTPUT_MI_THUNK NULL
110 #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_false
112 #if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
113 #define TARGET_HAVE_CTORS_DTORS true
114 #else
115 #define TARGET_HAVE_CTORS_DTORS false
116 #define TARGET_ASM_CONSTRUCTOR NULL
117 #define TARGET_ASM_DESTRUCTOR NULL
118 #endif
120 #ifdef TARGET_ASM_NAMED_SECTION
121 #define TARGET_HAVE_NAMED_SECTIONS true
122 #else
123 #define TARGET_ASM_NAMED_SECTION default_no_named_section
124 #define TARGET_HAVE_NAMED_SECTIONS false
125 #endif
127 #ifndef TARGET_HAVE_TLS
128 #define TARGET_HAVE_TLS false
129 #endif
131 #ifndef TARGET_HAVE_SRODATA_SECTION
132 #define TARGET_HAVE_SRODATA_SECTION false
133 #endif
135 #ifndef TARGET_TERMINATE_DW2_EH_FRAME_INFO
136 #ifdef EH_FRAME_SECTION_NAME
137 #define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
138 #else
139 #define TARGET_TERMINATE_DW2_EH_FRAME_INFO true
140 #endif
141 #endif
143 #define TARGET_DWARF_REGISTER_SPAN hook_rtx_rtx_null
145 #ifndef TARGET_ASM_EXCEPTION_SECTION
146 #define TARGET_ASM_EXCEPTION_SECTION default_exception_section
147 #endif
149 #ifndef TARGET_ASM_EH_FRAME_SECTION
150 #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section
151 #endif
153 #define TARGET_ASM_ALIGNED_INT_OP \
154 {TARGET_ASM_ALIGNED_HI_OP, \
155 TARGET_ASM_ALIGNED_SI_OP, \
156 TARGET_ASM_ALIGNED_DI_OP, \
157 TARGET_ASM_ALIGNED_TI_OP}
159 #define TARGET_ASM_UNALIGNED_INT_OP \
160 {TARGET_ASM_UNALIGNED_HI_OP, \
161 TARGET_ASM_UNALIGNED_SI_OP, \
162 TARGET_ASM_UNALIGNED_DI_OP, \
163 TARGET_ASM_UNALIGNED_TI_OP}
165 #define TARGET_ASM_OUT {TARGET_ASM_OPEN_PAREN, \
166 TARGET_ASM_CLOSE_PAREN, \
167 TARGET_ASM_BYTE_OP, \
168 TARGET_ASM_ALIGNED_INT_OP, \
169 TARGET_ASM_UNALIGNED_INT_OP, \
170 TARGET_ASM_INTEGER, \
171 TARGET_ASM_GLOBALIZE_LABEL, \
172 TARGET_ASM_INTERNAL_LABEL, \
173 TARGET_ASM_ASSEMBLE_VISIBILITY, \
174 TARGET_ASM_FUNCTION_PROLOGUE, \
175 TARGET_ASM_FUNCTION_END_PROLOGUE, \
176 TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, \
177 TARGET_ASM_FUNCTION_EPILOGUE, \
178 TARGET_ASM_NAMED_SECTION, \
179 TARGET_ASM_EXCEPTION_SECTION, \
180 TARGET_ASM_EH_FRAME_SECTION, \
181 TARGET_ASM_SELECT_SECTION, \
182 TARGET_ASM_SELECT_RTX_SECTION, \
183 TARGET_ASM_UNIQUE_SECTION, \
184 TARGET_ASM_CONSTRUCTOR, \
185 TARGET_ASM_DESTRUCTOR, \
186 TARGET_ASM_OUTPUT_MI_THUNK, \
187 TARGET_ASM_CAN_OUTPUT_MI_THUNK }
189 /* Scheduler hooks. All of these default to null pointers, which
190 haifa-sched.c looks for and handles. */
191 #define TARGET_SCHED_ADJUST_COST 0
192 #define TARGET_SCHED_ADJUST_PRIORITY 0
193 #define TARGET_SCHED_ISSUE_RATE 0
194 #define TARGET_SCHED_VARIABLE_ISSUE 0
195 #define TARGET_SCHED_INIT 0
196 #define TARGET_SCHED_FINISH 0
197 #define TARGET_SCHED_REORDER 0
198 #define TARGET_SCHED_REORDER2 0
199 #define TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK 0
200 #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE 0
201 #define TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN 0
202 #define TARGET_SCHED_DFA_PRE_CYCLE_INSN 0
203 #define TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN 0
204 #define TARGET_SCHED_DFA_POST_CYCLE_INSN 0
205 #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD 0
206 #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD 0
207 #define TARGET_SCHED_DFA_NEW_CYCLE 0
208 #define TARGET_SCHED_INIT_DFA_BUBBLES 0
209 #define TARGET_SCHED_DFA_BUBBLE 0
211 #define TARGET_SCHED \
212 {TARGET_SCHED_ADJUST_COST, \
213 TARGET_SCHED_ADJUST_PRIORITY, \
214 TARGET_SCHED_ISSUE_RATE, \
215 TARGET_SCHED_VARIABLE_ISSUE, \
216 TARGET_SCHED_INIT, \
217 TARGET_SCHED_FINISH, \
218 TARGET_SCHED_REORDER, \
219 TARGET_SCHED_REORDER2, \
220 TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK, \
221 TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, \
222 TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN, \
223 TARGET_SCHED_DFA_PRE_CYCLE_INSN, \
224 TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN, \
225 TARGET_SCHED_DFA_POST_CYCLE_INSN, \
226 TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, \
227 TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD, \
228 TARGET_SCHED_DFA_NEW_CYCLE, \
229 TARGET_SCHED_INIT_DFA_BUBBLES, \
230 TARGET_SCHED_DFA_BUBBLE}
232 /* In tree.c. */
233 #define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes
234 #define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes
235 #define TARGET_ATTRIBUTE_TABLE NULL
237 /* In cse.c. */
238 #define TARGET_ADDRESS_COST default_address_cost
240 /* In builtins.c. */
241 #define TARGET_INIT_BUILTINS default_init_builtins
242 #define TARGET_EXPAND_BUILTIN default_expand_builtin
244 /* In varasm.c. */
245 #ifndef TARGET_SECTION_TYPE_FLAGS
246 #define TARGET_SECTION_TYPE_FLAGS default_section_type_flags
247 #endif
249 #ifndef TARGET_STRIP_NAME_ENCODING
250 #define TARGET_STRIP_NAME_ENCODING default_strip_name_encoding
251 #endif
253 #ifndef TARGET_BINDS_LOCAL_P
254 #define TARGET_BINDS_LOCAL_P default_binds_local_p
255 #endif
257 #ifndef TARGET_VALID_POINTER_MODE
258 #define TARGET_VALID_POINTER_MODE default_valid_pointer_mode
259 #endif
261 #ifndef TARGET_VECTOR_OPAQUE_P
262 #define TARGET_VECTOR_OPAQUE_P hook_bool_tree_false
263 #endif
265 /* In hook.c. */
266 #define TARGET_CANNOT_MODIFY_JUMPS_P hook_bool_void_false
267 #define TARGET_CANNOT_FORCE_CONST_MEM hook_bool_rtx_false
268 #define TARGET_CANNOT_COPY_INSN_P NULL
269 #define TARGET_DELEGITIMIZE_ADDRESS hook_rtx_rtx_identity
270 #define TARGET_FUNCTION_OK_FOR_SIBCALL hook_bool_tree_tree_false
271 #define TARGET_COMP_TYPE_ATTRIBUTES hook_int_tree_tree_1
272 #define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES hook_void_tree
273 #define TARGET_INSERT_ATTRIBUTES hook_void_tree_treeptr
274 #define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P hook_bool_tree_false
275 #define TARGET_MS_BITFIELD_LAYOUT_P hook_bool_tree_false
276 #define TARGET_RTX_COSTS hook_bool_rtx_int_int_intp_false
278 #ifndef TARGET_IN_SMALL_DATA_P
279 #define TARGET_IN_SMALL_DATA_P hook_bool_tree_false
280 #endif
282 #ifndef TARGET_ENCODE_SECTION_INFO
283 #define TARGET_ENCODE_SECTION_INFO default_encode_section_info
284 #endif
286 #define TARGET_MACHINE_DEPENDENT_REORG 0
288 /* The whole shebang. */
289 #define TARGET_INITIALIZER \
291 TARGET_ASM_OUT, \
292 TARGET_SCHED, \
293 TARGET_MERGE_DECL_ATTRIBUTES, \
294 TARGET_MERGE_TYPE_ATTRIBUTES, \
295 TARGET_ATTRIBUTE_TABLE, \
296 TARGET_COMP_TYPE_ATTRIBUTES, \
297 TARGET_SET_DEFAULT_TYPE_ATTRIBUTES, \
298 TARGET_INSERT_ATTRIBUTES, \
299 TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, \
300 TARGET_MS_BITFIELD_LAYOUT_P, \
301 TARGET_INIT_BUILTINS, \
302 TARGET_EXPAND_BUILTIN, \
303 TARGET_SECTION_TYPE_FLAGS, \
304 TARGET_CANNOT_MODIFY_JUMPS_P, \
305 TARGET_CANNOT_FORCE_CONST_MEM, \
306 TARGET_CANNOT_COPY_INSN_P, \
307 TARGET_DELEGITIMIZE_ADDRESS, \
308 TARGET_FUNCTION_OK_FOR_SIBCALL, \
309 TARGET_IN_SMALL_DATA_P, \
310 TARGET_BINDS_LOCAL_P, \
311 TARGET_ENCODE_SECTION_INFO, \
312 TARGET_STRIP_NAME_ENCODING, \
313 TARGET_VALID_POINTER_MODE, \
314 TARGET_VECTOR_OPAQUE_P, \
315 TARGET_RTX_COSTS, \
316 TARGET_ADDRESS_COST, \
317 TARGET_DWARF_REGISTER_SPAN, \
318 TARGET_MACHINE_DEPENDENT_REORG, \
319 TARGET_HAVE_NAMED_SECTIONS, \
320 TARGET_HAVE_CTORS_DTORS, \
321 TARGET_HAVE_TLS, \
322 TARGET_HAVE_SRODATA_SECTION, \
323 TARGET_TERMINATE_DW2_EH_FRAME_INFO \
326 #include "hooks.h"