stl_bvector.h (swap(_Bit_reference,_Bit_reference)): Move/rename...
[official-gcc.git] / gcc / target-def.h
blob63fbead9875658f5fce3edd5fe4ef0aa0a01a803
1 /* Default initializers for a generic GCC target.
2 Copyright (C) 2001, 2002 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 #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
58 #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
59 #define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
60 #define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
62 #ifndef TARGET_ASM_SELECT_SECTION
63 #define TARGET_ASM_SELECT_SECTION default_select_section
64 #endif
66 #ifndef TARGET_ASM_UNIQUE_SECTION
67 #define TARGET_ASM_UNIQUE_SECTION default_unique_section
68 #endif
70 #ifndef TARGET_ASM_SELECT_RTX_SECTION
71 #define TARGET_ASM_SELECT_RTX_SECTION default_select_rtx_section
72 #endif
74 #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
75 # ifdef CTORS_SECTION_ASM_OP
76 # define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
77 # else
78 # ifdef TARGET_ASM_NAMED_SECTION
79 # define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
80 # else
81 # define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
82 # endif
83 # endif
84 #endif
86 #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
87 # ifdef DTORS_SECTION_ASM_OP
88 # define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
89 # else
90 # ifdef TARGET_ASM_NAMED_SECTION
91 # define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
92 # else
93 # define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
94 # endif
95 # endif
96 #endif
98 #if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
99 #define TARGET_HAVE_CTORS_DTORS true
100 #else
101 #define TARGET_HAVE_CTORS_DTORS false
102 #define TARGET_ASM_CONSTRUCTOR NULL
103 #define TARGET_ASM_DESTRUCTOR NULL
104 #endif
106 #ifdef TARGET_ASM_NAMED_SECTION
107 #define TARGET_HAVE_NAMED_SECTIONS true
108 #else
109 #define TARGET_ASM_NAMED_SECTION default_no_named_section
110 #define TARGET_HAVE_NAMED_SECTIONS false
111 #endif
113 #ifndef TARGET_HAVE_TLS
114 #define TARGET_HAVE_TLS false
115 #endif
117 #ifndef TARGET_ASM_EXCEPTION_SECTION
118 #define TARGET_ASM_EXCEPTION_SECTION default_exception_section
119 #endif
121 #ifndef TARGET_ASM_EH_FRAME_SECTION
122 #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section
123 #endif
125 #define TARGET_ASM_ALIGNED_INT_OP \
126 {TARGET_ASM_ALIGNED_HI_OP, \
127 TARGET_ASM_ALIGNED_SI_OP, \
128 TARGET_ASM_ALIGNED_DI_OP, \
129 TARGET_ASM_ALIGNED_TI_OP}
131 #define TARGET_ASM_UNALIGNED_INT_OP \
132 {TARGET_ASM_UNALIGNED_HI_OP, \
133 TARGET_ASM_UNALIGNED_SI_OP, \
134 TARGET_ASM_UNALIGNED_DI_OP, \
135 TARGET_ASM_UNALIGNED_TI_OP}
137 #define TARGET_ASM_OUT {TARGET_ASM_OPEN_PAREN, \
138 TARGET_ASM_CLOSE_PAREN, \
139 TARGET_ASM_BYTE_OP, \
140 TARGET_ASM_ALIGNED_INT_OP, \
141 TARGET_ASM_UNALIGNED_INT_OP, \
142 TARGET_ASM_INTEGER, \
143 TARGET_ASM_FUNCTION_PROLOGUE, \
144 TARGET_ASM_FUNCTION_END_PROLOGUE, \
145 TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, \
146 TARGET_ASM_FUNCTION_EPILOGUE, \
147 TARGET_ASM_NAMED_SECTION, \
148 TARGET_ASM_EXCEPTION_SECTION, \
149 TARGET_ASM_EH_FRAME_SECTION, \
150 TARGET_ASM_SELECT_SECTION, \
151 TARGET_ASM_SELECT_RTX_SECTION, \
152 TARGET_ASM_UNIQUE_SECTION, \
153 TARGET_ASM_CONSTRUCTOR, \
154 TARGET_ASM_DESTRUCTOR}
156 /* Scheduler hooks. All of these default to null pointers, which
157 haifa-sched.c looks for and handles. */
158 #define TARGET_SCHED_ADJUST_COST 0
159 #define TARGET_SCHED_ADJUST_PRIORITY 0
160 #define TARGET_SCHED_ISSUE_RATE 0
161 #define TARGET_SCHED_VARIABLE_ISSUE 0
162 #define TARGET_SCHED_INIT 0
163 #define TARGET_SCHED_FINISH 0
164 #define TARGET_SCHED_REORDER 0
165 #define TARGET_SCHED_REORDER2 0
166 #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE 0
167 #define TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN 0
168 #define TARGET_SCHED_DFA_PRE_CYCLE_INSN 0
169 #define TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN 0
170 #define TARGET_SCHED_DFA_POST_CYCLE_INSN 0
171 #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD 0
172 #define TARGET_SCHED_INIT_DFA_BUBBLES 0
173 #define TARGET_SCHED_DFA_BUBBLE 0
175 #define TARGET_SCHED \
176 {TARGET_SCHED_ADJUST_COST, \
177 TARGET_SCHED_ADJUST_PRIORITY, \
178 TARGET_SCHED_ISSUE_RATE, \
179 TARGET_SCHED_VARIABLE_ISSUE, \
180 TARGET_SCHED_INIT, \
181 TARGET_SCHED_FINISH, \
182 TARGET_SCHED_REORDER, \
183 TARGET_SCHED_REORDER2, \
184 TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, \
185 TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN, \
186 TARGET_SCHED_DFA_PRE_CYCLE_INSN, \
187 TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN, \
188 TARGET_SCHED_DFA_POST_CYCLE_INSN, \
189 TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, \
190 TARGET_SCHED_INIT_DFA_BUBBLES, \
191 TARGET_SCHED_DFA_BUBBLE}
193 /* All in tree.c. */
194 #define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes
195 #define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes
196 #define TARGET_ATTRIBUTE_TABLE NULL
197 #define TARGET_COMP_TYPE_ATTRIBUTES default_comp_type_attributes
198 #define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES default_set_default_type_attributes
199 #define TARGET_INSERT_ATTRIBUTES default_insert_attributes
200 #define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P default_function_attribute_inlinable_p
201 #define TARGET_MS_BITFIELD_LAYOUT_P default_ms_bitfield_layout_p
203 /* In builtins.c. */
204 #define TARGET_INIT_BUILTINS default_init_builtins
205 #define TARGET_EXPAND_BUILTIN default_expand_builtin
207 /* In varasm.c. */
208 #ifndef TARGET_SECTION_TYPE_FLAGS
209 #define TARGET_SECTION_TYPE_FLAGS default_section_type_flags
210 #endif
212 #ifndef TARGET_STRIP_NAME_ENCODING
213 #define TARGET_STRIP_NAME_ENCODING default_strip_name_encoding
214 #endif
216 #ifndef TARGET_BINDS_LOCAL_P
217 #define TARGET_BINDS_LOCAL_P default_binds_local_p
218 #endif
220 /* In hook.c. */
221 #define TARGET_CANNOT_MODIFY_JUMPS_P hook_void_bool_false
222 #define TARGET_IN_SMALL_DATA_P hook_tree_bool_false
224 #ifndef TARGET_ENCODE_SECTION_INFO
225 #define TARGET_ENCODE_SECTION_INFO hook_tree_int_void
226 #endif
228 /* The whole shebang. */
229 #define TARGET_INITIALIZER \
231 TARGET_ASM_OUT, \
232 TARGET_SCHED, \
233 TARGET_MERGE_DECL_ATTRIBUTES, \
234 TARGET_MERGE_TYPE_ATTRIBUTES, \
235 TARGET_ATTRIBUTE_TABLE, \
236 TARGET_COMP_TYPE_ATTRIBUTES, \
237 TARGET_SET_DEFAULT_TYPE_ATTRIBUTES, \
238 TARGET_INSERT_ATTRIBUTES, \
239 TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, \
240 TARGET_MS_BITFIELD_LAYOUT_P, \
241 TARGET_INIT_BUILTINS, \
242 TARGET_EXPAND_BUILTIN, \
243 TARGET_SECTION_TYPE_FLAGS, \
244 TARGET_CANNOT_MODIFY_JUMPS_P, \
245 TARGET_IN_SMALL_DATA_P, \
246 TARGET_BINDS_LOCAL_P, \
247 TARGET_ENCODE_SECTION_INFO, \
248 TARGET_STRIP_NAME_ENCODING, \
249 TARGET_HAVE_NAMED_SECTIONS, \
250 TARGET_HAVE_CTORS_DTORS, \
251 TARGET_HAVE_TLS \
254 #include "hooks.h"