OSDN Git Service

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