]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/defaults.h
target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h.
[thirdparty/gcc.git] / gcc / defaults.h
CommitLineData
eff01bb6 1/* Definitions of various defaults for tm.h macros.
ad616de1 2 Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
677f3fa8 3 2005, 2007, 2008, 2009, 2010, 2011
d8ea8f28 4 Free Software Foundation, Inc.
b33c316c 5 Contributed by Ron Guilmette (rfg@monkeys.com)
c53a8ab6 6
1322177d 7This file is part of GCC.
c53a8ab6 8
1322177d
LB
9GCC is free software; you can redistribute it and/or modify it under
10the terms of the GNU General Public License as published by the Free
9dcd6f09 11Software Foundation; either version 3, or (at your option) any later
1322177d 12version.
c53a8ab6 13
1322177d
LB
14GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17for more details.
c53a8ab6 18
748086b7
JJ
19Under Section 7 of GPL version 3, you are granted additional
20permissions described in the GCC Runtime Library Exception, version
213.1, as published by the Free Software Foundation.
22
23You should have received a copy of the GNU General Public License and
24a copy of the GCC Runtime Library Exception along with this program;
25see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
9dcd6f09 26<http://www.gnu.org/licenses/>. */
c53a8ab6 27
d8ea8f28
ZW
28#ifndef GCC_DEFAULTS_H
29#define GCC_DEFAULTS_H
30
4977bab6
ZW
31/* Store in OUTPUT a string (made with alloca) containing an
32 assembler-name for a local static variable or function named NAME.
7b73db04
CH
33 LABELNO is an integer which is different for each call. */
34
4977bab6
ZW
35#ifndef ASM_PN_FORMAT
36# ifndef NO_DOT_IN_LABEL
37# define ASM_PN_FORMAT "%s.%lu"
38# else
39# ifndef NO_DOLLAR_IN_LABEL
40# define ASM_PN_FORMAT "%s$%lu"
41# else
42# define ASM_PN_FORMAT "__%s_%lu"
43# endif
44# endif
45#endif /* ! ASM_PN_FORMAT */
46
7b73db04 47#ifndef ASM_FORMAT_PRIVATE_NAME
4977bab6
ZW
48# define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
49 do { const char *const name_ = (NAME); \
28dab132
BI
50 char *const output_ = (OUTPUT) = \
51 (char *) alloca (strlen (name_) + 32); \
4977bab6 52 sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
7b73db04
CH
53 } while (0)
54#endif
55
e0a21ab9 56/* Choose a reasonable default for ASM_OUTPUT_ASCII. */
c53a8ab6
RS
57
58#ifndef ASM_OUTPUT_ASCII
59#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
60 do { \
61 FILE *_hide_asm_out_file = (MYFILE); \
47ee9bcb 62 const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
c53a8ab6
RS
63 int _hide_thissize = (MYLENGTH); \
64 { \
65 FILE *asm_out_file = _hide_asm_out_file; \
47ee9bcb 66 const unsigned char *p = _hide_p; \
c53a8ab6
RS
67 int thissize = _hide_thissize; \
68 int i; \
69 fprintf (asm_out_file, "\t.ascii \""); \
70 \
71 for (i = 0; i < thissize; i++) \
72 { \
b3694847 73 int c = p[i]; \
c53a8ab6
RS
74 if (c == '\"' || c == '\\') \
75 putc ('\\', asm_out_file); \
5f6d3823 76 if (ISPRINT(c)) \
c53a8ab6
RS
77 putc (c, asm_out_file); \
78 else \
79 { \
80 fprintf (asm_out_file, "\\%o", c); \
81 /* After an octal-escape, if a digit follows, \
82 terminate one string constant and start another. \
8aeea6e6 83 The VAX assembler fails to stop reading the escape \
c53a8ab6
RS
84 after three digits, so this is the only way we \
85 can get it to parse the data properly. */ \
d07ecc3b 86 if (i < thissize - 1 && ISDIGIT(p[i + 1])) \
c53a8ab6
RS
87 fprintf (asm_out_file, "\"\n\t.ascii \""); \
88 } \
89 } \
90 fprintf (asm_out_file, "\"\n"); \
91 } \
92 } \
93 while (0)
94#endif
d0d4af87 95
650f773a
JW
96/* This is how we tell the assembler to equate two values. */
97#ifdef SET_ASM_OP
98#ifndef ASM_OUTPUT_DEF
99#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
e8638df0 100 do { fprintf ((FILE), "%s", SET_ASM_OP); \
650f773a
JW
101 assemble_name (FILE, LABEL1); \
102 fprintf (FILE, ","); \
103 assemble_name (FILE, LABEL2); \
104 fprintf (FILE, "\n"); \
105 } while (0)
106#endif
107#endif
daefd78b 108
ba885ec5
NS
109#ifndef IFUNC_ASM_TYPE
110#define IFUNC_ASM_TYPE "gnu_indirect_function"
111#endif
112
f1c26cad
RO
113#ifndef TLS_COMMON_ASM_OP
114#define TLS_COMMON_ASM_OP ".tls_common"
115#endif
116
a13e882c
JJ
117#if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON)
118#define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \
119 do \
120 { \
f1c26cad 121 fprintf ((FILE), "\t%s\t", TLS_COMMON_ASM_OP); \
a13e882c
JJ
122 assemble_name ((FILE), (NAME)); \
123 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
124 (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \
125 } \
126 while (0)
127#endif
128
083b6717
JDA
129/* Decide whether to defer emitting the assembler output for an equate
130 of two values. The default is to not defer output. */
131#ifndef TARGET_DEFERRED_OUTPUT_DEFS
132#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
133#endif
134
4ad5e05d 135/* This is how to output the definition of a user-level label named
135a687e 136 NAME, such as the label on variable NAME. */
4ad5e05d
KG
137
138#ifndef ASM_OUTPUT_LABEL
139#define ASM_OUTPUT_LABEL(FILE,NAME) \
140 do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
141#endif
142
135a687e
KT
143/* This is how to output the definition of a user-level label named
144 NAME, such as the label on a function. */
145
146#ifndef ASM_OUTPUT_FUNCTION_LABEL
147#define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \
148 ASM_OUTPUT_LABEL ((FILE), (NAME))
149#endif
150
57829bc4
MM
151/* Output the definition of a compiler-generated label named NAME. */
152#ifndef ASM_OUTPUT_INTERNAL_LABEL
153#define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \
154 do { \
155 assemble_name_raw ((FILE), (NAME)); \
156 fputs (":\n", (FILE)); \
157 } while (0)
158#endif
159
81d77cda
RK
160/* This is how to output a reference to a user-level label named NAME. */
161
162#ifndef ASM_OUTPUT_LABELREF
19283265 163#define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
81d77cda
RK
164#endif
165
8215347e
JW
166/* Allow target to print debug info labels specially. This is useful for
167 VLIW targets, since debug info labels should go into the middle of
168 instruction bundles instead of breaking them. */
169
170#ifndef ASM_OUTPUT_DEBUG_LABEL
171#define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
4977bab6 172 (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
8215347e
JW
173#endif
174
3aa8ab7b 175/* This is how we tell the assembler that a symbol is weak. */
20c93f7c
RO
176#ifndef ASM_OUTPUT_WEAK_ALIAS
177#if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
3aa8ab7b
L
178#define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
179 do \
180 { \
181 ASM_WEAKEN_LABEL (STREAM, NAME); \
182 if (VALUE) \
183 ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
184 } \
185 while (0)
a0203ca7
AO
186#endif
187#endif
188
189/* This is how we tell the assembler that a symbol is a weak alias to
190 another symbol that doesn't require the other symbol to be defined.
191 Uses of the former will turn into weak uses of the latter, i.e.,
192 uses that, in case the latter is undefined, will not cause errors,
193 and will add it to the symbol table as weak undefined. However, if
194 the latter is referenced directly, a strong reference prevails. */
195#ifndef ASM_OUTPUT_WEAKREF
196#if defined HAVE_GAS_WEAKREF
ff2d10c1 197#define ASM_OUTPUT_WEAKREF(FILE, DECL, NAME, VALUE) \
a0203ca7
AO
198 do \
199 { \
200 fprintf ((FILE), "\t.weakref\t"); \
201 assemble_name ((FILE), (NAME)); \
202 fprintf ((FILE), ","); \
203 assemble_name ((FILE), (VALUE)); \
204 fprintf ((FILE), "\n"); \
205 } \
206 while (0)
3aa8ab7b 207#endif
20c93f7c 208#endif
3aa8ab7b 209
2be2ac70
ZW
210/* How to emit a .type directive. */
211#ifndef ASM_OUTPUT_TYPE_DIRECTIVE
212#if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
213#define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
214 do \
215 { \
216 fputs (TYPE_ASM_OP, STREAM); \
217 assemble_name (STREAM, NAME); \
218 fputs (", ", STREAM); \
219 fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
220 putc ('\n', STREAM); \
221 } \
222 while (0)
223#endif
224#endif
225
226/* How to emit a .size directive. */
227#ifndef ASM_OUTPUT_SIZE_DIRECTIVE
228#ifdef SIZE_ASM_OP
229#define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
230 do \
231 { \
232 HOST_WIDE_INT size_ = (SIZE); \
233 fputs (SIZE_ASM_OP, STREAM); \
234 assemble_name (STREAM, NAME); \
90ff44cf 235 fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
2be2ac70
ZW
236 } \
237 while (0)
238
99086d59 239#define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
2be2ac70
ZW
240 do \
241 { \
242 fputs (SIZE_ASM_OP, STREAM); \
99086d59
ZW
243 assemble_name (STREAM, NAME); \
244 fputs (", .-", STREAM); \
245 assemble_name (STREAM, NAME); \
2be2ac70
ZW
246 putc ('\n', STREAM); \
247 } \
248 while (0)
249
250#endif
251#endif
252
74b90fe2
JDA
253/* This determines whether or not we support weak symbols. SUPPORTS_WEAK
254 must be a preprocessor constant. */
daefd78b 255#ifndef SUPPORTS_WEAK
79c4e63f 256#if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
daefd78b
JM
257#define SUPPORTS_WEAK 1
258#else
259#define SUPPORTS_WEAK 0
260#endif
261#endif
a6ab3aad 262
74b90fe2
JDA
263/* This determines whether or not we support weak symbols during target
264 code generation. TARGET_SUPPORTS_WEAK can be any valid C expression. */
265#ifndef TARGET_SUPPORTS_WEAK
266#define TARGET_SUPPORTS_WEAK (SUPPORTS_WEAK)
267#endif
268
ed5ef2e4
CC
269/* This determines whether or not we support the discriminator
270 attribute in the .loc directive. */
271#ifndef SUPPORTS_DISCRIMINATOR
272#ifdef HAVE_GAS_DISCRIMINATOR
273#define SUPPORTS_DISCRIMINATOR 1
274#else
275#define SUPPORTS_DISCRIMINATOR 0
276#endif
277#endif
278
1ca894a0
MM
279/* This determines whether or not we support link-once semantics. */
280#ifndef SUPPORTS_ONE_ONLY
281#ifdef MAKE_DECL_ONE_ONLY
282#define SUPPORTS_ONE_ONLY 1
283#else
284#define SUPPORTS_ONE_ONLY 0
285#endif
286#endif
287
0524c91d
MA
288/* This determines whether weak symbols must be left out of a static
289 archive's table of contents. Defining this macro to be nonzero has
290 the consequence that certain symbols will not be made weak that
291 otherwise would be. The C++ ABI requires this macro to be zero;
8c27b7d4 292 see the documentation. */
0524c91d
MA
293#ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
294#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
4746cf84
MA
295#endif
296
ea4b7848 297/* This determines whether or not we need linkonce unwind information. */
4746cf84
MA
298#ifndef TARGET_USES_WEAK_UNWIND_INFO
299#define TARGET_USES_WEAK_UNWIND_INFO 0
300#endif
301
d48fd218
ZW
302/* By default, there is no prefix on user-defined symbols. */
303#ifndef USER_LABEL_PREFIX
304#define USER_LABEL_PREFIX ""
305#endif
306
8f08ea1e 307/* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
f676971a 308 provide a weak attribute. Else define it to nothing.
8f08ea1e 309
d02af173 310 This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
8f08ea1e
L
311 not available at that time.
312
313 Note, this is only for use by target files which we know are to be
314 compiled by GCC. */
315#ifndef TARGET_ATTRIBUTE_WEAK
316# if SUPPORTS_WEAK
317# define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
318# else
319# define TARGET_ATTRIBUTE_WEAK
320# endif
321#endif
322
4746cf84 323/* Determines whether we may use common symbols to represent one-only
9cf737f8 324 semantics (a.k.a. "vague linkage"). */
4746cf84
MA
325#ifndef USE_COMMON_FOR_ONE_ONLY
326# define USE_COMMON_FOR_ONE_ONLY 1
327#endif
328
15072eb1
ZW
329/* By default we can assume that all global symbols are in one namespace,
330 across all shared libraries. */
331#ifndef MULTIPLE_SYMBOL_SPACES
332# define MULTIPLE_SYMBOL_SPACES 0
333#endif
4746cf84 334
ea4f1fce
JO
335/* If the target supports init_priority C++ attribute, give
336 SUPPORTS_INIT_PRIORITY a nonzero value. */
337#ifndef SUPPORTS_INIT_PRIORITY
338#define SUPPORTS_INIT_PRIORITY 1
339#endif /* SUPPORTS_INIT_PRIORITY */
340
5897739e
JO
341/* If duplicate library search directories can be removed from a
342 linker command without changing the linker's semantics, give this
343 symbol a nonzero. */
344#ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
345#define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0
346#endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */
347
a6ab3aad
JM
348/* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
349 the rest of the DWARF 2 frame unwind support is also provided. */
f0a0390e 350#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
0021b564 351#define DWARF2_UNWIND_INFO 1
a6ab3aad 352#endif
b366352b 353
2cc07db4
RH
354/* If we have named sections, and we're using crtstuff to run ctors,
355 use them for registering eh frame information. */
bc2a8f08
RH
356#if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
357 && !defined(EH_FRAME_IN_DATA_SECTION)
7c262518
RH
358#ifndef EH_FRAME_SECTION_NAME
359#define EH_FRAME_SECTION_NAME ".eh_frame"
360#endif
31cf0144
JM
361#endif
362
1a35e62d
MM
363/* On many systems, different EH table encodings are used under
364 difference circumstances. Some will require runtime relocations;
365 some will not. For those that do not require runtime relocations,
366 we would like to make the table read-only. However, since the
367 read-only tables may need to be combined with read-write tables
368 that do require runtime relocation, it is not safe to make the
369 tables read-only unless the linker will merge read-only and
370 read-write sections into a single read-write section. If your
371 linker does not have this ability, but your system is such that no
372 encoding used with non-PIC code will ever require a runtime
373 relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
374 your target configuration file. */
375#ifndef EH_TABLES_CAN_BE_READ_ONLY
376#ifdef HAVE_LD_RO_RW_SECTION_MIXING
377#define EH_TABLES_CAN_BE_READ_ONLY 1
378#else
379#define EH_TABLES_CAN_BE_READ_ONLY 0
380#endif
381#endif
382
6351543d
AG
383/* If we have named section and we support weak symbols, then use the
384 .jcr section for recording java classes which need to be registered
385 at program start-up time. */
386#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
387#ifndef JCR_SECTION_NAME
388#define JCR_SECTION_NAME ".jcr"
389#endif
390#endif
391
adb35797 392/* This decision to use a .jcr section can be overridden by defining
e50e6b88
DS
393 USE_JCR_SECTION to 0 in target file. This is necessary if target
394 can define JCR_SECTION_NAME but does not have crtstuff or
395 linker support for .jcr section. */
396#ifndef TARGET_USE_JCR_SECTION
397#ifdef JCR_SECTION_NAME
398#define TARGET_USE_JCR_SECTION 1
399#else
400#define TARGET_USE_JCR_SECTION 0
401#endif
402#endif
403
c478efd1
GDR
404/* Number of hardware registers that go into the DWARF-2 unwind info.
405 If not defined, equals FIRST_PSEUDO_REGISTER */
406
407#ifndef DWARF_FRAME_REGISTERS
408#define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
409#endif
d8ea8f28 410
4617e3b5
KG
411/* How to renumber registers for dbx and gdb. If not defined, assume
412 no renumbering is necessary. */
413
414#ifndef DBX_REGISTER_NUMBER
415#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
416#endif
417
d8ea8f28
ZW
418/* Default sizes for base C types. If the sizes are different for
419 your target, you should override these values by defining the
420 appropriate symbols in your tm.h file. */
421
5c60f03d
KG
422#ifndef BITS_PER_UNIT
423#define BITS_PER_UNIT 8
424#endif
425
e81dd381
KG
426#ifndef BITS_PER_WORD
427#define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
428#endif
429
d8ea8f28
ZW
430#ifndef CHAR_TYPE_SIZE
431#define CHAR_TYPE_SIZE BITS_PER_UNIT
432#endif
433
609688f3
JM
434#ifndef BOOL_TYPE_SIZE
435/* `bool' has size and alignment `1', on almost all platforms. */
436#define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
437#endif
438
d8ea8f28
ZW
439#ifndef SHORT_TYPE_SIZE
440#define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
441#endif
442
443#ifndef INT_TYPE_SIZE
444#define INT_TYPE_SIZE BITS_PER_WORD
445#endif
446
447#ifndef LONG_TYPE_SIZE
448#define LONG_TYPE_SIZE BITS_PER_WORD
449#endif
450
451#ifndef LONG_LONG_TYPE_SIZE
452#define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
453#endif
454
455#ifndef WCHAR_TYPE_SIZE
456#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
457#endif
458
d8ea8f28
ZW
459#ifndef FLOAT_TYPE_SIZE
460#define FLOAT_TYPE_SIZE BITS_PER_WORD
461#endif
462
463#ifndef DOUBLE_TYPE_SIZE
464#define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
465#endif
466
467#ifndef LONG_DOUBLE_TYPE_SIZE
468#define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
469#endif
470
9a8ce21f
JG
471#ifndef DECIMAL32_TYPE_SIZE
472#define DECIMAL32_TYPE_SIZE 32
b8698a0f 473#endif
9a8ce21f 474
b8698a0f 475#ifndef DECIMAL64_TYPE_SIZE
9a8ce21f 476#define DECIMAL64_TYPE_SIZE 64
b8698a0f 477#endif
9a8ce21f
JG
478
479#ifndef DECIMAL128_TYPE_SIZE
480#define DECIMAL128_TYPE_SIZE 128
481#endif
482
325217ed
CF
483#ifndef SHORT_FRACT_TYPE_SIZE
484#define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT
485#endif
486
487#ifndef FRACT_TYPE_SIZE
488#define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2)
489#endif
490
491#ifndef LONG_FRACT_TYPE_SIZE
492#define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4)
493#endif
494
495#ifndef LONG_LONG_FRACT_TYPE_SIZE
496#define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8)
497#endif
498
499#ifndef SHORT_ACCUM_TYPE_SIZE
500#define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2)
501#endif
502
503#ifndef ACCUM_TYPE_SIZE
504#define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2)
505#endif
506
507#ifndef LONG_ACCUM_TYPE_SIZE
508#define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2)
509#endif
510
511#ifndef LONG_LONG_ACCUM_TYPE_SIZE
512#define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2)
513#endif
514
1ffc7157
FXC
515/* We let tm.h override the types used here, to handle trivial differences
516 such as the choice of unsigned int or long unsigned int for size_t.
517 When machines start needing nontrivial differences in the size type,
518 it would be best to do something here to figure out automatically
519 from other information what type to use. */
520
521#ifndef SIZE_TYPE
522#define SIZE_TYPE "long unsigned int"
523#endif
524
525#ifndef PID_TYPE
526#define PID_TYPE "int"
527#endif
528
529/* If GCC knows the exact uint_least16_t and uint_least32_t types from
530 <stdint.h>, use them for char16_t and char32_t. Otherwise, use
531 these guesses; getting the wrong type of a given width will not
532 affect C++ name mangling because in C++ these are distinct types
533 not typedefs. */
534
535#ifdef UINT_LEAST16_TYPE
536#define CHAR16_TYPE UINT_LEAST16_TYPE
537#else
538#define CHAR16_TYPE "short unsigned int"
539#endif
540
541#ifdef UINT_LEAST32_TYPE
542#define CHAR32_TYPE UINT_LEAST32_TYPE
543#else
544#define CHAR32_TYPE "unsigned int"
545#endif
546
547#ifndef WCHAR_TYPE
548#define WCHAR_TYPE "int"
549#endif
550
551/* WCHAR_TYPE gets overridden by -fshort-wchar. */
552#define MODIFIED_WCHAR_TYPE \
553 (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
554
555#ifndef PTRDIFF_TYPE
556#define PTRDIFF_TYPE "long int"
557#endif
558
559#ifndef WINT_TYPE
560#define WINT_TYPE "unsigned int"
561#endif
562
563#ifndef INTMAX_TYPE
564#define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
565 ? "int" \
566 : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
567 ? "long int" \
568 : "long long int"))
569#endif
570
571#ifndef UINTMAX_TYPE
572#define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
573 ? "unsigned int" \
574 : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
575 ? "long unsigned int" \
576 : "long long unsigned int"))
577#endif
578
579
580/* There are no default definitions of these <stdint.h> types. */
581
582#ifndef SIG_ATOMIC_TYPE
583#define SIG_ATOMIC_TYPE ((const char *) NULL)
584#endif
585
586#ifndef INT8_TYPE
587#define INT8_TYPE ((const char *) NULL)
588#endif
589
590#ifndef INT16_TYPE
591#define INT16_TYPE ((const char *) NULL)
592#endif
593
594#ifndef INT32_TYPE
595#define INT32_TYPE ((const char *) NULL)
596#endif
597
598#ifndef INT64_TYPE
599#define INT64_TYPE ((const char *) NULL)
600#endif
601
602#ifndef UINT8_TYPE
603#define UINT8_TYPE ((const char *) NULL)
604#endif
605
606#ifndef UINT16_TYPE
607#define UINT16_TYPE ((const char *) NULL)
608#endif
609
610#ifndef UINT32_TYPE
611#define UINT32_TYPE ((const char *) NULL)
612#endif
613
614#ifndef UINT64_TYPE
615#define UINT64_TYPE ((const char *) NULL)
616#endif
617
618#ifndef INT_LEAST8_TYPE
619#define INT_LEAST8_TYPE ((const char *) NULL)
620#endif
621
622#ifndef INT_LEAST16_TYPE
623#define INT_LEAST16_TYPE ((const char *) NULL)
624#endif
625
626#ifndef INT_LEAST32_TYPE
627#define INT_LEAST32_TYPE ((const char *) NULL)
628#endif
629
630#ifndef INT_LEAST64_TYPE
631#define INT_LEAST64_TYPE ((const char *) NULL)
632#endif
633
634#ifndef UINT_LEAST8_TYPE
635#define UINT_LEAST8_TYPE ((const char *) NULL)
636#endif
637
638#ifndef UINT_LEAST16_TYPE
639#define UINT_LEAST16_TYPE ((const char *) NULL)
640#endif
641
642#ifndef UINT_LEAST32_TYPE
643#define UINT_LEAST32_TYPE ((const char *) NULL)
644#endif
645
646#ifndef UINT_LEAST64_TYPE
647#define UINT_LEAST64_TYPE ((const char *) NULL)
648#endif
649
650#ifndef INT_FAST8_TYPE
651#define INT_FAST8_TYPE ((const char *) NULL)
652#endif
653
654#ifndef INT_FAST16_TYPE
655#define INT_FAST16_TYPE ((const char *) NULL)
656#endif
657
658#ifndef INT_FAST32_TYPE
659#define INT_FAST32_TYPE ((const char *) NULL)
660#endif
661
662#ifndef INT_FAST64_TYPE
663#define INT_FAST64_TYPE ((const char *) NULL)
664#endif
665
666#ifndef UINT_FAST8_TYPE
667#define UINT_FAST8_TYPE ((const char *) NULL)
668#endif
669
670#ifndef UINT_FAST16_TYPE
671#define UINT_FAST16_TYPE ((const char *) NULL)
672#endif
673
674#ifndef UINT_FAST32_TYPE
675#define UINT_FAST32_TYPE ((const char *) NULL)
676#endif
677
678#ifndef UINT_FAST64_TYPE
679#define UINT_FAST64_TYPE ((const char *) NULL)
680#endif
681
682#ifndef INTPTR_TYPE
683#define INTPTR_TYPE ((const char *) NULL)
684#endif
685
686#ifndef UINTPTR_TYPE
687#define UINTPTR_TYPE ((const char *) NULL)
688#endif
689
2465bf76
KG
690/* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
691#ifndef POINTER_SIZE
692#define POINTER_SIZE BITS_PER_WORD
693#endif
694
848e0190
JH
695#ifndef PIC_OFFSET_TABLE_REGNUM
696#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
697#endif
698
f8fe0a4a
JM
699#ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
700#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0
701#endif
702
b2ca3702
MM
703#ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
704#define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
705#endif
706
63c5b495 707#ifndef TARGET_DECLSPEC
b2ca3702 708#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
63c5b495
MM
709/* If the target supports the "dllimport" attribute, users are
710 probably used to the "__declspec" syntax. */
711#define TARGET_DECLSPEC 1
712#else
713#define TARGET_DECLSPEC 0
714#endif
715#endif
716
a9374841
MM
717/* By default, the preprocessor should be invoked the same way in C++
718 as in C. */
719#ifndef CPLUSPLUS_CPP_SPEC
720#ifdef CPP_SPEC
721#define CPLUSPLUS_CPP_SPEC CPP_SPEC
722#endif
723#endif
724
bf501a65
RH
725#ifndef ACCUMULATE_OUTGOING_ARGS
726#define ACCUMULATE_OUTGOING_ARGS 0
727#endif
728
729/* Supply a default definition for PUSH_ARGS. */
730#ifndef PUSH_ARGS
731#ifdef PUSH_ROUNDING
732#define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
733#else
734#define PUSH_ARGS 0
735#endif
736#endif
737
9d6bef95
JM
738/* Decide whether a function's arguments should be processed
739 from first to last or from last to first.
740
741 They should if the stack and args grow in opposite directions, but
742 only if we have push insns. */
743
744#ifdef PUSH_ROUNDING
745
746#ifndef PUSH_ARGS_REVERSED
747#if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
748#define PUSH_ARGS_REVERSED PUSH_ARGS
749#endif
750#endif
751
752#endif
753
754#ifndef PUSH_ARGS_REVERSED
755#define PUSH_ARGS_REVERSED 0
756#endif
757
95331614
OH
758/* Default value for the alignment (in bits) a C conformant malloc has to
759 provide. This default is intended to be safe and always correct. */
760#ifndef MALLOC_ABI_ALIGNMENT
761#define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
762#endif
763
31cdd499
ZW
764/* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
765 STACK_BOUNDARY is required. */
766#ifndef PREFERRED_STACK_BOUNDARY
767#define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
768#endif
769
2e3f842f
L
770/* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not
771 defined. */
772#ifndef INCOMING_STACK_BOUNDARY
773#define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY
774#endif
775
467cecf3
JB
776#ifndef TARGET_DEFAULT_PACK_STRUCT
777#define TARGET_DEFAULT_PACK_STRUCT 0
778#endif
779
a6f5e048
RH
780/* By default, the vtable entries are void pointers, the so the alignment
781 is the same as pointer alignment. The value of this macro specifies
782 the alignment of the vtable entry in bits. It should be defined only
4b7e68e7 783 when special alignment is necessary. */
a6f5e048
RH
784#ifndef TARGET_VTABLE_ENTRY_ALIGN
785#define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
786#endif
787
788/* There are a few non-descriptor entries in the vtable at offsets below
789 zero. If these entries must be padded (say, to preserve the alignment
790 specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
791 words in each data entry. */
792#ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
793#define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
794#endif
795
4a77e08c
DS
796/* Decide whether it is safe to use a local alias for a virtual function
797 when constructing thunks. */
798#ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
799#ifdef ASM_OUTPUT_DEF
800#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
801#else
802#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
803#endif
804#endif
805
2a1ee410
RH
806/* Select a format to encode pointers in exception handling data. We
807 prefer those that result in fewer dynamic relocations. Assume no
808 special support here and encode direct references. */
809#ifndef ASM_PREFERRED_EH_DATA_FORMAT
810#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
811#endif
812
f3c55c97
AO
813/* By default, the C++ compiler will use the lowest bit of the pointer
814 to function to indicate a pointer-to-member-function points to a
815 virtual member function. However, if FUNCTION_BOUNDARY indicates
816 function addresses aren't always even, the lowest bit of the delta
817 field will be used. */
818#ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
819#define TARGET_PTRMEMFUNC_VBIT_LOCATION \
820 (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
821 ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
822#endif
823
5f0e9ea2
GK
824#ifndef DEFAULT_GDB_EXTENSIONS
825#define DEFAULT_GDB_EXTENSIONS 1
826#endif
827
828/* If more than one debugging type is supported, you must define
f8ca7e49 829 PREFERRED_DEBUGGING_TYPE to choose the default. */
5f0e9ea2 830
f8ca7e49
ZW
831#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
832 + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
833 + defined (VMS_DEBUGGING_INFO))
5f0e9ea2 834#ifndef PREFERRED_DEBUGGING_TYPE
f8ca7e49 835#error You must define PREFERRED_DEBUGGING_TYPE
5f0e9ea2 836#endif /* no PREFERRED_DEBUGGING_TYPE */
f8ca7e49
ZW
837
838/* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
839 here so other code needn't care. */
840#elif defined DBX_DEBUGGING_INFO
5f0e9ea2 841#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
f8ca7e49
ZW
842
843#elif defined SDB_DEBUGGING_INFO
5f0e9ea2 844#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
f8ca7e49
ZW
845
846#elif defined DWARF2_DEBUGGING_INFO
5f0e9ea2 847#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
f8ca7e49
ZW
848
849#elif defined VMS_DEBUGGING_INFO
7a0c8d71 850#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
f8ca7e49
ZW
851
852#elif defined XCOFF_DEBUGGING_INFO
5f0e9ea2 853#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
5f0e9ea2 854
f8ca7e49
ZW
855#else
856/* No debugging format is supported by this target. */
5f0e9ea2
GK
857#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
858#endif
859
3fcaac1d
RS
860#ifndef LARGEST_EXPONENT_IS_NORMAL
861#define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
862#endif
863
864#ifndef ROUND_TOWARDS_ZERO
865#define ROUND_TOWARDS_ZERO 0
866#endif
867
c15c90bb
ZW
868#ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
869#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
870#endif
871
6cb38cd4 872/* True if the targets integer-comparison functions return { 0, 1, 2
b3f8d95d
MM
873 } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
874 instead. The libgcc routines are biased. */
875#ifndef TARGET_LIB_INT_CMP_BIASED
876#define TARGET_LIB_INT_CMP_BIASED (true)
877#endif
878
2d295af5
ZW
879/* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
880 then the word-endianness is the same as for integers. */
efdc7e19
RH
881#ifndef FLOAT_WORDS_BIG_ENDIAN
882#define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
883#endif
884
8ce94e44
JM
885#ifdef TARGET_FLT_EVAL_METHOD
886#define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 1
887#else
d57a4b98 888#define TARGET_FLT_EVAL_METHOD 0
8ce94e44 889#define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 0
d57a4b98
RH
890#endif
891
9a8ce21f
JG
892#ifndef TARGET_DEC_EVAL_METHOD
893#define TARGET_DEC_EVAL_METHOD 2
894#endif
895
750054a2
CT
896#ifndef HAS_LONG_COND_BRANCH
897#define HAS_LONG_COND_BRANCH 0
898#endif
899
900#ifndef HAS_LONG_UNCOND_BRANCH
901#define HAS_LONG_UNCOND_BRANCH 0
902#endif
903
4bafaa6f 904/* Determine whether __cxa_atexit, rather than atexit, is used to
4b7e68e7 905 register C++ destructors for local statics and global objects. */
4bafaa6f
L
906#ifndef DEFAULT_USE_CXA_ATEXIT
907#define DEFAULT_USE_CXA_ATEXIT 0
908#endif
909
f38840db
ZW
910/* If none of these macros are defined, the port must use the new
911 technique of defining constraints in the machine description.
912 tm_p.h will define those macros that machine-independent code
913 still uses. */
914#if !defined CONSTRAINT_LEN \
915 && !defined REG_CLASS_FROM_LETTER \
916 && !defined REG_CLASS_FROM_CONSTRAINT \
917 && !defined CONST_OK_FOR_LETTER_P \
918 && !defined CONST_OK_FOR_CONSTRAINT_P \
919 && !defined CONST_DOUBLE_OK_FOR_LETTER_P \
920 && !defined CONST_DOUBLE_OK_FOR_CONSTRAINT_P \
921 && !defined EXTRA_CONSTRAINT \
922 && !defined EXTRA_CONSTRAINT_STR \
923 && !defined EXTRA_MEMORY_CONSTRAINT \
924 && !defined EXTRA_ADDRESS_CONSTRAINT
925
926#define USE_MD_CONSTRAINTS
927
928#if GCC_VERSION >= 3000 && defined IN_GCC
929/* These old constraint macros shouldn't appear anywhere in a
930 configuration using MD constraint definitions. */
931#pragma GCC poison REG_CLASS_FROM_LETTER CONST_OK_FOR_LETTER_P \
932 CONST_DOUBLE_OK_FOR_LETTER_P EXTRA_CONSTRAINT
933#endif
934
935#else /* old constraint mechanism in use */
936
ccfc6cc8
UW
937/* Determine whether extra constraint letter should be handled
938 via address reload (like 'o'). */
939#ifndef EXTRA_MEMORY_CONSTRAINT
97488870 940#define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
ccfc6cc8
UW
941#endif
942
943/* Determine whether extra constraint letter should be handled
944 as an address (like 'p'). */
945#ifndef EXTRA_ADDRESS_CONSTRAINT
97488870
R
946#define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
947#endif
948
949/* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
950 for all the characters that it does not want to change, so things like the
951 'length' of a digit in a matching constraint is an implementation detail,
952 and not part of the interface. */
953#define DEFAULT_CONSTRAINT_LEN(C,STR) 1
954
955#ifndef CONSTRAINT_LEN
956#define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
957#endif
958
959#if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
960#define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
961#endif
962
963#if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
964#define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
965 CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
966#endif
967
3ff5ef1b 968#ifndef REG_CLASS_FROM_CONSTRAINT
97488870 969#define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
3ff5ef1b 970#endif
97488870
R
971
972#if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
973#define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
ccfc6cc8
UW
974#endif
975
f38840db
ZW
976#endif /* old constraint mechanism in use */
977
3f117656 978/* Determine whether the entire c99 runtime
272f51a3
JH
979 is present in the runtime library. */
980#ifndef TARGET_C99_FUNCTIONS
981#define TARGET_C99_FUNCTIONS 0
982#endif
983
006339cd
RG
984/* Determine whether the target runtime library has
985 a sincos implementation following the GNU extension. */
986#ifndef TARGET_HAS_SINCOS
987#define TARGET_HAS_SINCOS 0
988#endif
989
7dba8395 990/* Indicate that CLZ and CTZ are undefined at zero. */
f676971a 991#ifndef CLZ_DEFINED_VALUE_AT_ZERO
7dba8395
RH
992#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
993#endif
f676971a 994#ifndef CTZ_DEFINED_VALUE_AT_ZERO
7dba8395
RH
995#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
996#endif
997
06f31100
RS
998/* Provide a default value for STORE_FLAG_VALUE. */
999#ifndef STORE_FLAG_VALUE
1000#define STORE_FLAG_VALUE 1
1001#endif
1002
436bcda1
GK
1003/* This macro is used to determine what the largest unit size that
1004 move_by_pieces can use is. */
1005
1006/* MOVE_MAX_PIECES is the number of bytes at a time which we can
1007 move efficiently, as opposed to MOVE_MAX which is the maximum
1008 number of bytes we can move with a single instruction. */
1009
1010#ifndef MOVE_MAX_PIECES
1011#define MOVE_MAX_PIECES MOVE_MAX
1012#endif
1013
bcbaaba1
RS
1014#ifndef MAX_MOVE_MAX
1015#define MAX_MOVE_MAX MOVE_MAX
1016#endif
1017
1018#ifndef MIN_UNITS_PER_WORD
1019#define MIN_UNITS_PER_WORD UNITS_PER_WORD
1020#endif
1021
d1465187
RS
1022#ifndef MAX_BITS_PER_WORD
1023#define MAX_BITS_PER_WORD BITS_PER_WORD
1024#endif
1025
a594a19c
GK
1026#ifndef STACK_POINTER_OFFSET
1027#define STACK_POINTER_OFFSET 0
1028#endif
1029
cca8fb0e
KH
1030#ifndef LOCAL_REGNO
1031#define LOCAL_REGNO(REGNO) 0
1032#endif
1033
9d05bbce
KH
1034/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
1035 the stack pointer does not matter. The value is tested only in
1036 functions that have frame pointers. */
1037#ifndef EXIT_IGNORE_STACK
1038#define EXIT_IGNORE_STACK 0
1039#endif
1040
0ede749d
KH
1041/* Assume that case vectors are not pc-relative. */
1042#ifndef CASE_VECTOR_PC_RELATIVE
1043#define CASE_VECTOR_PC_RELATIVE 0
1044#endif
1045
6de9cd9a
DN
1046/* Assume that trampolines need function alignment. */
1047#ifndef TRAMPOLINE_ALIGNMENT
1048#define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
1049#endif
1050
d220de0e
KH
1051/* Register mappings for target machines without register windows. */
1052#ifndef INCOMING_REGNO
1053#define INCOMING_REGNO(N) (N)
1054#endif
1055
1056#ifndef OUTGOING_REGNO
1057#define OUTGOING_REGNO(N) (N)
1058#endif
1059
bee07d3f
KH
1060#ifndef SHIFT_COUNT_TRUNCATED
1061#define SHIFT_COUNT_TRUNCATED 0
1062#endif
1063
2e4e72b1
ZW
1064#ifndef LEGITIMATE_PIC_OPERAND_P
1065#define LEGITIMATE_PIC_OPERAND_P(X) 1
1066#endif
1067
a4edaf83
AK
1068#ifndef TARGET_MEM_CONSTRAINT
1069#define TARGET_MEM_CONSTRAINT 'm'
1070#endif
1071
1f8551b2
KH
1072#ifndef REVERSIBLE_CC_MODE
1073#define REVERSIBLE_CC_MODE(MODE) 0
1074#endif
1075
07e15286
DE
1076/* Biggest alignment supported by the object file format of this machine. */
1077#ifndef MAX_OFILE_ALIGNMENT
1078#define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
1079#endif
1080
f62c8a5c
JJ
1081#ifndef FRAME_GROWS_DOWNWARD
1082#define FRAME_GROWS_DOWNWARD 0
1083#endif
1084
30e6f306
RH
1085/* On most machines, the CFA coincides with the first incoming parm. */
1086#ifndef ARG_POINTER_CFA_OFFSET
d17c29c3
PB
1087#define ARG_POINTER_CFA_OFFSET(FNDECL) \
1088 (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
30e6f306
RH
1089#endif
1090
35d177a2
AO
1091/* On most machines, we use the CFA as DW_AT_frame_base. */
1092#ifndef CFA_FRAME_BASE_OFFSET
1093#define CFA_FRAME_BASE_OFFSET(FNDECL) 0
1094#endif
1095
30e6f306
RH
1096/* The offset from the incoming value of %sp to the top of the stack frame
1097 for the current function. */
1098#ifndef INCOMING_FRAME_SP_OFFSET
1099#define INCOMING_FRAME_SP_OFFSET 0
1100#endif
1101
8521c414
JM
1102#ifndef HARD_REGNO_NREGS_HAS_PADDING
1103#define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
1104#define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
1105#endif
1106
ac294f0b 1107#ifndef OUTGOING_REG_PARM_STACK_SPACE
81464b2c 1108#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
ac294f0b
KT
1109#endif
1110
2e3f842f
L
1111/* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
1112 the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
1113 effort stack alignment supported by the backend. If the backend
1114 supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
1115 MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack
1116 boundary will limit the maximum guaranteed stack alignment. */
1117#ifdef MAX_STACK_ALIGNMENT
1118#define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
1119#else
1120#define MAX_STACK_ALIGNMENT STACK_BOUNDARY
1121#define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
1122#endif
1123
1124#define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
1125
76fe54f0
L
1126#ifndef LOCAL_ALIGNMENT
1127#define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
1128#endif
1129
1130#ifndef STACK_SLOT_ALIGNMENT
1131#define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
1132 ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
1133#endif
1134
9bfaf89d
JJ
1135#ifndef LOCAL_DECL_ALIGNMENT
1136#define LOCAL_DECL_ALIGNMENT(DECL) \
1137 LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
1138#endif
1139
ae58e548
JJ
1140#ifndef MINIMUM_ALIGNMENT
1141#define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN)
1142#endif
1143
6e4f1168
L
1144/* Alignment value for attribute ((aligned)). */
1145#ifndef ATTRIBUTE_ALIGNED_VALUE
1146#define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
1147#endif
1148
3ad606bc
PB
1149/* Many ports have no mode-dependent addresses (except possibly autoincrement
1150 and autodecrement addresses, which are handled by target-independent code
1151 in recog.c). */
1152#ifndef GO_IF_MODE_DEPENDENT_ADDRESS
1153#define GO_IF_MODE_DEPENDENT_ADDRESS(X, WIN)
1154#endif
1155
4003023f
NC
1156/* For most ports anything that evaluates to a constant symbolic
1157 or integer value is acceptable as a constant address. */
1158#ifndef CONSTANT_ADDRESS_P
1159#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
1160#endif
1161
1c314335
L
1162#ifndef MAX_FIXED_MODE_SIZE
1163#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
1164#endif
1165
5498f011
JM
1166/* Nonzero if structures and unions should be returned in memory.
1167
1168 This should only be defined if compatibility with another compiler or
1169 with an ABI is needed, because it results in slower code. */
1170
1171#ifndef DEFAULT_PCC_STRUCT_RETURN
1172#define DEFAULT_PCC_STRUCT_RETURN 1
1173#endif
77ec4307
SB
1174
1175#ifdef GCC_INSN_FLAGS_H
1176/* Dependent default target macro definitions
1177
1178 This section of defaults.h defines target macros that depend on generated
1179 headers. This is a bit awkward: We want to put all default definitions
1180 for target macros in defaults.h, but some of the defaults depend on the
1181 HAVE_* flags defines of insn-flags.h. But insn-flags.h is not always
1182 included by files that do include defaults.h.
1183
1184 Fortunately, the default macro definitions that depend on the HAVE_*
1185 macros are also the ones that will only be used inside GCC itself, i.e.
1186 not in the gen* programs or in target objects like libgcc.
1187
1188 Obviously, it would be best to keep this section of defaults.h as small
1189 as possible, by converting the macros defined below to target hooks or
1190 functions.
1191*/
1192
77ec4307
SB
1193/* The default branch cost is 1. */
1194#ifndef BRANCH_COST
1195#define BRANCH_COST(speed_p, predictable_p) 1
1196#endif
1197
1198/* If a memory-to-memory move would take MOVE_RATIO or more simple
1199 move-instruction sequences, we will do a movmem or libcall instead. */
1200
1201#ifndef MOVE_RATIO
1202#if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
1203#define MOVE_RATIO(speed) 2
1204#else
1205/* If we are optimizing for space (-Os), cut down the default move ratio. */
1206#define MOVE_RATIO(speed) ((speed) ? 15 : 3)
1207#endif
1208#endif
1209
1210/* If a clear memory operation would take CLEAR_RATIO or more simple
1211 move-instruction sequences, we will do a setmem or libcall instead. */
1212
1213#ifndef CLEAR_RATIO
1214#if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti)
1215#define CLEAR_RATIO(speed) 2
1216#else
1217/* If we are optimizing for space, cut down the default clear ratio. */
1218#define CLEAR_RATIO(speed) ((speed) ? 15 :3)
1219#endif
1220#endif
1221
1222/* If a memory set (to value other than zero) operation would take
1223 SET_RATIO or more simple move-instruction sequences, we will do a movmem
1224 or libcall instead. */
1225#ifndef SET_RATIO
1226#define SET_RATIO(speed) MOVE_RATIO(speed)
1227#endif
1228
1229/* Supply a default definition for FUNCTION_ARG_PADDING:
1230 usually pad upward, but pad short args downward on
1231 big-endian machines. */
1232
1233#define DEFAULT_FUNCTION_ARG_PADDING(MODE, TYPE) \
1234 (! BYTES_BIG_ENDIAN \
1235 ? upward \
1236 : (((MODE) == BLKmode \
1237 ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \
1238 && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \
1239 : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \
1240 ? downward : upward))
1241
1242#ifndef FUNCTION_ARG_PADDING
1243#define FUNCTION_ARG_PADDING(MODE, TYPE) \
1244 DEFAULT_FUNCTION_ARG_PADDING ((MODE), (TYPE))
1245#endif
1246
77ec4307
SB
1247/* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
1248 Normally move_insn, so Pmode stack pointer. */
1249
1250#ifndef STACK_SAVEAREA_MODE
1251#define STACK_SAVEAREA_MODE(LEVEL) Pmode
1252#endif
1253
1254/* Supply a default definition of STACK_SIZE_MODE for
1255 allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */
1256
1257#ifndef STACK_SIZE_MODE
1258#define STACK_SIZE_MODE word_mode
1259#endif
1260
1261/* Provide default values for the macros controlling stack checking. */
1262
1263/* The default is neither full builtin stack checking... */
1264#ifndef STACK_CHECK_BUILTIN
1265#define STACK_CHECK_BUILTIN 0
1266#endif
1267
1268/* ...nor static builtin stack checking. */
1269#ifndef STACK_CHECK_STATIC_BUILTIN
1270#define STACK_CHECK_STATIC_BUILTIN 0
1271#endif
1272
1273/* The default interval is one page (4096 bytes). */
1274#ifndef STACK_CHECK_PROBE_INTERVAL_EXP
1275#define STACK_CHECK_PROBE_INTERVAL_EXP 12
1276#endif
1277
1278/* The default is not to move the stack pointer. */
1279#ifndef STACK_CHECK_MOVING_SP
1280#define STACK_CHECK_MOVING_SP 0
1281#endif
1282
1283/* This is a kludge to try to capture the discrepancy between the old
1284 mechanism (generic stack checking) and the new mechanism (static
1285 builtin stack checking). STACK_CHECK_PROTECT needs to be bumped
1286 for the latter because part of the protection area is effectively
1287 included in STACK_CHECK_MAX_FRAME_SIZE for the former. */
1288#ifdef STACK_CHECK_PROTECT
1289#define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
1290#else
677f3fa8
JM
1291#define STACK_OLD_CHECK_PROTECT \
1292 (targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
1293 ? 75 * UNITS_PER_WORD \
d5fabb58 1294 : 8 * 1024)
77ec4307
SB
1295#endif
1296
1297/* Minimum amount of stack required to recover from an anticipated stack
1298 overflow detection. The default value conveys an estimate of the amount
1299 of stack required to propagate an exception. */
1300#ifndef STACK_CHECK_PROTECT
677f3fa8
JM
1301#define STACK_CHECK_PROTECT \
1302 (targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
1303 ? 75 * UNITS_PER_WORD \
d5fabb58 1304 : 12 * 1024)
77ec4307
SB
1305#endif
1306
1307/* Make the maximum frame size be the largest we can and still only need
1308 one probe per function. */
1309#ifndef STACK_CHECK_MAX_FRAME_SIZE
1310#define STACK_CHECK_MAX_FRAME_SIZE \
1311 ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
1312#endif
1313
1314/* This is arbitrary, but should be large enough everywhere. */
1315#ifndef STACK_CHECK_FIXED_FRAME_SIZE
1316#define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD)
1317#endif
1318
1319/* Provide a reasonable default for the maximum size of an object to
1320 allocate in the fixed frame. We may need to be able to make this
1321 controllable by the user at some point. */
1322#ifndef STACK_CHECK_MAX_VAR_SIZE
1323#define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
1324#endif
1325
7894073c
SE
1326/* By default, the C++ compiler will use function addresses in the
1327 vtable entries. Setting this nonzero tells the compiler to use
1328 function descriptors instead. The value of this macro says how
1329 many words wide the descriptor is (normally 2). It is assumed
1330 that the address of a function descriptor may be treated as a
1331 pointer to a function. */
1332#ifndef TARGET_VTABLE_USES_DESCRIPTORS
1333#define TARGET_VTABLE_USES_DESCRIPTORS 0
1334#endif
1335
3bd36029
RS
1336#ifndef SWITCHABLE_TARGET
1337#define SWITCHABLE_TARGET 0
1338#endif
1339
77ec4307
SB
1340#endif /* GCC_INSN_FLAGS_H */
1341
88657302 1342#endif /* ! GCC_DEFAULTS_H */