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