defaults.h revision 1.8 1 1.1 mrg /* Definitions of various defaults for tm.h macros.
2 1.8 mrg Copyright (C) 1992-2017 Free Software Foundation, Inc.
3 1.1 mrg Contributed by Ron Guilmette (rfg (at) monkeys.com)
4 1.1 mrg
5 1.1 mrg This file is part of GCC.
6 1.1 mrg
7 1.1 mrg GCC is free software; you can redistribute it and/or modify it under
8 1.1 mrg the terms of the GNU General Public License as published by the Free
9 1.1 mrg Software Foundation; either version 3, or (at your option) any later
10 1.1 mrg version.
11 1.1 mrg
12 1.1 mrg GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 1.1 mrg WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 1.1 mrg FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 1.1 mrg for more details.
16 1.1 mrg
17 1.1 mrg Under Section 7 of GPL version 3, you are granted additional
18 1.1 mrg permissions described in the GCC Runtime Library Exception, version
19 1.1 mrg 3.1, as published by the Free Software Foundation.
20 1.1 mrg
21 1.1 mrg You should have received a copy of the GNU General Public License and
22 1.1 mrg a copy of the GCC Runtime Library Exception along with this program;
23 1.1 mrg see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 1.1 mrg <http://www.gnu.org/licenses/>. */
25 1.1 mrg
26 1.1 mrg #ifndef GCC_DEFAULTS_H
27 1.1 mrg #define GCC_DEFAULTS_H
28 1.1 mrg
29 1.3 mrg /* How to start an assembler comment. */
30 1.3 mrg #ifndef ASM_COMMENT_START
31 1.3 mrg #define ASM_COMMENT_START ";#"
32 1.1 mrg #endif
33 1.1 mrg
34 1.1 mrg /* Store in OUTPUT a string (made with alloca) containing an
35 1.1 mrg assembler-name for a local static variable or function named NAME.
36 1.1 mrg LABELNO is an integer which is different for each call. */
37 1.1 mrg
38 1.1 mrg #ifndef ASM_PN_FORMAT
39 1.1 mrg # ifndef NO_DOT_IN_LABEL
40 1.1 mrg # define ASM_PN_FORMAT "%s.%lu"
41 1.1 mrg # else
42 1.1 mrg # ifndef NO_DOLLAR_IN_LABEL
43 1.1 mrg # define ASM_PN_FORMAT "%s$%lu"
44 1.1 mrg # else
45 1.1 mrg # define ASM_PN_FORMAT "__%s_%lu"
46 1.1 mrg # endif
47 1.1 mrg # endif
48 1.1 mrg #endif /* ! ASM_PN_FORMAT */
49 1.1 mrg
50 1.1 mrg #ifndef ASM_FORMAT_PRIVATE_NAME
51 1.1 mrg # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
52 1.1 mrg do { const char *const name_ = (NAME); \
53 1.1 mrg char *const output_ = (OUTPUT) = \
54 1.1 mrg (char *) alloca (strlen (name_) + 32); \
55 1.1 mrg sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
56 1.1 mrg } while (0)
57 1.1 mrg #endif
58 1.1 mrg
59 1.1 mrg /* Choose a reasonable default for ASM_OUTPUT_ASCII. */
60 1.1 mrg
61 1.1 mrg #ifndef ASM_OUTPUT_ASCII
62 1.1 mrg #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
63 1.1 mrg do { \
64 1.1 mrg FILE *_hide_asm_out_file = (MYFILE); \
65 1.1 mrg const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
66 1.1 mrg int _hide_thissize = (MYLENGTH); \
67 1.1 mrg { \
68 1.1 mrg FILE *asm_out_file = _hide_asm_out_file; \
69 1.1 mrg const unsigned char *p = _hide_p; \
70 1.1 mrg int thissize = _hide_thissize; \
71 1.1 mrg int i; \
72 1.1 mrg fprintf (asm_out_file, "\t.ascii \""); \
73 1.1 mrg \
74 1.1 mrg for (i = 0; i < thissize; i++) \
75 1.1 mrg { \
76 1.1 mrg int c = p[i]; \
77 1.1 mrg if (c == '\"' || c == '\\') \
78 1.1 mrg putc ('\\', asm_out_file); \
79 1.5 mrg if (ISPRINT (c)) \
80 1.1 mrg putc (c, asm_out_file); \
81 1.1 mrg else \
82 1.1 mrg { \
83 1.1 mrg fprintf (asm_out_file, "\\%o", c); \
84 1.1 mrg /* After an octal-escape, if a digit follows, \
85 1.1 mrg terminate one string constant and start another. \
86 1.1 mrg The VAX assembler fails to stop reading the escape \
87 1.1 mrg after three digits, so this is the only way we \
88 1.1 mrg can get it to parse the data properly. */ \
89 1.5 mrg if (i < thissize - 1 && ISDIGIT (p[i + 1])) \
90 1.1 mrg fprintf (asm_out_file, "\"\n\t.ascii \""); \
91 1.1 mrg } \
92 1.1 mrg } \
93 1.1 mrg fprintf (asm_out_file, "\"\n"); \
94 1.1 mrg } \
95 1.1 mrg } \
96 1.1 mrg while (0)
97 1.1 mrg #endif
98 1.1 mrg
99 1.1 mrg /* This is how we tell the assembler to equate two values. */
100 1.1 mrg #ifdef SET_ASM_OP
101 1.1 mrg #ifndef ASM_OUTPUT_DEF
102 1.1 mrg #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
103 1.1 mrg do { fprintf ((FILE), "%s", SET_ASM_OP); \
104 1.1 mrg assemble_name (FILE, LABEL1); \
105 1.1 mrg fprintf (FILE, ","); \
106 1.1 mrg assemble_name (FILE, LABEL2); \
107 1.1 mrg fprintf (FILE, "\n"); \
108 1.1 mrg } while (0)
109 1.1 mrg #endif
110 1.1 mrg #endif
111 1.1 mrg
112 1.3 mrg #ifndef IFUNC_ASM_TYPE
113 1.3 mrg #define IFUNC_ASM_TYPE "gnu_indirect_function"
114 1.3 mrg #endif
115 1.3 mrg
116 1.1 mrg #ifndef TLS_COMMON_ASM_OP
117 1.1 mrg #define TLS_COMMON_ASM_OP ".tls_common"
118 1.1 mrg #endif
119 1.1 mrg
120 1.1 mrg #if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON)
121 1.1 mrg #define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \
122 1.1 mrg do \
123 1.1 mrg { \
124 1.1 mrg fprintf ((FILE), "\t%s\t", TLS_COMMON_ASM_OP); \
125 1.1 mrg assemble_name ((FILE), (NAME)); \
126 1.6 mrg fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
127 1.1 mrg (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \
128 1.1 mrg } \
129 1.1 mrg while (0)
130 1.1 mrg #endif
131 1.1 mrg
132 1.1 mrg /* Decide whether to defer emitting the assembler output for an equate
133 1.1 mrg of two values. The default is to not defer output. */
134 1.1 mrg #ifndef TARGET_DEFERRED_OUTPUT_DEFS
135 1.1 mrg #define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
136 1.1 mrg #endif
137 1.1 mrg
138 1.1 mrg /* This is how to output the definition of a user-level label named
139 1.3 mrg NAME, such as the label on variable NAME. */
140 1.1 mrg
141 1.1 mrg #ifndef ASM_OUTPUT_LABEL
142 1.1 mrg #define ASM_OUTPUT_LABEL(FILE,NAME) \
143 1.3 mrg do { \
144 1.3 mrg assemble_name ((FILE), (NAME)); \
145 1.3 mrg fputs (":\n", (FILE)); \
146 1.3 mrg } while (0)
147 1.3 mrg #endif
148 1.3 mrg
149 1.3 mrg /* This is how to output the definition of a user-level label named
150 1.3 mrg NAME, such as the label on a function. */
151 1.3 mrg
152 1.3 mrg #ifndef ASM_OUTPUT_FUNCTION_LABEL
153 1.3 mrg #define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \
154 1.3 mrg ASM_OUTPUT_LABEL ((FILE), (NAME))
155 1.1 mrg #endif
156 1.1 mrg
157 1.1 mrg /* Output the definition of a compiler-generated label named NAME. */
158 1.1 mrg #ifndef ASM_OUTPUT_INTERNAL_LABEL
159 1.1 mrg #define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \
160 1.1 mrg do { \
161 1.1 mrg assemble_name_raw ((FILE), (NAME)); \
162 1.1 mrg fputs (":\n", (FILE)); \
163 1.1 mrg } while (0)
164 1.1 mrg #endif
165 1.1 mrg
166 1.1 mrg /* This is how to output a reference to a user-level label named NAME. */
167 1.1 mrg
168 1.1 mrg #ifndef ASM_OUTPUT_LABELREF
169 1.3 mrg #define ASM_OUTPUT_LABELREF(FILE,NAME) \
170 1.3 mrg do { \
171 1.3 mrg fputs (user_label_prefix, (FILE)); \
172 1.3 mrg fputs ((NAME), (FILE)); \
173 1.3 mrg } while (0);
174 1.1 mrg #endif
175 1.1 mrg
176 1.1 mrg /* Allow target to print debug info labels specially. This is useful for
177 1.1 mrg VLIW targets, since debug info labels should go into the middle of
178 1.1 mrg instruction bundles instead of breaking them. */
179 1.1 mrg
180 1.1 mrg #ifndef ASM_OUTPUT_DEBUG_LABEL
181 1.1 mrg #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
182 1.1 mrg (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
183 1.1 mrg #endif
184 1.1 mrg
185 1.1 mrg /* This is how we tell the assembler that a symbol is weak. */
186 1.1 mrg #ifndef ASM_OUTPUT_WEAK_ALIAS
187 1.1 mrg #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
188 1.1 mrg #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
189 1.1 mrg do \
190 1.1 mrg { \
191 1.1 mrg ASM_WEAKEN_LABEL (STREAM, NAME); \
192 1.1 mrg if (VALUE) \
193 1.1 mrg ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
194 1.1 mrg } \
195 1.1 mrg while (0)
196 1.1 mrg #endif
197 1.1 mrg #endif
198 1.1 mrg
199 1.1 mrg /* This is how we tell the assembler that a symbol is a weak alias to
200 1.1 mrg another symbol that doesn't require the other symbol to be defined.
201 1.1 mrg Uses of the former will turn into weak uses of the latter, i.e.,
202 1.1 mrg uses that, in case the latter is undefined, will not cause errors,
203 1.1 mrg and will add it to the symbol table as weak undefined. However, if
204 1.1 mrg the latter is referenced directly, a strong reference prevails. */
205 1.1 mrg #ifndef ASM_OUTPUT_WEAKREF
206 1.1 mrg #if defined HAVE_GAS_WEAKREF
207 1.1 mrg #define ASM_OUTPUT_WEAKREF(FILE, DECL, NAME, VALUE) \
208 1.1 mrg do \
209 1.1 mrg { \
210 1.1 mrg fprintf ((FILE), "\t.weakref\t"); \
211 1.1 mrg assemble_name ((FILE), (NAME)); \
212 1.1 mrg fprintf ((FILE), ","); \
213 1.1 mrg assemble_name ((FILE), (VALUE)); \
214 1.1 mrg fprintf ((FILE), "\n"); \
215 1.1 mrg } \
216 1.1 mrg while (0)
217 1.1 mrg #endif
218 1.1 mrg #endif
219 1.1 mrg
220 1.1 mrg /* How to emit a .type directive. */
221 1.1 mrg #ifndef ASM_OUTPUT_TYPE_DIRECTIVE
222 1.1 mrg #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
223 1.1 mrg #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
224 1.1 mrg do \
225 1.1 mrg { \
226 1.1 mrg fputs (TYPE_ASM_OP, STREAM); \
227 1.1 mrg assemble_name (STREAM, NAME); \
228 1.1 mrg fputs (", ", STREAM); \
229 1.1 mrg fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
230 1.1 mrg putc ('\n', STREAM); \
231 1.1 mrg } \
232 1.1 mrg while (0)
233 1.1 mrg #endif
234 1.1 mrg #endif
235 1.1 mrg
236 1.1 mrg /* How to emit a .size directive. */
237 1.1 mrg #ifndef ASM_OUTPUT_SIZE_DIRECTIVE
238 1.1 mrg #ifdef SIZE_ASM_OP
239 1.1 mrg #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
240 1.1 mrg do \
241 1.1 mrg { \
242 1.1 mrg HOST_WIDE_INT size_ = (SIZE); \
243 1.1 mrg fputs (SIZE_ASM_OP, STREAM); \
244 1.1 mrg assemble_name (STREAM, NAME); \
245 1.1 mrg fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
246 1.1 mrg } \
247 1.1 mrg while (0)
248 1.1 mrg
249 1.1 mrg #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
250 1.1 mrg do \
251 1.1 mrg { \
252 1.1 mrg fputs (SIZE_ASM_OP, STREAM); \
253 1.1 mrg assemble_name (STREAM, NAME); \
254 1.1 mrg fputs (", .-", STREAM); \
255 1.1 mrg assemble_name (STREAM, NAME); \
256 1.1 mrg putc ('\n', STREAM); \
257 1.1 mrg } \
258 1.1 mrg while (0)
259 1.1 mrg
260 1.1 mrg #endif
261 1.1 mrg #endif
262 1.1 mrg
263 1.3 mrg /* This determines whether or not we support weak symbols. SUPPORTS_WEAK
264 1.3 mrg must be a preprocessor constant. */
265 1.1 mrg #ifndef SUPPORTS_WEAK
266 1.1 mrg #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
267 1.1 mrg #define SUPPORTS_WEAK 1
268 1.1 mrg #else
269 1.1 mrg #define SUPPORTS_WEAK 0
270 1.1 mrg #endif
271 1.1 mrg #endif
272 1.1 mrg
273 1.3 mrg /* This determines whether or not we support weak symbols during target
274 1.3 mrg code generation. TARGET_SUPPORTS_WEAK can be any valid C expression. */
275 1.3 mrg #ifndef TARGET_SUPPORTS_WEAK
276 1.3 mrg #define TARGET_SUPPORTS_WEAK (SUPPORTS_WEAK)
277 1.3 mrg #endif
278 1.3 mrg
279 1.1 mrg /* This determines whether or not we support the discriminator
280 1.1 mrg attribute in the .loc directive. */
281 1.1 mrg #ifndef SUPPORTS_DISCRIMINATOR
282 1.1 mrg #ifdef HAVE_GAS_DISCRIMINATOR
283 1.1 mrg #define SUPPORTS_DISCRIMINATOR 1
284 1.1 mrg #else
285 1.1 mrg #define SUPPORTS_DISCRIMINATOR 0
286 1.1 mrg #endif
287 1.1 mrg #endif
288 1.1 mrg
289 1.1 mrg /* This determines whether or not we support link-once semantics. */
290 1.1 mrg #ifndef SUPPORTS_ONE_ONLY
291 1.1 mrg #ifdef MAKE_DECL_ONE_ONLY
292 1.1 mrg #define SUPPORTS_ONE_ONLY 1
293 1.1 mrg #else
294 1.1 mrg #define SUPPORTS_ONE_ONLY 0
295 1.1 mrg #endif
296 1.1 mrg #endif
297 1.1 mrg
298 1.1 mrg /* This determines whether weak symbols must be left out of a static
299 1.1 mrg archive's table of contents. Defining this macro to be nonzero has
300 1.1 mrg the consequence that certain symbols will not be made weak that
301 1.1 mrg otherwise would be. The C++ ABI requires this macro to be zero;
302 1.1 mrg see the documentation. */
303 1.1 mrg #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
304 1.1 mrg #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
305 1.1 mrg #endif
306 1.1 mrg
307 1.1 mrg /* This determines whether or not we need linkonce unwind information. */
308 1.1 mrg #ifndef TARGET_USES_WEAK_UNWIND_INFO
309 1.1 mrg #define TARGET_USES_WEAK_UNWIND_INFO 0
310 1.1 mrg #endif
311 1.1 mrg
312 1.1 mrg /* By default, there is no prefix on user-defined symbols. */
313 1.1 mrg #ifndef USER_LABEL_PREFIX
314 1.1 mrg #define USER_LABEL_PREFIX ""
315 1.1 mrg #endif
316 1.1 mrg
317 1.1 mrg /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
318 1.1 mrg provide a weak attribute. Else define it to nothing.
319 1.1 mrg
320 1.1 mrg This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
321 1.1 mrg not available at that time.
322 1.1 mrg
323 1.1 mrg Note, this is only for use by target files which we know are to be
324 1.1 mrg compiled by GCC. */
325 1.1 mrg #ifndef TARGET_ATTRIBUTE_WEAK
326 1.1 mrg # if SUPPORTS_WEAK
327 1.1 mrg # define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
328 1.1 mrg # else
329 1.1 mrg # define TARGET_ATTRIBUTE_WEAK
330 1.1 mrg # endif
331 1.1 mrg #endif
332 1.1 mrg
333 1.1 mrg /* By default we can assume that all global symbols are in one namespace,
334 1.1 mrg across all shared libraries. */
335 1.1 mrg #ifndef MULTIPLE_SYMBOL_SPACES
336 1.1 mrg # define MULTIPLE_SYMBOL_SPACES 0
337 1.1 mrg #endif
338 1.1 mrg
339 1.1 mrg /* If the target supports init_priority C++ attribute, give
340 1.1 mrg SUPPORTS_INIT_PRIORITY a nonzero value. */
341 1.1 mrg #ifndef SUPPORTS_INIT_PRIORITY
342 1.1 mrg #define SUPPORTS_INIT_PRIORITY 1
343 1.1 mrg #endif /* SUPPORTS_INIT_PRIORITY */
344 1.1 mrg
345 1.1 mrg /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
346 1.1 mrg the rest of the DWARF 2 frame unwind support is also provided. */
347 1.3 mrg #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
348 1.1 mrg #define DWARF2_UNWIND_INFO 1
349 1.1 mrg #endif
350 1.1 mrg
351 1.1 mrg /* If we have named sections, and we're using crtstuff to run ctors,
352 1.1 mrg use them for registering eh frame information. */
353 1.1 mrg #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
354 1.6 mrg && !defined (EH_FRAME_THROUGH_COLLECT2)
355 1.1 mrg #ifndef EH_FRAME_SECTION_NAME
356 1.1 mrg #define EH_FRAME_SECTION_NAME ".eh_frame"
357 1.1 mrg #endif
358 1.1 mrg #endif
359 1.1 mrg
360 1.1 mrg /* On many systems, different EH table encodings are used under
361 1.1 mrg difference circumstances. Some will require runtime relocations;
362 1.1 mrg some will not. For those that do not require runtime relocations,
363 1.1 mrg we would like to make the table read-only. However, since the
364 1.1 mrg read-only tables may need to be combined with read-write tables
365 1.1 mrg that do require runtime relocation, it is not safe to make the
366 1.1 mrg tables read-only unless the linker will merge read-only and
367 1.1 mrg read-write sections into a single read-write section. If your
368 1.1 mrg linker does not have this ability, but your system is such that no
369 1.1 mrg encoding used with non-PIC code will ever require a runtime
370 1.1 mrg relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
371 1.1 mrg your target configuration file. */
372 1.1 mrg #ifndef EH_TABLES_CAN_BE_READ_ONLY
373 1.1 mrg #ifdef HAVE_LD_RO_RW_SECTION_MIXING
374 1.1 mrg #define EH_TABLES_CAN_BE_READ_ONLY 1
375 1.1 mrg #else
376 1.1 mrg #define EH_TABLES_CAN_BE_READ_ONLY 0
377 1.1 mrg #endif
378 1.1 mrg #endif
379 1.1 mrg
380 1.6 mrg /* Provide defaults for stuff that may not be defined when using
381 1.6 mrg sjlj exceptions. */
382 1.6 mrg #ifndef EH_RETURN_DATA_REGNO
383 1.6 mrg #define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM
384 1.6 mrg #endif
385 1.6 mrg
386 1.6 mrg /* Offset between the eh handler address and entry in eh tables. */
387 1.6 mrg #ifndef RETURN_ADDR_OFFSET
388 1.6 mrg #define RETURN_ADDR_OFFSET 0
389 1.6 mrg #endif
390 1.6 mrg
391 1.6 mrg #ifndef MASK_RETURN_ADDR
392 1.6 mrg #define MASK_RETURN_ADDR NULL_RTX
393 1.6 mrg #endif
394 1.6 mrg
395 1.1 mrg /* Number of hardware registers that go into the DWARF-2 unwind info.
396 1.1 mrg If not defined, equals FIRST_PSEUDO_REGISTER */
397 1.1 mrg
398 1.1 mrg #ifndef DWARF_FRAME_REGISTERS
399 1.1 mrg #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
400 1.1 mrg #endif
401 1.1 mrg
402 1.3 mrg /* Offsets recorded in opcodes are a multiple of this alignment factor. */
403 1.3 mrg #ifndef DWARF_CIE_DATA_ALIGNMENT
404 1.3 mrg #ifdef STACK_GROWS_DOWNWARD
405 1.3 mrg #define DWARF_CIE_DATA_ALIGNMENT (-((int) UNITS_PER_WORD))
406 1.3 mrg #else
407 1.3 mrg #define DWARF_CIE_DATA_ALIGNMENT ((int) UNITS_PER_WORD)
408 1.3 mrg #endif
409 1.3 mrg #endif
410 1.3 mrg
411 1.3 mrg /* The DWARF 2 CFA column which tracks the return address. Normally this
412 1.3 mrg is the column for PC, or the first column after all of the hard
413 1.3 mrg registers. */
414 1.3 mrg #ifndef DWARF_FRAME_RETURN_COLUMN
415 1.3 mrg #ifdef PC_REGNUM
416 1.3 mrg #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PC_REGNUM)
417 1.3 mrg #else
418 1.3 mrg #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGISTERS
419 1.3 mrg #endif
420 1.3 mrg #endif
421 1.3 mrg
422 1.1 mrg /* How to renumber registers for dbx and gdb. If not defined, assume
423 1.1 mrg no renumbering is necessary. */
424 1.1 mrg
425 1.1 mrg #ifndef DBX_REGISTER_NUMBER
426 1.1 mrg #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
427 1.1 mrg #endif
428 1.1 mrg
429 1.3 mrg /* The mapping from gcc register number to DWARF 2 CFA column number.
430 1.3 mrg By default, we just provide columns for all registers. */
431 1.3 mrg #ifndef DWARF_FRAME_REGNUM
432 1.3 mrg #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
433 1.3 mrg #endif
434 1.3 mrg
435 1.5 mrg /* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
436 1.5 mrg #ifndef DWARF_REG_TO_UNWIND_COLUMN
437 1.5 mrg #define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
438 1.5 mrg #endif
439 1.5 mrg
440 1.3 mrg /* Map register numbers held in the call frame info that gcc has
441 1.3 mrg collected using DWARF_FRAME_REGNUM to those that should be output in
442 1.3 mrg .debug_frame and .eh_frame. */
443 1.3 mrg #ifndef DWARF2_FRAME_REG_OUT
444 1.3 mrg #define DWARF2_FRAME_REG_OUT(REGNO, FOR_EH) (REGNO)
445 1.3 mrg #endif
446 1.3 mrg
447 1.3 mrg /* The size of addresses as they appear in the Dwarf 2 data.
448 1.3 mrg Some architectures use word addresses to refer to code locations,
449 1.3 mrg but Dwarf 2 info always uses byte addresses. On such machines,
450 1.3 mrg Dwarf 2 addresses need to be larger than the architecture's
451 1.3 mrg pointers. */
452 1.3 mrg #ifndef DWARF2_ADDR_SIZE
453 1.5 mrg #define DWARF2_ADDR_SIZE ((POINTER_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT)
454 1.3 mrg #endif
455 1.3 mrg
456 1.3 mrg /* The size in bytes of a DWARF field indicating an offset or length
457 1.3 mrg relative to a debug info section, specified to be 4 bytes in the
458 1.3 mrg DWARF-2 specification. The SGI/MIPS ABI defines it to be the same
459 1.3 mrg as PTR_SIZE. */
460 1.3 mrg #ifndef DWARF_OFFSET_SIZE
461 1.3 mrg #define DWARF_OFFSET_SIZE 4
462 1.3 mrg #endif
463 1.3 mrg
464 1.3 mrg /* The size in bytes of a DWARF 4 type signature. */
465 1.3 mrg #ifndef DWARF_TYPE_SIGNATURE_SIZE
466 1.3 mrg #define DWARF_TYPE_SIGNATURE_SIZE 8
467 1.3 mrg #endif
468 1.3 mrg
469 1.1 mrg /* Default sizes for base C types. If the sizes are different for
470 1.1 mrg your target, you should override these values by defining the
471 1.1 mrg appropriate symbols in your tm.h file. */
472 1.1 mrg
473 1.1 mrg #ifndef BITS_PER_WORD
474 1.1 mrg #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
475 1.1 mrg #endif
476 1.1 mrg
477 1.1 mrg #ifndef CHAR_TYPE_SIZE
478 1.1 mrg #define CHAR_TYPE_SIZE BITS_PER_UNIT
479 1.1 mrg #endif
480 1.1 mrg
481 1.1 mrg #ifndef BOOL_TYPE_SIZE
482 1.1 mrg /* `bool' has size and alignment `1', on almost all platforms. */
483 1.1 mrg #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
484 1.1 mrg #endif
485 1.1 mrg
486 1.1 mrg #ifndef SHORT_TYPE_SIZE
487 1.1 mrg #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
488 1.1 mrg #endif
489 1.1 mrg
490 1.1 mrg #ifndef INT_TYPE_SIZE
491 1.1 mrg #define INT_TYPE_SIZE BITS_PER_WORD
492 1.1 mrg #endif
493 1.1 mrg
494 1.1 mrg #ifndef LONG_TYPE_SIZE
495 1.1 mrg #define LONG_TYPE_SIZE BITS_PER_WORD
496 1.1 mrg #endif
497 1.1 mrg
498 1.1 mrg #ifndef LONG_LONG_TYPE_SIZE
499 1.1 mrg #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
500 1.1 mrg #endif
501 1.1 mrg
502 1.1 mrg #ifndef WCHAR_TYPE_SIZE
503 1.1 mrg #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
504 1.1 mrg #endif
505 1.1 mrg
506 1.1 mrg #ifndef FLOAT_TYPE_SIZE
507 1.1 mrg #define FLOAT_TYPE_SIZE BITS_PER_WORD
508 1.1 mrg #endif
509 1.1 mrg
510 1.1 mrg #ifndef DOUBLE_TYPE_SIZE
511 1.1 mrg #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
512 1.1 mrg #endif
513 1.1 mrg
514 1.1 mrg #ifndef LONG_DOUBLE_TYPE_SIZE
515 1.1 mrg #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
516 1.1 mrg #endif
517 1.1 mrg
518 1.1 mrg #ifndef DECIMAL32_TYPE_SIZE
519 1.1 mrg #define DECIMAL32_TYPE_SIZE 32
520 1.1 mrg #endif
521 1.1 mrg
522 1.1 mrg #ifndef DECIMAL64_TYPE_SIZE
523 1.1 mrg #define DECIMAL64_TYPE_SIZE 64
524 1.1 mrg #endif
525 1.1 mrg
526 1.1 mrg #ifndef DECIMAL128_TYPE_SIZE
527 1.1 mrg #define DECIMAL128_TYPE_SIZE 128
528 1.1 mrg #endif
529 1.1 mrg
530 1.1 mrg #ifndef SHORT_FRACT_TYPE_SIZE
531 1.1 mrg #define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT
532 1.1 mrg #endif
533 1.1 mrg
534 1.1 mrg #ifndef FRACT_TYPE_SIZE
535 1.1 mrg #define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2)
536 1.1 mrg #endif
537 1.1 mrg
538 1.1 mrg #ifndef LONG_FRACT_TYPE_SIZE
539 1.1 mrg #define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4)
540 1.1 mrg #endif
541 1.1 mrg
542 1.1 mrg #ifndef LONG_LONG_FRACT_TYPE_SIZE
543 1.1 mrg #define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8)
544 1.1 mrg #endif
545 1.1 mrg
546 1.1 mrg #ifndef SHORT_ACCUM_TYPE_SIZE
547 1.1 mrg #define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2)
548 1.1 mrg #endif
549 1.1 mrg
550 1.1 mrg #ifndef ACCUM_TYPE_SIZE
551 1.1 mrg #define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2)
552 1.1 mrg #endif
553 1.1 mrg
554 1.1 mrg #ifndef LONG_ACCUM_TYPE_SIZE
555 1.1 mrg #define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2)
556 1.1 mrg #endif
557 1.1 mrg
558 1.1 mrg #ifndef LONG_LONG_ACCUM_TYPE_SIZE
559 1.1 mrg #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2)
560 1.1 mrg #endif
561 1.1 mrg
562 1.1 mrg /* We let tm.h override the types used here, to handle trivial differences
563 1.1 mrg such as the choice of unsigned int or long unsigned int for size_t.
564 1.1 mrg When machines start needing nontrivial differences in the size type,
565 1.1 mrg it would be best to do something here to figure out automatically
566 1.1 mrg from other information what type to use. */
567 1.1 mrg
568 1.1 mrg #ifndef SIZE_TYPE
569 1.1 mrg #define SIZE_TYPE "long unsigned int"
570 1.1 mrg #endif
571 1.1 mrg
572 1.3 mrg #ifndef SIZETYPE
573 1.3 mrg #define SIZETYPE SIZE_TYPE
574 1.3 mrg #endif
575 1.3 mrg
576 1.1 mrg #ifndef PID_TYPE
577 1.1 mrg #define PID_TYPE "int"
578 1.1 mrg #endif
579 1.1 mrg
580 1.1 mrg /* If GCC knows the exact uint_least16_t and uint_least32_t types from
581 1.1 mrg <stdint.h>, use them for char16_t and char32_t. Otherwise, use
582 1.1 mrg these guesses; getting the wrong type of a given width will not
583 1.1 mrg affect C++ name mangling because in C++ these are distinct types
584 1.1 mrg not typedefs. */
585 1.1 mrg
586 1.1 mrg #ifdef UINT_LEAST16_TYPE
587 1.1 mrg #define CHAR16_TYPE UINT_LEAST16_TYPE
588 1.1 mrg #else
589 1.1 mrg #define CHAR16_TYPE "short unsigned int"
590 1.1 mrg #endif
591 1.1 mrg
592 1.1 mrg #ifdef UINT_LEAST32_TYPE
593 1.1 mrg #define CHAR32_TYPE UINT_LEAST32_TYPE
594 1.1 mrg #else
595 1.1 mrg #define CHAR32_TYPE "unsigned int"
596 1.1 mrg #endif
597 1.1 mrg
598 1.1 mrg #ifndef WCHAR_TYPE
599 1.1 mrg #define WCHAR_TYPE "int"
600 1.1 mrg #endif
601 1.1 mrg
602 1.1 mrg /* WCHAR_TYPE gets overridden by -fshort-wchar. */
603 1.1 mrg #define MODIFIED_WCHAR_TYPE \
604 1.1 mrg (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
605 1.1 mrg
606 1.1 mrg #ifndef PTRDIFF_TYPE
607 1.1 mrg #define PTRDIFF_TYPE "long int"
608 1.1 mrg #endif
609 1.1 mrg
610 1.1 mrg #ifndef WINT_TYPE
611 1.1 mrg #define WINT_TYPE "unsigned int"
612 1.1 mrg #endif
613 1.1 mrg
614 1.1 mrg #ifndef INTMAX_TYPE
615 1.1 mrg #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
616 1.1 mrg ? "int" \
617 1.1 mrg : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
618 1.1 mrg ? "long int" \
619 1.1 mrg : "long long int"))
620 1.1 mrg #endif
621 1.1 mrg
622 1.1 mrg #ifndef UINTMAX_TYPE
623 1.1 mrg #define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
624 1.1 mrg ? "unsigned int" \
625 1.1 mrg : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
626 1.1 mrg ? "long unsigned int" \
627 1.1 mrg : "long long unsigned int"))
628 1.1 mrg #endif
629 1.1 mrg
630 1.1 mrg
631 1.1 mrg /* There are no default definitions of these <stdint.h> types. */
632 1.1 mrg
633 1.1 mrg #ifndef SIG_ATOMIC_TYPE
634 1.1 mrg #define SIG_ATOMIC_TYPE ((const char *) NULL)
635 1.1 mrg #endif
636 1.1 mrg
637 1.1 mrg #ifndef INT8_TYPE
638 1.1 mrg #define INT8_TYPE ((const char *) NULL)
639 1.1 mrg #endif
640 1.1 mrg
641 1.1 mrg #ifndef INT16_TYPE
642 1.1 mrg #define INT16_TYPE ((const char *) NULL)
643 1.1 mrg #endif
644 1.1 mrg
645 1.1 mrg #ifndef INT32_TYPE
646 1.1 mrg #define INT32_TYPE ((const char *) NULL)
647 1.1 mrg #endif
648 1.1 mrg
649 1.1 mrg #ifndef INT64_TYPE
650 1.1 mrg #define INT64_TYPE ((const char *) NULL)
651 1.1 mrg #endif
652 1.1 mrg
653 1.1 mrg #ifndef UINT8_TYPE
654 1.1 mrg #define UINT8_TYPE ((const char *) NULL)
655 1.1 mrg #endif
656 1.1 mrg
657 1.1 mrg #ifndef UINT16_TYPE
658 1.1 mrg #define UINT16_TYPE ((const char *) NULL)
659 1.1 mrg #endif
660 1.1 mrg
661 1.1 mrg #ifndef UINT32_TYPE
662 1.1 mrg #define UINT32_TYPE ((const char *) NULL)
663 1.1 mrg #endif
664 1.1 mrg
665 1.1 mrg #ifndef UINT64_TYPE
666 1.1 mrg #define UINT64_TYPE ((const char *) NULL)
667 1.1 mrg #endif
668 1.1 mrg
669 1.1 mrg #ifndef INT_LEAST8_TYPE
670 1.1 mrg #define INT_LEAST8_TYPE ((const char *) NULL)
671 1.1 mrg #endif
672 1.1 mrg
673 1.1 mrg #ifndef INT_LEAST16_TYPE
674 1.1 mrg #define INT_LEAST16_TYPE ((const char *) NULL)
675 1.1 mrg #endif
676 1.1 mrg
677 1.1 mrg #ifndef INT_LEAST32_TYPE
678 1.1 mrg #define INT_LEAST32_TYPE ((const char *) NULL)
679 1.1 mrg #endif
680 1.1 mrg
681 1.1 mrg #ifndef INT_LEAST64_TYPE
682 1.1 mrg #define INT_LEAST64_TYPE ((const char *) NULL)
683 1.1 mrg #endif
684 1.1 mrg
685 1.1 mrg #ifndef UINT_LEAST8_TYPE
686 1.1 mrg #define UINT_LEAST8_TYPE ((const char *) NULL)
687 1.1 mrg #endif
688 1.1 mrg
689 1.1 mrg #ifndef UINT_LEAST16_TYPE
690 1.1 mrg #define UINT_LEAST16_TYPE ((const char *) NULL)
691 1.1 mrg #endif
692 1.1 mrg
693 1.1 mrg #ifndef UINT_LEAST32_TYPE
694 1.1 mrg #define UINT_LEAST32_TYPE ((const char *) NULL)
695 1.1 mrg #endif
696 1.1 mrg
697 1.1 mrg #ifndef UINT_LEAST64_TYPE
698 1.1 mrg #define UINT_LEAST64_TYPE ((const char *) NULL)
699 1.1 mrg #endif
700 1.1 mrg
701 1.1 mrg #ifndef INT_FAST8_TYPE
702 1.1 mrg #define INT_FAST8_TYPE ((const char *) NULL)
703 1.1 mrg #endif
704 1.1 mrg
705 1.1 mrg #ifndef INT_FAST16_TYPE
706 1.1 mrg #define INT_FAST16_TYPE ((const char *) NULL)
707 1.1 mrg #endif
708 1.1 mrg
709 1.1 mrg #ifndef INT_FAST32_TYPE
710 1.1 mrg #define INT_FAST32_TYPE ((const char *) NULL)
711 1.1 mrg #endif
712 1.1 mrg
713 1.1 mrg #ifndef INT_FAST64_TYPE
714 1.1 mrg #define INT_FAST64_TYPE ((const char *) NULL)
715 1.1 mrg #endif
716 1.1 mrg
717 1.1 mrg #ifndef UINT_FAST8_TYPE
718 1.1 mrg #define UINT_FAST8_TYPE ((const char *) NULL)
719 1.1 mrg #endif
720 1.1 mrg
721 1.1 mrg #ifndef UINT_FAST16_TYPE
722 1.1 mrg #define UINT_FAST16_TYPE ((const char *) NULL)
723 1.1 mrg #endif
724 1.1 mrg
725 1.1 mrg #ifndef UINT_FAST32_TYPE
726 1.1 mrg #define UINT_FAST32_TYPE ((const char *) NULL)
727 1.1 mrg #endif
728 1.1 mrg
729 1.1 mrg #ifndef UINT_FAST64_TYPE
730 1.1 mrg #define UINT_FAST64_TYPE ((const char *) NULL)
731 1.1 mrg #endif
732 1.1 mrg
733 1.1 mrg #ifndef INTPTR_TYPE
734 1.1 mrg #define INTPTR_TYPE ((const char *) NULL)
735 1.1 mrg #endif
736 1.1 mrg
737 1.1 mrg #ifndef UINTPTR_TYPE
738 1.1 mrg #define UINTPTR_TYPE ((const char *) NULL)
739 1.1 mrg #endif
740 1.1 mrg
741 1.1 mrg /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
742 1.1 mrg #ifndef POINTER_SIZE
743 1.1 mrg #define POINTER_SIZE BITS_PER_WORD
744 1.1 mrg #endif
745 1.5 mrg #ifndef POINTER_SIZE_UNITS
746 1.5 mrg #define POINTER_SIZE_UNITS ((POINTER_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT)
747 1.5 mrg #endif
748 1.5 mrg
749 1.1 mrg
750 1.1 mrg #ifndef PIC_OFFSET_TABLE_REGNUM
751 1.1 mrg #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
752 1.1 mrg #endif
753 1.1 mrg
754 1.3 mrg #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
755 1.3 mrg #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0
756 1.3 mrg #endif
757 1.3 mrg
758 1.1 mrg #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
759 1.1 mrg #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
760 1.1 mrg #endif
761 1.1 mrg
762 1.1 mrg #ifndef TARGET_DECLSPEC
763 1.1 mrg #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
764 1.1 mrg /* If the target supports the "dllimport" attribute, users are
765 1.1 mrg probably used to the "__declspec" syntax. */
766 1.1 mrg #define TARGET_DECLSPEC 1
767 1.1 mrg #else
768 1.1 mrg #define TARGET_DECLSPEC 0
769 1.1 mrg #endif
770 1.1 mrg #endif
771 1.1 mrg
772 1.1 mrg /* By default, the preprocessor should be invoked the same way in C++
773 1.1 mrg as in C. */
774 1.1 mrg #ifndef CPLUSPLUS_CPP_SPEC
775 1.1 mrg #ifdef CPP_SPEC
776 1.1 mrg #define CPLUSPLUS_CPP_SPEC CPP_SPEC
777 1.1 mrg #endif
778 1.1 mrg #endif
779 1.1 mrg
780 1.1 mrg #ifndef ACCUMULATE_OUTGOING_ARGS
781 1.1 mrg #define ACCUMULATE_OUTGOING_ARGS 0
782 1.1 mrg #endif
783 1.1 mrg
784 1.3 mrg /* By default, use the GNU runtime for Objective C. */
785 1.3 mrg #ifndef NEXT_OBJC_RUNTIME
786 1.3 mrg #define NEXT_OBJC_RUNTIME 0
787 1.3 mrg #endif
788 1.3 mrg
789 1.1 mrg /* Supply a default definition for PUSH_ARGS. */
790 1.1 mrg #ifndef PUSH_ARGS
791 1.1 mrg #ifdef PUSH_ROUNDING
792 1.1 mrg #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
793 1.1 mrg #else
794 1.1 mrg #define PUSH_ARGS 0
795 1.1 mrg #endif
796 1.1 mrg #endif
797 1.1 mrg
798 1.1 mrg /* Decide whether a function's arguments should be processed
799 1.1 mrg from first to last or from last to first.
800 1.1 mrg
801 1.1 mrg They should if the stack and args grow in opposite directions, but
802 1.1 mrg only if we have push insns. */
803 1.1 mrg
804 1.1 mrg #ifdef PUSH_ROUNDING
805 1.1 mrg
806 1.1 mrg #ifndef PUSH_ARGS_REVERSED
807 1.1 mrg #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
808 1.1 mrg #define PUSH_ARGS_REVERSED PUSH_ARGS
809 1.1 mrg #endif
810 1.1 mrg #endif
811 1.1 mrg
812 1.1 mrg #endif
813 1.1 mrg
814 1.1 mrg #ifndef PUSH_ARGS_REVERSED
815 1.1 mrg #define PUSH_ARGS_REVERSED 0
816 1.1 mrg #endif
817 1.1 mrg
818 1.1 mrg /* Default value for the alignment (in bits) a C conformant malloc has to
819 1.1 mrg provide. This default is intended to be safe and always correct. */
820 1.1 mrg #ifndef MALLOC_ABI_ALIGNMENT
821 1.1 mrg #define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
822 1.1 mrg #endif
823 1.1 mrg
824 1.1 mrg /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
825 1.1 mrg STACK_BOUNDARY is required. */
826 1.1 mrg #ifndef PREFERRED_STACK_BOUNDARY
827 1.1 mrg #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
828 1.1 mrg #endif
829 1.1 mrg
830 1.1 mrg /* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not
831 1.1 mrg defined. */
832 1.1 mrg #ifndef INCOMING_STACK_BOUNDARY
833 1.1 mrg #define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY
834 1.1 mrg #endif
835 1.1 mrg
836 1.1 mrg #ifndef TARGET_DEFAULT_PACK_STRUCT
837 1.1 mrg #define TARGET_DEFAULT_PACK_STRUCT 0
838 1.1 mrg #endif
839 1.1 mrg
840 1.1 mrg /* By default, the vtable entries are void pointers, the so the alignment
841 1.1 mrg is the same as pointer alignment. The value of this macro specifies
842 1.1 mrg the alignment of the vtable entry in bits. It should be defined only
843 1.1 mrg when special alignment is necessary. */
844 1.1 mrg #ifndef TARGET_VTABLE_ENTRY_ALIGN
845 1.1 mrg #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
846 1.1 mrg #endif
847 1.1 mrg
848 1.1 mrg /* There are a few non-descriptor entries in the vtable at offsets below
849 1.1 mrg zero. If these entries must be padded (say, to preserve the alignment
850 1.1 mrg specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
851 1.1 mrg words in each data entry. */
852 1.1 mrg #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
853 1.1 mrg #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
854 1.1 mrg #endif
855 1.1 mrg
856 1.1 mrg /* Decide whether it is safe to use a local alias for a virtual function
857 1.1 mrg when constructing thunks. */
858 1.1 mrg #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
859 1.1 mrg #ifdef ASM_OUTPUT_DEF
860 1.1 mrg #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
861 1.1 mrg #else
862 1.1 mrg #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
863 1.1 mrg #endif
864 1.1 mrg #endif
865 1.1 mrg
866 1.1 mrg /* Select a format to encode pointers in exception handling data. We
867 1.1 mrg prefer those that result in fewer dynamic relocations. Assume no
868 1.1 mrg special support here and encode direct references. */
869 1.1 mrg #ifndef ASM_PREFERRED_EH_DATA_FORMAT
870 1.1 mrg #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
871 1.1 mrg #endif
872 1.1 mrg
873 1.1 mrg /* By default, the C++ compiler will use the lowest bit of the pointer
874 1.1 mrg to function to indicate a pointer-to-member-function points to a
875 1.1 mrg virtual member function. However, if FUNCTION_BOUNDARY indicates
876 1.1 mrg function addresses aren't always even, the lowest bit of the delta
877 1.1 mrg field will be used. */
878 1.1 mrg #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
879 1.1 mrg #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
880 1.1 mrg (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
881 1.1 mrg ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
882 1.1 mrg #endif
883 1.1 mrg
884 1.1 mrg #ifndef DEFAULT_GDB_EXTENSIONS
885 1.1 mrg #define DEFAULT_GDB_EXTENSIONS 1
886 1.1 mrg #endif
887 1.1 mrg
888 1.6 mrg #ifndef SDB_DEBUGGING_INFO
889 1.6 mrg #define SDB_DEBUGGING_INFO 0
890 1.6 mrg #endif
891 1.6 mrg
892 1.1 mrg /* If more than one debugging type is supported, you must define
893 1.1 mrg PREFERRED_DEBUGGING_TYPE to choose the default. */
894 1.1 mrg
895 1.6 mrg #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
896 1.1 mrg + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
897 1.1 mrg + defined (VMS_DEBUGGING_INFO))
898 1.1 mrg #ifndef PREFERRED_DEBUGGING_TYPE
899 1.1 mrg #error You must define PREFERRED_DEBUGGING_TYPE
900 1.1 mrg #endif /* no PREFERRED_DEBUGGING_TYPE */
901 1.1 mrg
902 1.1 mrg /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
903 1.1 mrg here so other code needn't care. */
904 1.1 mrg #elif defined DBX_DEBUGGING_INFO
905 1.1 mrg #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
906 1.1 mrg
907 1.6 mrg #elif SDB_DEBUGGING_INFO
908 1.1 mrg #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
909 1.1 mrg
910 1.6 mrg #elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
911 1.1 mrg #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
912 1.1 mrg
913 1.1 mrg #elif defined VMS_DEBUGGING_INFO
914 1.1 mrg #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
915 1.1 mrg
916 1.1 mrg #elif defined XCOFF_DEBUGGING_INFO
917 1.1 mrg #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
918 1.1 mrg
919 1.1 mrg #else
920 1.1 mrg /* No debugging format is supported by this target. */
921 1.1 mrg #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
922 1.1 mrg #endif
923 1.1 mrg
924 1.1 mrg #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
925 1.1 mrg #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
926 1.1 mrg #endif
927 1.1 mrg
928 1.1 mrg /* True if the targets integer-comparison functions return { 0, 1, 2
929 1.1 mrg } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
930 1.1 mrg instead. The libgcc routines are biased. */
931 1.1 mrg #ifndef TARGET_LIB_INT_CMP_BIASED
932 1.1 mrg #define TARGET_LIB_INT_CMP_BIASED (true)
933 1.1 mrg #endif
934 1.1 mrg
935 1.1 mrg /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
936 1.1 mrg then the word-endianness is the same as for integers. */
937 1.1 mrg #ifndef FLOAT_WORDS_BIG_ENDIAN
938 1.1 mrg #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
939 1.1 mrg #endif
940 1.1 mrg
941 1.3 mrg #ifndef REG_WORDS_BIG_ENDIAN
942 1.3 mrg #define REG_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
943 1.3 mrg #endif
944 1.3 mrg
945 1.1 mrg
946 1.1 mrg #ifndef TARGET_DEC_EVAL_METHOD
947 1.1 mrg #define TARGET_DEC_EVAL_METHOD 2
948 1.1 mrg #endif
949 1.1 mrg
950 1.1 mrg #ifndef HAS_LONG_COND_BRANCH
951 1.1 mrg #define HAS_LONG_COND_BRANCH 0
952 1.1 mrg #endif
953 1.1 mrg
954 1.1 mrg #ifndef HAS_LONG_UNCOND_BRANCH
955 1.1 mrg #define HAS_LONG_UNCOND_BRANCH 0
956 1.1 mrg #endif
957 1.1 mrg
958 1.1 mrg /* Determine whether __cxa_atexit, rather than atexit, is used to
959 1.1 mrg register C++ destructors for local statics and global objects. */
960 1.1 mrg #ifndef DEFAULT_USE_CXA_ATEXIT
961 1.1 mrg #define DEFAULT_USE_CXA_ATEXIT 0
962 1.1 mrg #endif
963 1.1 mrg
964 1.1 mrg #if GCC_VERSION >= 3000 && defined IN_GCC
965 1.1 mrg /* These old constraint macros shouldn't appear anywhere in a
966 1.1 mrg configuration using MD constraint definitions. */
967 1.1 mrg #endif
968 1.1 mrg
969 1.3 mrg /* Determin whether the target runtime library is Bionic */
970 1.3 mrg #ifndef TARGET_HAS_BIONIC
971 1.3 mrg #define TARGET_HAS_BIONIC 0
972 1.3 mrg #endif
973 1.3 mrg
974 1.1 mrg /* Indicate that CLZ and CTZ are undefined at zero. */
975 1.1 mrg #ifndef CLZ_DEFINED_VALUE_AT_ZERO
976 1.1 mrg #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
977 1.1 mrg #endif
978 1.1 mrg #ifndef CTZ_DEFINED_VALUE_AT_ZERO
979 1.1 mrg #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
980 1.1 mrg #endif
981 1.1 mrg
982 1.1 mrg /* Provide a default value for STORE_FLAG_VALUE. */
983 1.1 mrg #ifndef STORE_FLAG_VALUE
984 1.1 mrg #define STORE_FLAG_VALUE 1
985 1.1 mrg #endif
986 1.1 mrg
987 1.1 mrg /* This macro is used to determine what the largest unit size that
988 1.1 mrg move_by_pieces can use is. */
989 1.1 mrg
990 1.1 mrg /* MOVE_MAX_PIECES is the number of bytes at a time which we can
991 1.1 mrg move efficiently, as opposed to MOVE_MAX which is the maximum
992 1.1 mrg number of bytes we can move with a single instruction. */
993 1.1 mrg
994 1.1 mrg #ifndef MOVE_MAX_PIECES
995 1.1 mrg #define MOVE_MAX_PIECES MOVE_MAX
996 1.1 mrg #endif
997 1.1 mrg
998 1.5 mrg /* STORE_MAX_PIECES is the number of bytes at a time that we can
999 1.5 mrg store efficiently. Due to internal GCC limitations, this is
1000 1.5 mrg MOVE_MAX_PIECES limited by the number of bytes GCC can represent
1001 1.5 mrg for an immediate constant. */
1002 1.5 mrg
1003 1.5 mrg #ifndef STORE_MAX_PIECES
1004 1.5 mrg #define STORE_MAX_PIECES MIN (MOVE_MAX_PIECES, 2 * sizeof (HOST_WIDE_INT))
1005 1.5 mrg #endif
1006 1.5 mrg
1007 1.8 mrg /* Likewise for block comparisons. */
1008 1.8 mrg #ifndef COMPARE_MAX_PIECES
1009 1.8 mrg #define COMPARE_MAX_PIECES MOVE_MAX_PIECES
1010 1.8 mrg #endif
1011 1.8 mrg
1012 1.3 mrg #ifndef MAX_MOVE_MAX
1013 1.3 mrg #define MAX_MOVE_MAX MOVE_MAX
1014 1.3 mrg #endif
1015 1.3 mrg
1016 1.3 mrg #ifndef MIN_UNITS_PER_WORD
1017 1.3 mrg #define MIN_UNITS_PER_WORD UNITS_PER_WORD
1018 1.3 mrg #endif
1019 1.3 mrg
1020 1.3 mrg #ifndef MAX_BITS_PER_WORD
1021 1.3 mrg #define MAX_BITS_PER_WORD BITS_PER_WORD
1022 1.3 mrg #endif
1023 1.3 mrg
1024 1.1 mrg #ifndef STACK_POINTER_OFFSET
1025 1.1 mrg #define STACK_POINTER_OFFSET 0
1026 1.1 mrg #endif
1027 1.1 mrg
1028 1.1 mrg #ifndef LOCAL_REGNO
1029 1.1 mrg #define LOCAL_REGNO(REGNO) 0
1030 1.1 mrg #endif
1031 1.1 mrg
1032 1.5 mrg #ifndef HONOR_REG_ALLOC_ORDER
1033 1.5 mrg #define HONOR_REG_ALLOC_ORDER 0
1034 1.5 mrg #endif
1035 1.5 mrg
1036 1.1 mrg /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
1037 1.1 mrg the stack pointer does not matter. The value is tested only in
1038 1.1 mrg functions that have frame pointers. */
1039 1.1 mrg #ifndef EXIT_IGNORE_STACK
1040 1.1 mrg #define EXIT_IGNORE_STACK 0
1041 1.1 mrg #endif
1042 1.1 mrg
1043 1.1 mrg /* Assume that case vectors are not pc-relative. */
1044 1.1 mrg #ifndef CASE_VECTOR_PC_RELATIVE
1045 1.1 mrg #define CASE_VECTOR_PC_RELATIVE 0
1046 1.1 mrg #endif
1047 1.1 mrg
1048 1.8 mrg /* Force minimum alignment to be able to use the least significant bits
1049 1.8 mrg for distinguishing descriptor addresses from code addresses. */
1050 1.8 mrg #define FUNCTION_ALIGNMENT(ALIGN) \
1051 1.8 mrg (lang_hooks.custom_function_descriptors \
1052 1.8 mrg && targetm.calls.custom_function_descriptors > 0 \
1053 1.8 mrg ? MAX ((ALIGN), \
1054 1.8 mrg 2 * targetm.calls.custom_function_descriptors * BITS_PER_UNIT)\
1055 1.8 mrg : (ALIGN))
1056 1.8 mrg
1057 1.1 mrg /* Assume that trampolines need function alignment. */
1058 1.1 mrg #ifndef TRAMPOLINE_ALIGNMENT
1059 1.8 mrg #define TRAMPOLINE_ALIGNMENT FUNCTION_ALIGNMENT (FUNCTION_BOUNDARY)
1060 1.1 mrg #endif
1061 1.1 mrg
1062 1.1 mrg /* Register mappings for target machines without register windows. */
1063 1.1 mrg #ifndef INCOMING_REGNO
1064 1.1 mrg #define INCOMING_REGNO(N) (N)
1065 1.1 mrg #endif
1066 1.1 mrg
1067 1.1 mrg #ifndef OUTGOING_REGNO
1068 1.1 mrg #define OUTGOING_REGNO(N) (N)
1069 1.1 mrg #endif
1070 1.1 mrg
1071 1.1 mrg #ifndef SHIFT_COUNT_TRUNCATED
1072 1.1 mrg #define SHIFT_COUNT_TRUNCATED 0
1073 1.1 mrg #endif
1074 1.1 mrg
1075 1.1 mrg #ifndef LEGITIMATE_PIC_OPERAND_P
1076 1.1 mrg #define LEGITIMATE_PIC_OPERAND_P(X) 1
1077 1.1 mrg #endif
1078 1.1 mrg
1079 1.1 mrg #ifndef TARGET_MEM_CONSTRAINT
1080 1.1 mrg #define TARGET_MEM_CONSTRAINT 'm'
1081 1.1 mrg #endif
1082 1.1 mrg
1083 1.1 mrg #ifndef REVERSIBLE_CC_MODE
1084 1.1 mrg #define REVERSIBLE_CC_MODE(MODE) 0
1085 1.1 mrg #endif
1086 1.1 mrg
1087 1.1 mrg /* Biggest alignment supported by the object file format of this machine. */
1088 1.1 mrg #ifndef MAX_OFILE_ALIGNMENT
1089 1.1 mrg #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
1090 1.1 mrg #endif
1091 1.1 mrg
1092 1.1 mrg #ifndef FRAME_GROWS_DOWNWARD
1093 1.1 mrg #define FRAME_GROWS_DOWNWARD 0
1094 1.1 mrg #endif
1095 1.1 mrg
1096 1.5 mrg #ifndef RETURN_ADDR_IN_PREVIOUS_FRAME
1097 1.5 mrg #define RETURN_ADDR_IN_PREVIOUS_FRAME 0
1098 1.5 mrg #endif
1099 1.5 mrg
1100 1.1 mrg /* On most machines, the CFA coincides with the first incoming parm. */
1101 1.1 mrg #ifndef ARG_POINTER_CFA_OFFSET
1102 1.1 mrg #define ARG_POINTER_CFA_OFFSET(FNDECL) \
1103 1.1 mrg (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
1104 1.1 mrg #endif
1105 1.1 mrg
1106 1.1 mrg /* On most machines, we use the CFA as DW_AT_frame_base. */
1107 1.1 mrg #ifndef CFA_FRAME_BASE_OFFSET
1108 1.1 mrg #define CFA_FRAME_BASE_OFFSET(FNDECL) 0
1109 1.1 mrg #endif
1110 1.1 mrg
1111 1.1 mrg /* The offset from the incoming value of %sp to the top of the stack frame
1112 1.1 mrg for the current function. */
1113 1.1 mrg #ifndef INCOMING_FRAME_SP_OFFSET
1114 1.1 mrg #define INCOMING_FRAME_SP_OFFSET 0
1115 1.1 mrg #endif
1116 1.1 mrg
1117 1.1 mrg #ifndef HARD_REGNO_NREGS_HAS_PADDING
1118 1.1 mrg #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
1119 1.1 mrg #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
1120 1.1 mrg #endif
1121 1.1 mrg
1122 1.1 mrg #ifndef OUTGOING_REG_PARM_STACK_SPACE
1123 1.1 mrg #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
1124 1.1 mrg #endif
1125 1.1 mrg
1126 1.1 mrg /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
1127 1.1 mrg the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
1128 1.1 mrg effort stack alignment supported by the backend. If the backend
1129 1.1 mrg supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
1130 1.1 mrg MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack
1131 1.1 mrg boundary will limit the maximum guaranteed stack alignment. */
1132 1.1 mrg #ifdef MAX_STACK_ALIGNMENT
1133 1.1 mrg #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
1134 1.1 mrg #else
1135 1.1 mrg #define MAX_STACK_ALIGNMENT STACK_BOUNDARY
1136 1.1 mrg #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
1137 1.1 mrg #endif
1138 1.1 mrg
1139 1.1 mrg #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
1140 1.1 mrg
1141 1.1 mrg #ifndef LOCAL_ALIGNMENT
1142 1.1 mrg #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
1143 1.1 mrg #endif
1144 1.1 mrg
1145 1.1 mrg #ifndef STACK_SLOT_ALIGNMENT
1146 1.1 mrg #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
1147 1.1 mrg ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
1148 1.1 mrg #endif
1149 1.1 mrg
1150 1.1 mrg #ifndef LOCAL_DECL_ALIGNMENT
1151 1.1 mrg #define LOCAL_DECL_ALIGNMENT(DECL) \
1152 1.1 mrg LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
1153 1.1 mrg #endif
1154 1.1 mrg
1155 1.1 mrg #ifndef MINIMUM_ALIGNMENT
1156 1.1 mrg #define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN)
1157 1.1 mrg #endif
1158 1.1 mrg
1159 1.1 mrg /* Alignment value for attribute ((aligned)). */
1160 1.1 mrg #ifndef ATTRIBUTE_ALIGNED_VALUE
1161 1.1 mrg #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
1162 1.1 mrg #endif
1163 1.1 mrg
1164 1.3 mrg #ifndef SLOW_UNALIGNED_ACCESS
1165 1.3 mrg #define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) STRICT_ALIGNMENT
1166 1.1 mrg #endif
1167 1.1 mrg
1168 1.1 mrg /* For most ports anything that evaluates to a constant symbolic
1169 1.1 mrg or integer value is acceptable as a constant address. */
1170 1.1 mrg #ifndef CONSTANT_ADDRESS_P
1171 1.1 mrg #define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
1172 1.1 mrg #endif
1173 1.1 mrg
1174 1.3 mrg #ifndef MAX_FIXED_MODE_SIZE
1175 1.3 mrg #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
1176 1.3 mrg #endif
1177 1.3 mrg
1178 1.3 mrg /* Nonzero if structures and unions should be returned in memory.
1179 1.3 mrg
1180 1.3 mrg This should only be defined if compatibility with another compiler or
1181 1.3 mrg with an ABI is needed, because it results in slower code. */
1182 1.3 mrg
1183 1.3 mrg #ifndef DEFAULT_PCC_STRUCT_RETURN
1184 1.3 mrg #define DEFAULT_PCC_STRUCT_RETURN 1
1185 1.3 mrg #endif
1186 1.3 mrg
1187 1.6 mrg #ifndef PCC_BITFIELD_TYPE_MATTERS
1188 1.6 mrg #define PCC_BITFIELD_TYPE_MATTERS false
1189 1.6 mrg #endif
1190 1.6 mrg
1191 1.6 mrg #ifndef INSN_SETS_ARE_DELAYED
1192 1.6 mrg #define INSN_SETS_ARE_DELAYED(INSN) false
1193 1.6 mrg #endif
1194 1.6 mrg
1195 1.6 mrg #ifndef INSN_REFERENCES_ARE_DELAYED
1196 1.6 mrg #define INSN_REFERENCES_ARE_DELAYED(INSN) false
1197 1.6 mrg #endif
1198 1.6 mrg
1199 1.6 mrg #ifndef NO_FUNCTION_CSE
1200 1.6 mrg #define NO_FUNCTION_CSE false
1201 1.6 mrg #endif
1202 1.6 mrg
1203 1.6 mrg #ifndef HARD_REGNO_RENAME_OK
1204 1.6 mrg #define HARD_REGNO_RENAME_OK(FROM, TO) true
1205 1.6 mrg #endif
1206 1.6 mrg
1207 1.6 mrg #ifndef EPILOGUE_USES
1208 1.6 mrg #define EPILOGUE_USES(REG) false
1209 1.6 mrg #endif
1210 1.6 mrg
1211 1.6 mrg #ifndef ARGS_GROW_DOWNWARD
1212 1.6 mrg #define ARGS_GROW_DOWNWARD 0
1213 1.6 mrg #endif
1214 1.6 mrg
1215 1.6 mrg #ifndef STACK_GROWS_DOWNWARD
1216 1.6 mrg #define STACK_GROWS_DOWNWARD 0
1217 1.6 mrg #endif
1218 1.6 mrg
1219 1.6 mrg #ifndef STACK_PUSH_CODE
1220 1.6 mrg #if STACK_GROWS_DOWNWARD
1221 1.6 mrg #define STACK_PUSH_CODE PRE_DEC
1222 1.6 mrg #else
1223 1.6 mrg #define STACK_PUSH_CODE PRE_INC
1224 1.6 mrg #endif
1225 1.6 mrg #endif
1226 1.6 mrg
1227 1.6 mrg /* Default value for flag_pie when flag_pie is initialized to -1:
1228 1.6 mrg --enable-default-pie: Default flag_pie to -fPIE.
1229 1.6 mrg --disable-default-pie: Default flag_pie to 0.
1230 1.6 mrg */
1231 1.6 mrg #ifdef ENABLE_DEFAULT_PIE
1232 1.6 mrg # ifndef DEFAULT_FLAG_PIE
1233 1.6 mrg # define DEFAULT_FLAG_PIE 2
1234 1.6 mrg # endif
1235 1.6 mrg #else
1236 1.6 mrg # define DEFAULT_FLAG_PIE 0
1237 1.6 mrg #endif
1238 1.6 mrg
1239 1.6 mrg #ifndef SWITCHABLE_TARGET
1240 1.6 mrg #define SWITCHABLE_TARGET 0
1241 1.6 mrg #endif
1242 1.6 mrg
1243 1.6 mrg /* If the target supports integers that are wider than two
1244 1.6 mrg HOST_WIDE_INTs on the host compiler, then the target should define
1245 1.6 mrg TARGET_SUPPORTS_WIDE_INT and make the appropriate fixups.
1246 1.6 mrg Otherwise the compiler really is not robust. */
1247 1.6 mrg #ifndef TARGET_SUPPORTS_WIDE_INT
1248 1.6 mrg #define TARGET_SUPPORTS_WIDE_INT 0
1249 1.6 mrg #endif
1250 1.6 mrg
1251 1.6 mrg #ifndef SHORT_IMMEDIATES_SIGN_EXTEND
1252 1.6 mrg #define SHORT_IMMEDIATES_SIGN_EXTEND 0
1253 1.6 mrg #endif
1254 1.6 mrg
1255 1.6 mrg #ifndef WORD_REGISTER_OPERATIONS
1256 1.6 mrg #define WORD_REGISTER_OPERATIONS 0
1257 1.6 mrg #endif
1258 1.6 mrg
1259 1.8 mrg #ifndef LOAD_EXTEND_OP
1260 1.8 mrg #define LOAD_EXTEND_OP(M) UNKNOWN
1261 1.8 mrg #endif
1262 1.8 mrg
1263 1.6 mrg #ifndef CONSTANT_ALIGNMENT
1264 1.6 mrg #define CONSTANT_ALIGNMENT(EXP, ALIGN) ALIGN
1265 1.6 mrg #endif
1266 1.6 mrg
1267 1.6 mrg #ifndef INITIAL_FRAME_ADDRESS_RTX
1268 1.6 mrg #define INITIAL_FRAME_ADDRESS_RTX NULL
1269 1.6 mrg #endif
1270 1.6 mrg
1271 1.6 mrg #ifndef SETUP_FRAME_ADDRESSES
1272 1.6 mrg #define SETUP_FRAME_ADDRESSES() do { } while (0)
1273 1.6 mrg #endif
1274 1.6 mrg
1275 1.6 mrg #ifndef DYNAMIC_CHAIN_ADDRESS
1276 1.6 mrg #define DYNAMIC_CHAIN_ADDRESS(x) (x)
1277 1.6 mrg #endif
1278 1.6 mrg
1279 1.6 mrg #ifndef FRAME_ADDR_RTX
1280 1.6 mrg #define FRAME_ADDR_RTX(x) (x)
1281 1.6 mrg #endif
1282 1.6 mrg
1283 1.6 mrg #ifndef REVERSE_CONDITION
1284 1.6 mrg #define REVERSE_CONDITION(code, mode) reverse_condition (code)
1285 1.6 mrg #endif
1286 1.6 mrg
1287 1.6 mrg #ifndef TARGET_PECOFF
1288 1.6 mrg #define TARGET_PECOFF 0
1289 1.6 mrg #endif
1290 1.6 mrg
1291 1.6 mrg #ifndef EH_RETURN_HANDLER_RTX
1292 1.6 mrg #define EH_RETURN_HANDLER_RTX NULL
1293 1.6 mrg #endif
1294 1.6 mrg
1295 1.3 mrg #ifdef GCC_INSN_FLAGS_H
1296 1.3 mrg /* Dependent default target macro definitions
1297 1.3 mrg
1298 1.3 mrg This section of defaults.h defines target macros that depend on generated
1299 1.3 mrg headers. This is a bit awkward: We want to put all default definitions
1300 1.3 mrg for target macros in defaults.h, but some of the defaults depend on the
1301 1.3 mrg HAVE_* flags defines of insn-flags.h. But insn-flags.h is not always
1302 1.3 mrg included by files that do include defaults.h.
1303 1.3 mrg
1304 1.3 mrg Fortunately, the default macro definitions that depend on the HAVE_*
1305 1.3 mrg macros are also the ones that will only be used inside GCC itself, i.e.
1306 1.3 mrg not in the gen* programs or in target objects like libgcc.
1307 1.3 mrg
1308 1.3 mrg Obviously, it would be best to keep this section of defaults.h as small
1309 1.3 mrg as possible, by converting the macros defined below to target hooks or
1310 1.3 mrg functions.
1311 1.3 mrg */
1312 1.3 mrg
1313 1.3 mrg /* The default branch cost is 1. */
1314 1.3 mrg #ifndef BRANCH_COST
1315 1.3 mrg #define BRANCH_COST(speed_p, predictable_p) 1
1316 1.3 mrg #endif
1317 1.3 mrg
1318 1.3 mrg /* If a memory-to-memory move would take MOVE_RATIO or more simple
1319 1.3 mrg move-instruction sequences, we will do a movmem or libcall instead. */
1320 1.3 mrg
1321 1.3 mrg #ifndef MOVE_RATIO
1322 1.3 mrg #if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
1323 1.3 mrg #define MOVE_RATIO(speed) 2
1324 1.3 mrg #else
1325 1.3 mrg /* If we are optimizing for space (-Os), cut down the default move ratio. */
1326 1.3 mrg #define MOVE_RATIO(speed) ((speed) ? 15 : 3)
1327 1.3 mrg #endif
1328 1.3 mrg #endif
1329 1.3 mrg
1330 1.3 mrg /* If a clear memory operation would take CLEAR_RATIO or more simple
1331 1.3 mrg move-instruction sequences, we will do a setmem or libcall instead. */
1332 1.3 mrg
1333 1.3 mrg #ifndef CLEAR_RATIO
1334 1.3 mrg #if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti)
1335 1.3 mrg #define CLEAR_RATIO(speed) 2
1336 1.3 mrg #else
1337 1.3 mrg /* If we are optimizing for space, cut down the default clear ratio. */
1338 1.3 mrg #define CLEAR_RATIO(speed) ((speed) ? 15 :3)
1339 1.3 mrg #endif
1340 1.3 mrg #endif
1341 1.3 mrg
1342 1.3 mrg /* If a memory set (to value other than zero) operation would take
1343 1.3 mrg SET_RATIO or more simple move-instruction sequences, we will do a movmem
1344 1.3 mrg or libcall instead. */
1345 1.3 mrg #ifndef SET_RATIO
1346 1.5 mrg #define SET_RATIO(speed) MOVE_RATIO (speed)
1347 1.3 mrg #endif
1348 1.3 mrg
1349 1.3 mrg /* Supply a default definition for FUNCTION_ARG_PADDING:
1350 1.3 mrg usually pad upward, but pad short args downward on
1351 1.3 mrg big-endian machines. */
1352 1.3 mrg
1353 1.3 mrg #define DEFAULT_FUNCTION_ARG_PADDING(MODE, TYPE) \
1354 1.3 mrg (! BYTES_BIG_ENDIAN \
1355 1.3 mrg ? upward \
1356 1.3 mrg : (((MODE) == BLKmode \
1357 1.3 mrg ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \
1358 1.3 mrg && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \
1359 1.3 mrg : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \
1360 1.3 mrg ? downward : upward))
1361 1.3 mrg
1362 1.3 mrg #ifndef FUNCTION_ARG_PADDING
1363 1.3 mrg #define FUNCTION_ARG_PADDING(MODE, TYPE) \
1364 1.3 mrg DEFAULT_FUNCTION_ARG_PADDING ((MODE), (TYPE))
1365 1.3 mrg #endif
1366 1.3 mrg
1367 1.3 mrg /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
1368 1.3 mrg Normally move_insn, so Pmode stack pointer. */
1369 1.3 mrg
1370 1.3 mrg #ifndef STACK_SAVEAREA_MODE
1371 1.3 mrg #define STACK_SAVEAREA_MODE(LEVEL) Pmode
1372 1.3 mrg #endif
1373 1.3 mrg
1374 1.3 mrg /* Supply a default definition of STACK_SIZE_MODE for
1375 1.3 mrg allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */
1376 1.3 mrg
1377 1.3 mrg #ifndef STACK_SIZE_MODE
1378 1.3 mrg #define STACK_SIZE_MODE word_mode
1379 1.3 mrg #endif
1380 1.3 mrg
1381 1.6 mrg /* Default value for flag_stack_protect when flag_stack_protect is initialized to -1:
1382 1.6 mrg --enable-default-ssp: Default flag_stack_protect to -fstack-protector-strong.
1383 1.6 mrg --disable-default-ssp: Default flag_stack_protect to 0.
1384 1.6 mrg */
1385 1.6 mrg #ifdef ENABLE_DEFAULT_SSP
1386 1.6 mrg # ifndef DEFAULT_FLAG_SSP
1387 1.6 mrg # define DEFAULT_FLAG_SSP 3
1388 1.6 mrg # endif
1389 1.6 mrg #else
1390 1.6 mrg # define DEFAULT_FLAG_SSP 0
1391 1.6 mrg #endif
1392 1.6 mrg
1393 1.3 mrg /* Provide default values for the macros controlling stack checking. */
1394 1.3 mrg
1395 1.3 mrg /* The default is neither full builtin stack checking... */
1396 1.3 mrg #ifndef STACK_CHECK_BUILTIN
1397 1.3 mrg #define STACK_CHECK_BUILTIN 0
1398 1.3 mrg #endif
1399 1.3 mrg
1400 1.3 mrg /* ...nor static builtin stack checking. */
1401 1.3 mrg #ifndef STACK_CHECK_STATIC_BUILTIN
1402 1.3 mrg #define STACK_CHECK_STATIC_BUILTIN 0
1403 1.3 mrg #endif
1404 1.3 mrg
1405 1.3 mrg /* The default interval is one page (4096 bytes). */
1406 1.3 mrg #ifndef STACK_CHECK_PROBE_INTERVAL_EXP
1407 1.3 mrg #define STACK_CHECK_PROBE_INTERVAL_EXP 12
1408 1.3 mrg #endif
1409 1.3 mrg
1410 1.3 mrg /* The default is not to move the stack pointer. */
1411 1.3 mrg #ifndef STACK_CHECK_MOVING_SP
1412 1.3 mrg #define STACK_CHECK_MOVING_SP 0
1413 1.3 mrg #endif
1414 1.3 mrg
1415 1.3 mrg /* This is a kludge to try to capture the discrepancy between the old
1416 1.3 mrg mechanism (generic stack checking) and the new mechanism (static
1417 1.3 mrg builtin stack checking). STACK_CHECK_PROTECT needs to be bumped
1418 1.3 mrg for the latter because part of the protection area is effectively
1419 1.3 mrg included in STACK_CHECK_MAX_FRAME_SIZE for the former. */
1420 1.3 mrg #ifdef STACK_CHECK_PROTECT
1421 1.3 mrg #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
1422 1.3 mrg #else
1423 1.3 mrg #define STACK_OLD_CHECK_PROTECT \
1424 1.6 mrg (!global_options.x_flag_exceptions \
1425 1.3 mrg ? 75 * UNITS_PER_WORD \
1426 1.6 mrg : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
1427 1.6 mrg ? 4 * 1024 \
1428 1.6 mrg : 8 * 1024)
1429 1.3 mrg #endif
1430 1.3 mrg
1431 1.3 mrg /* Minimum amount of stack required to recover from an anticipated stack
1432 1.3 mrg overflow detection. The default value conveys an estimate of the amount
1433 1.3 mrg of stack required to propagate an exception. */
1434 1.3 mrg #ifndef STACK_CHECK_PROTECT
1435 1.3 mrg #define STACK_CHECK_PROTECT \
1436 1.6 mrg (!global_options.x_flag_exceptions \
1437 1.6 mrg ? 4 * 1024 \
1438 1.6 mrg : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
1439 1.6 mrg ? 8 * 1024 \
1440 1.6 mrg : 12 * 1024)
1441 1.3 mrg #endif
1442 1.3 mrg
1443 1.3 mrg /* Make the maximum frame size be the largest we can and still only need
1444 1.3 mrg one probe per function. */
1445 1.3 mrg #ifndef STACK_CHECK_MAX_FRAME_SIZE
1446 1.3 mrg #define STACK_CHECK_MAX_FRAME_SIZE \
1447 1.3 mrg ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
1448 1.3 mrg #endif
1449 1.3 mrg
1450 1.3 mrg /* This is arbitrary, but should be large enough everywhere. */
1451 1.3 mrg #ifndef STACK_CHECK_FIXED_FRAME_SIZE
1452 1.3 mrg #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD)
1453 1.3 mrg #endif
1454 1.3 mrg
1455 1.3 mrg /* Provide a reasonable default for the maximum size of an object to
1456 1.3 mrg allocate in the fixed frame. We may need to be able to make this
1457 1.3 mrg controllable by the user at some point. */
1458 1.3 mrg #ifndef STACK_CHECK_MAX_VAR_SIZE
1459 1.3 mrg #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
1460 1.3 mrg #endif
1461 1.3 mrg
1462 1.3 mrg /* By default, the C++ compiler will use function addresses in the
1463 1.3 mrg vtable entries. Setting this nonzero tells the compiler to use
1464 1.3 mrg function descriptors instead. The value of this macro says how
1465 1.3 mrg many words wide the descriptor is (normally 2). It is assumed
1466 1.3 mrg that the address of a function descriptor may be treated as a
1467 1.3 mrg pointer to a function. */
1468 1.3 mrg #ifndef TARGET_VTABLE_USES_DESCRIPTORS
1469 1.3 mrg #define TARGET_VTABLE_USES_DESCRIPTORS 0
1470 1.3 mrg #endif
1471 1.3 mrg
1472 1.6 mrg #endif /* GCC_INSN_FLAGS_H */
1473 1.3 mrg
1474 1.6 mrg #ifndef DWARF_GNAT_ENCODINGS_DEFAULT
1475 1.6 mrg #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
1476 1.5 mrg #endif
1477 1.5 mrg
1478 1.1 mrg #endif /* ! GCC_DEFAULTS_H */
1479