OSDN Git Service

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