OSDN Git Service

1736013fb66093e1233b68fe3460f64f5bbdf16a
[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.  SUPPORTS_WEAK
290    must be a preprocessor constant.  */
291 #ifndef SUPPORTS_WEAK
292 #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
293 #define SUPPORTS_WEAK 1
294 #else
295 #define SUPPORTS_WEAK 0
296 #endif
297 #endif
298
299 /* This determines whether or not we support weak symbols during target
300    code generation.  TARGET_SUPPORTS_WEAK can be any valid C expression.  */
301 #ifndef TARGET_SUPPORTS_WEAK
302 #define TARGET_SUPPORTS_WEAK (SUPPORTS_WEAK)
303 #endif
304
305 /* This determines whether or not we support the discriminator
306    attribute in the .loc directive.  */
307 #ifndef SUPPORTS_DISCRIMINATOR
308 #ifdef HAVE_GAS_DISCRIMINATOR
309 #define SUPPORTS_DISCRIMINATOR 1
310 #else
311 #define SUPPORTS_DISCRIMINATOR 0
312 #endif
313 #endif
314
315 /* This determines whether or not we support link-once semantics.  */
316 #ifndef SUPPORTS_ONE_ONLY
317 #ifdef MAKE_DECL_ONE_ONLY
318 #define SUPPORTS_ONE_ONLY 1
319 #else
320 #define SUPPORTS_ONE_ONLY 0
321 #endif
322 #endif
323
324 /* This determines whether weak symbols must be left out of a static
325    archive's table of contents.  Defining this macro to be nonzero has
326    the consequence that certain symbols will not be made weak that
327    otherwise would be.  The C++ ABI requires this macro to be zero;
328    see the documentation.  */
329 #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
330 #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
331 #endif
332
333 /* This determines whether or not we need linkonce unwind information.  */
334 #ifndef TARGET_USES_WEAK_UNWIND_INFO
335 #define TARGET_USES_WEAK_UNWIND_INFO 0
336 #endif
337
338 /* By default, there is no prefix on user-defined symbols.  */
339 #ifndef USER_LABEL_PREFIX
340 #define USER_LABEL_PREFIX ""
341 #endif
342
343 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
344    provide a weak attribute.  Else define it to nothing.
345
346    This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
347    not available at that time.
348
349    Note, this is only for use by target files which we know are to be
350    compiled by GCC.  */
351 #ifndef TARGET_ATTRIBUTE_WEAK
352 # if SUPPORTS_WEAK
353 #  define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
354 # else
355 #  define TARGET_ATTRIBUTE_WEAK
356 # endif
357 #endif
358
359 /* Determines whether we may use common symbols to represent one-only
360    semantics (a.k.a. "vague linkage").  */
361 #ifndef USE_COMMON_FOR_ONE_ONLY
362 # define USE_COMMON_FOR_ONE_ONLY 1
363 #endif
364
365 /* By default we can assume that all global symbols are in one namespace,
366    across all shared libraries.  */
367 #ifndef MULTIPLE_SYMBOL_SPACES
368 # define MULTIPLE_SYMBOL_SPACES 0
369 #endif
370
371 /* If the target supports init_priority C++ attribute, give
372    SUPPORTS_INIT_PRIORITY a nonzero value.  */
373 #ifndef SUPPORTS_INIT_PRIORITY
374 #define SUPPORTS_INIT_PRIORITY 1
375 #endif /* SUPPORTS_INIT_PRIORITY */
376
377 /* If duplicate library search directories can be removed from a
378    linker command without changing the linker's semantics, give this
379    symbol a nonzero.  */
380 #ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
381 #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0
382 #endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */
383
384 /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
385    the rest of the DWARF 2 frame unwind support is also provided.  */
386 #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
387 #define DWARF2_UNWIND_INFO 1
388 #endif
389
390 /* If we have named sections, and we're using crtstuff to run ctors,
391    use them for registering eh frame information.  */
392 #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
393     && !defined(EH_FRAME_IN_DATA_SECTION)
394 #ifndef EH_FRAME_SECTION_NAME
395 #define EH_FRAME_SECTION_NAME ".eh_frame"
396 #endif
397 #endif
398
399 /* On many systems, different EH table encodings are used under
400    difference circumstances.  Some will require runtime relocations;
401    some will not.  For those that do not require runtime relocations,
402    we would like to make the table read-only.  However, since the
403    read-only tables may need to be combined with read-write tables
404    that do require runtime relocation, it is not safe to make the
405    tables read-only unless the linker will merge read-only and
406    read-write sections into a single read-write section.  If your
407    linker does not have this ability, but your system is such that no
408    encoding used with non-PIC code will ever require a runtime
409    relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
410    your target configuration file.  */
411 #ifndef EH_TABLES_CAN_BE_READ_ONLY
412 #ifdef HAVE_LD_RO_RW_SECTION_MIXING
413 #define EH_TABLES_CAN_BE_READ_ONLY 1
414 #else
415 #define EH_TABLES_CAN_BE_READ_ONLY 0
416 #endif
417 #endif
418
419 /* If we have named section and we support weak symbols, then use the
420    .jcr section for recording java classes which need to be registered
421    at program start-up time.  */
422 #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
423 #ifndef JCR_SECTION_NAME
424 #define JCR_SECTION_NAME ".jcr"
425 #endif
426 #endif
427
428 /* This decision to use a .jcr section can be overridden by defining
429    USE_JCR_SECTION to 0 in target file.  This is necessary if target
430    can define JCR_SECTION_NAME but does not have crtstuff or
431    linker support for .jcr section.  */
432 #ifndef TARGET_USE_JCR_SECTION
433 #ifdef JCR_SECTION_NAME
434 #define TARGET_USE_JCR_SECTION 1
435 #else
436 #define TARGET_USE_JCR_SECTION 0
437 #endif
438 #endif
439
440 /* Number of hardware registers that go into the DWARF-2 unwind info.
441    If not defined, equals FIRST_PSEUDO_REGISTER  */
442
443 #ifndef DWARF_FRAME_REGISTERS
444 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
445 #endif
446
447 /* How to renumber registers for dbx and gdb.  If not defined, assume
448    no renumbering is necessary.  */
449
450 #ifndef DBX_REGISTER_NUMBER
451 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
452 #endif
453
454 /* Default sizes for base C types.  If the sizes are different for
455    your target, you should override these values by defining the
456    appropriate symbols in your tm.h file.  */
457
458 #ifndef BITS_PER_UNIT
459 #define BITS_PER_UNIT 8
460 #endif
461
462 #ifndef BITS_PER_WORD
463 #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
464 #endif
465
466 #ifndef CHAR_TYPE_SIZE
467 #define CHAR_TYPE_SIZE BITS_PER_UNIT
468 #endif
469
470 #ifndef BOOL_TYPE_SIZE
471 /* `bool' has size and alignment `1', on almost all platforms.  */
472 #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
473 #endif
474
475 #ifndef SHORT_TYPE_SIZE
476 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
477 #endif
478
479 #ifndef INT_TYPE_SIZE
480 #define INT_TYPE_SIZE BITS_PER_WORD
481 #endif
482
483 #ifndef LONG_TYPE_SIZE
484 #define LONG_TYPE_SIZE BITS_PER_WORD
485 #endif
486
487 #ifndef LONG_LONG_TYPE_SIZE
488 #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
489 #endif
490
491 #ifndef WCHAR_TYPE_SIZE
492 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
493 #endif
494
495 #ifndef FLOAT_TYPE_SIZE
496 #define FLOAT_TYPE_SIZE BITS_PER_WORD
497 #endif
498
499 #ifndef DOUBLE_TYPE_SIZE
500 #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
501 #endif
502
503 #ifndef LONG_DOUBLE_TYPE_SIZE
504 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
505 #endif
506
507 #ifndef DECIMAL32_TYPE_SIZE
508 #define DECIMAL32_TYPE_SIZE 32
509 #endif
510
511 #ifndef DECIMAL64_TYPE_SIZE
512 #define DECIMAL64_TYPE_SIZE 64
513 #endif
514
515 #ifndef DECIMAL128_TYPE_SIZE
516 #define DECIMAL128_TYPE_SIZE 128
517 #endif
518
519 #ifndef SHORT_FRACT_TYPE_SIZE
520 #define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT
521 #endif
522
523 #ifndef FRACT_TYPE_SIZE
524 #define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2)
525 #endif
526
527 #ifndef LONG_FRACT_TYPE_SIZE
528 #define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4)
529 #endif
530
531 #ifndef LONG_LONG_FRACT_TYPE_SIZE
532 #define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8)
533 #endif
534
535 #ifndef SHORT_ACCUM_TYPE_SIZE
536 #define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2)
537 #endif
538
539 #ifndef ACCUM_TYPE_SIZE
540 #define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2)
541 #endif
542
543 #ifndef LONG_ACCUM_TYPE_SIZE
544 #define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2)
545 #endif
546
547 #ifndef LONG_LONG_ACCUM_TYPE_SIZE
548 #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2)
549 #endif
550
551 /* We let tm.h override the types used here, to handle trivial differences
552    such as the choice of unsigned int or long unsigned int for size_t.
553    When machines start needing nontrivial differences in the size type,
554    it would be best to do something here to figure out automatically
555    from other information what type to use.  */
556
557 #ifndef SIZE_TYPE
558 #define SIZE_TYPE "long unsigned int"
559 #endif
560
561 #ifndef PID_TYPE
562 #define PID_TYPE "int"
563 #endif
564
565 /* If GCC knows the exact uint_least16_t and uint_least32_t types from
566    <stdint.h>, use them for char16_t and char32_t.  Otherwise, use
567    these guesses; getting the wrong type of a given width will not
568    affect C++ name mangling because in C++ these are distinct types
569    not typedefs.  */
570
571 #ifdef UINT_LEAST16_TYPE
572 #define CHAR16_TYPE UINT_LEAST16_TYPE
573 #else
574 #define CHAR16_TYPE "short unsigned int"
575 #endif
576
577 #ifdef UINT_LEAST32_TYPE
578 #define CHAR32_TYPE UINT_LEAST32_TYPE
579 #else
580 #define CHAR32_TYPE "unsigned int"
581 #endif
582
583 #ifndef WCHAR_TYPE
584 #define WCHAR_TYPE "int"
585 #endif
586
587 /* WCHAR_TYPE gets overridden by -fshort-wchar.  */
588 #define MODIFIED_WCHAR_TYPE \
589         (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
590
591 #ifndef PTRDIFF_TYPE
592 #define PTRDIFF_TYPE "long int"
593 #endif
594
595 #ifndef WINT_TYPE
596 #define WINT_TYPE "unsigned int"
597 #endif
598
599 #ifndef INTMAX_TYPE
600 #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE)     \
601                      ? "int"                                    \
602                      : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
603                         ? "long int"                            \
604                         : "long long int"))
605 #endif
606
607 #ifndef UINTMAX_TYPE
608 #define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE)    \
609                      ? "unsigned int"                           \
610                      : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
611                         ? "long unsigned int"                   \
612                         : "long long unsigned int"))
613 #endif
614
615
616 /* There are no default definitions of these <stdint.h> types.  */
617
618 #ifndef SIG_ATOMIC_TYPE
619 #define SIG_ATOMIC_TYPE ((const char *) NULL)
620 #endif
621
622 #ifndef INT8_TYPE
623 #define INT8_TYPE ((const char *) NULL)
624 #endif
625
626 #ifndef INT16_TYPE
627 #define INT16_TYPE ((const char *) NULL)
628 #endif
629
630 #ifndef INT32_TYPE
631 #define INT32_TYPE ((const char *) NULL)
632 #endif
633
634 #ifndef INT64_TYPE
635 #define INT64_TYPE ((const char *) NULL)
636 #endif
637
638 #ifndef UINT8_TYPE
639 #define UINT8_TYPE ((const char *) NULL)
640 #endif
641
642 #ifndef UINT16_TYPE
643 #define UINT16_TYPE ((const char *) NULL)
644 #endif
645
646 #ifndef UINT32_TYPE
647 #define UINT32_TYPE ((const char *) NULL)
648 #endif
649
650 #ifndef UINT64_TYPE
651 #define UINT64_TYPE ((const char *) NULL)
652 #endif
653
654 #ifndef INT_LEAST8_TYPE
655 #define INT_LEAST8_TYPE ((const char *) NULL)
656 #endif
657
658 #ifndef INT_LEAST16_TYPE
659 #define INT_LEAST16_TYPE ((const char *) NULL)
660 #endif
661
662 #ifndef INT_LEAST32_TYPE
663 #define INT_LEAST32_TYPE ((const char *) NULL)
664 #endif
665
666 #ifndef INT_LEAST64_TYPE
667 #define INT_LEAST64_TYPE ((const char *) NULL)
668 #endif
669
670 #ifndef UINT_LEAST8_TYPE
671 #define UINT_LEAST8_TYPE ((const char *) NULL)
672 #endif
673
674 #ifndef UINT_LEAST16_TYPE
675 #define UINT_LEAST16_TYPE ((const char *) NULL)
676 #endif
677
678 #ifndef UINT_LEAST32_TYPE
679 #define UINT_LEAST32_TYPE ((const char *) NULL)
680 #endif
681
682 #ifndef UINT_LEAST64_TYPE
683 #define UINT_LEAST64_TYPE ((const char *) NULL)
684 #endif
685
686 #ifndef INT_FAST8_TYPE
687 #define INT_FAST8_TYPE ((const char *) NULL)
688 #endif
689
690 #ifndef INT_FAST16_TYPE
691 #define INT_FAST16_TYPE ((const char *) NULL)
692 #endif
693
694 #ifndef INT_FAST32_TYPE
695 #define INT_FAST32_TYPE ((const char *) NULL)
696 #endif
697
698 #ifndef INT_FAST64_TYPE
699 #define INT_FAST64_TYPE ((const char *) NULL)
700 #endif
701
702 #ifndef UINT_FAST8_TYPE
703 #define UINT_FAST8_TYPE ((const char *) NULL)
704 #endif
705
706 #ifndef UINT_FAST16_TYPE
707 #define UINT_FAST16_TYPE ((const char *) NULL)
708 #endif
709
710 #ifndef UINT_FAST32_TYPE
711 #define UINT_FAST32_TYPE ((const char *) NULL)
712 #endif
713
714 #ifndef UINT_FAST64_TYPE
715 #define UINT_FAST64_TYPE ((const char *) NULL)
716 #endif
717
718 #ifndef INTPTR_TYPE
719 #define INTPTR_TYPE ((const char *) NULL)
720 #endif
721
722 #ifndef UINTPTR_TYPE
723 #define UINTPTR_TYPE ((const char *) NULL)
724 #endif
725
726 /* Width in bits of a pointer.  Mind the value of the macro `Pmode'.  */
727 #ifndef POINTER_SIZE
728 #define POINTER_SIZE BITS_PER_WORD
729 #endif
730
731 #ifndef PIC_OFFSET_TABLE_REGNUM
732 #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
733 #endif
734
735 #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
736 #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0
737 #endif
738
739 #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
740 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
741 #endif
742
743 #ifndef TARGET_DECLSPEC
744 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
745 /* If the target supports the "dllimport" attribute, users are
746    probably used to the "__declspec" syntax.  */
747 #define TARGET_DECLSPEC 1
748 #else
749 #define TARGET_DECLSPEC 0
750 #endif
751 #endif
752
753 /* By default, the preprocessor should be invoked the same way in C++
754    as in C.  */
755 #ifndef CPLUSPLUS_CPP_SPEC
756 #ifdef CPP_SPEC
757 #define CPLUSPLUS_CPP_SPEC CPP_SPEC
758 #endif
759 #endif
760
761 #ifndef ACCUMULATE_OUTGOING_ARGS
762 #define ACCUMULATE_OUTGOING_ARGS 0
763 #endif
764
765 /* Supply a default definition for PUSH_ARGS.  */
766 #ifndef PUSH_ARGS
767 #ifdef PUSH_ROUNDING
768 #define PUSH_ARGS       !ACCUMULATE_OUTGOING_ARGS
769 #else
770 #define PUSH_ARGS       0
771 #endif
772 #endif
773
774 /* Decide whether a function's arguments should be processed
775    from first to last or from last to first.
776
777    They should if the stack and args grow in opposite directions, but
778    only if we have push insns.  */
779
780 #ifdef PUSH_ROUNDING
781
782 #ifndef PUSH_ARGS_REVERSED
783 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
784 #define PUSH_ARGS_REVERSED  PUSH_ARGS
785 #endif
786 #endif
787
788 #endif
789
790 #ifndef PUSH_ARGS_REVERSED
791 #define PUSH_ARGS_REVERSED 0
792 #endif
793
794 /* Default value for the alignment (in bits) a C conformant malloc has to
795    provide. This default is intended to be safe and always correct.  */
796 #ifndef MALLOC_ABI_ALIGNMENT
797 #define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
798 #endif
799
800 /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
801    STACK_BOUNDARY is required.  */
802 #ifndef PREFERRED_STACK_BOUNDARY
803 #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
804 #endif
805
806 /* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not
807    defined.  */
808 #ifndef INCOMING_STACK_BOUNDARY
809 #define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY
810 #endif
811
812 #ifndef TARGET_DEFAULT_PACK_STRUCT
813 #define TARGET_DEFAULT_PACK_STRUCT 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 /* Determine whether __cxa_atexit, rather than atexit, is used to
949    register C++ destructors for local statics and global objects.  */
950 #ifndef DEFAULT_USE_CXA_ATEXIT
951 #define DEFAULT_USE_CXA_ATEXIT 0
952 #endif
953
954 /* If none of these macros are defined, the port must use the new
955    technique of defining constraints in the machine description.
956    tm_p.h will define those macros that machine-independent code
957    still uses.  */
958 #if  !defined CONSTRAINT_LEN                    \
959   && !defined REG_CLASS_FROM_LETTER             \
960   && !defined REG_CLASS_FROM_CONSTRAINT         \
961   && !defined CONST_OK_FOR_LETTER_P             \
962   && !defined CONST_OK_FOR_CONSTRAINT_P         \
963   && !defined CONST_DOUBLE_OK_FOR_LETTER_P      \
964   && !defined CONST_DOUBLE_OK_FOR_CONSTRAINT_P  \
965   && !defined EXTRA_CONSTRAINT                  \
966   && !defined EXTRA_CONSTRAINT_STR              \
967   && !defined EXTRA_MEMORY_CONSTRAINT           \
968   && !defined EXTRA_ADDRESS_CONSTRAINT
969
970 #define USE_MD_CONSTRAINTS
971
972 #if GCC_VERSION >= 3000 && defined IN_GCC
973 /* These old constraint macros shouldn't appear anywhere in a
974    configuration using MD constraint definitions.  */
975 #pragma GCC poison REG_CLASS_FROM_LETTER CONST_OK_FOR_LETTER_P \
976                    CONST_DOUBLE_OK_FOR_LETTER_P EXTRA_CONSTRAINT
977 #endif
978
979 #else /* old constraint mechanism in use */
980
981 /* Determine whether extra constraint letter should be handled
982    via address reload (like 'o').  */
983 #ifndef EXTRA_MEMORY_CONSTRAINT
984 #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
985 #endif
986
987 /* Determine whether extra constraint letter should be handled
988    as an address (like 'p').  */
989 #ifndef EXTRA_ADDRESS_CONSTRAINT
990 #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
991 #endif
992
993 /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
994    for all the characters that it does not want to change, so things like the
995   'length' of a digit in a matching constraint is an implementation detail,
996    and not part of the interface.  */
997 #define DEFAULT_CONSTRAINT_LEN(C,STR) 1
998
999 #ifndef CONSTRAINT_LEN
1000 #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
1001 #endif
1002
1003 #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
1004 #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
1005 #endif
1006
1007 #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
1008 #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
1009   CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
1010 #endif
1011
1012 #ifndef REG_CLASS_FROM_CONSTRAINT
1013 #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
1014 #endif
1015
1016 #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
1017 #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
1018 #endif
1019
1020 #endif /* old constraint mechanism in use */
1021
1022 /* Determine whether the entire c99 runtime
1023    is present in the runtime library.  */
1024 #ifndef TARGET_C99_FUNCTIONS
1025 #define TARGET_C99_FUNCTIONS 0
1026 #endif
1027
1028 /* Determine whether the target runtime library has
1029    a sincos implementation following the GNU extension.  */
1030 #ifndef TARGET_HAS_SINCOS
1031 #define TARGET_HAS_SINCOS 0
1032 #endif
1033
1034 /* Indicate that CLZ and CTZ are undefined at zero.  */
1035 #ifndef CLZ_DEFINED_VALUE_AT_ZERO
1036 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  0
1037 #endif
1038 #ifndef CTZ_DEFINED_VALUE_AT_ZERO
1039 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  0
1040 #endif
1041
1042 /* Provide a default value for STORE_FLAG_VALUE.  */
1043 #ifndef STORE_FLAG_VALUE
1044 #define STORE_FLAG_VALUE  1
1045 #endif
1046
1047 /* This macro is used to determine what the largest unit size that
1048    move_by_pieces can use is.  */
1049
1050 /* MOVE_MAX_PIECES is the number of bytes at a time which we can
1051    move efficiently, as opposed to  MOVE_MAX which is the maximum
1052    number of bytes we can move with a single instruction.  */
1053
1054 #ifndef MOVE_MAX_PIECES
1055 #define MOVE_MAX_PIECES   MOVE_MAX
1056 #endif
1057
1058 #ifndef MAX_MOVE_MAX
1059 #define MAX_MOVE_MAX MOVE_MAX
1060 #endif
1061
1062 #ifndef MIN_UNITS_PER_WORD
1063 #define MIN_UNITS_PER_WORD UNITS_PER_WORD
1064 #endif
1065
1066 #ifndef MAX_BITS_PER_WORD
1067 #define MAX_BITS_PER_WORD BITS_PER_WORD
1068 #endif
1069
1070 #ifndef STACK_POINTER_OFFSET
1071 #define STACK_POINTER_OFFSET    0
1072 #endif
1073
1074 #ifndef LOCAL_REGNO
1075 #define LOCAL_REGNO(REGNO)  0
1076 #endif
1077
1078 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
1079    the stack pointer does not matter.  The value is tested only in
1080    functions that have frame pointers.  */
1081 #ifndef EXIT_IGNORE_STACK
1082 #define EXIT_IGNORE_STACK 0
1083 #endif
1084
1085 /* Assume that case vectors are not pc-relative.  */
1086 #ifndef CASE_VECTOR_PC_RELATIVE
1087 #define CASE_VECTOR_PC_RELATIVE 0
1088 #endif
1089
1090 /* Assume that trampolines need function alignment.  */
1091 #ifndef TRAMPOLINE_ALIGNMENT
1092 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
1093 #endif
1094
1095 /* Register mappings for target machines without register windows.  */
1096 #ifndef INCOMING_REGNO
1097 #define INCOMING_REGNO(N) (N)
1098 #endif
1099
1100 #ifndef OUTGOING_REGNO
1101 #define OUTGOING_REGNO(N) (N)
1102 #endif
1103
1104 #ifndef SHIFT_COUNT_TRUNCATED
1105 #define SHIFT_COUNT_TRUNCATED 0
1106 #endif
1107
1108 #ifndef LEGITIMATE_PIC_OPERAND_P
1109 #define LEGITIMATE_PIC_OPERAND_P(X) 1
1110 #endif
1111
1112 #ifndef TARGET_MEM_CONSTRAINT
1113 #define TARGET_MEM_CONSTRAINT 'm'
1114 #endif
1115
1116 #ifndef REVERSIBLE_CC_MODE
1117 #define REVERSIBLE_CC_MODE(MODE) 0
1118 #endif
1119
1120 /* Biggest alignment supported by the object file format of this machine.  */
1121 #ifndef MAX_OFILE_ALIGNMENT
1122 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
1123 #endif
1124
1125 #ifndef FRAME_GROWS_DOWNWARD
1126 #define FRAME_GROWS_DOWNWARD 0
1127 #endif
1128
1129 /* On most machines, the CFA coincides with the first incoming parm.  */
1130 #ifndef ARG_POINTER_CFA_OFFSET
1131 #define ARG_POINTER_CFA_OFFSET(FNDECL) \
1132   (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
1133 #endif
1134
1135 /* On most machines, we use the CFA as DW_AT_frame_base.  */
1136 #ifndef CFA_FRAME_BASE_OFFSET
1137 #define CFA_FRAME_BASE_OFFSET(FNDECL) 0
1138 #endif
1139
1140 /* The offset from the incoming value of %sp to the top of the stack frame
1141    for the current function.  */
1142 #ifndef INCOMING_FRAME_SP_OFFSET
1143 #define INCOMING_FRAME_SP_OFFSET 0
1144 #endif
1145
1146 #ifndef HARD_REGNO_NREGS_HAS_PADDING
1147 #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
1148 #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
1149 #endif
1150
1151 #ifndef OUTGOING_REG_PARM_STACK_SPACE
1152 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
1153 #endif
1154
1155 /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
1156    the backend.  MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
1157    effort stack alignment supported by the backend.  If the backend
1158    supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
1159    MAX_STACK_ALIGNMENT are the same.  Otherwise, the incoming stack
1160    boundary will limit the maximum guaranteed stack alignment.  */
1161 #ifdef MAX_STACK_ALIGNMENT
1162 #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
1163 #else
1164 #define MAX_STACK_ALIGNMENT STACK_BOUNDARY
1165 #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
1166 #endif
1167
1168 #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
1169
1170 #ifndef LOCAL_ALIGNMENT
1171 #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
1172 #endif
1173
1174 #ifndef STACK_SLOT_ALIGNMENT
1175 #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
1176   ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
1177 #endif
1178
1179 #ifndef LOCAL_DECL_ALIGNMENT
1180 #define LOCAL_DECL_ALIGNMENT(DECL) \
1181   LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
1182 #endif
1183
1184 #ifndef MINIMUM_ALIGNMENT
1185 #define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN)
1186 #endif
1187
1188 /* Alignment value for attribute ((aligned)).  */
1189 #ifndef ATTRIBUTE_ALIGNED_VALUE
1190 #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
1191 #endif
1192
1193 /* Many ports have no mode-dependent addresses (except possibly autoincrement
1194    and autodecrement addresses, which are handled by target-independent code
1195    in recog.c).  */
1196 #ifndef GO_IF_MODE_DEPENDENT_ADDRESS
1197 #define GO_IF_MODE_DEPENDENT_ADDRESS(X, WIN)
1198 #endif
1199
1200 /* For most ports anything that evaluates to a constant symbolic
1201    or integer value is acceptable as a constant address.  */
1202 #ifndef CONSTANT_ADDRESS_P
1203 #define CONSTANT_ADDRESS_P(X)   (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
1204 #endif
1205
1206 #ifndef MAX_FIXED_MODE_SIZE
1207 #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
1208 #endif
1209
1210 /* Nonzero if structures and unions should be returned in memory.
1211
1212    This should only be defined if compatibility with another compiler or
1213    with an ABI is needed, because it results in slower code.  */
1214
1215 #ifndef DEFAULT_PCC_STRUCT_RETURN
1216 #define DEFAULT_PCC_STRUCT_RETURN 1
1217 #endif
1218
1219 #ifdef GCC_INSN_FLAGS_H
1220 /* Dependent default target macro definitions
1221
1222    This section of defaults.h defines target macros that depend on generated
1223    headers.  This is a bit awkward:  We want to put all default definitions
1224    for target macros in defaults.h, but some of the defaults depend on the
1225    HAVE_* flags defines of insn-flags.h.  But insn-flags.h is not always
1226    included by files that do include defaults.h.
1227
1228    Fortunately, the default macro definitions that depend on the HAVE_*
1229    macros are also the ones that will only be used inside GCC itself, i.e.
1230    not in the gen* programs or in target objects like libgcc.
1231
1232    Obviously, it would be best to keep this section of defaults.h as small
1233    as possible, by converting the macros defined below to target hooks or
1234    functions.
1235 */
1236
1237 /* The default branch cost is 1.  */
1238 #ifndef BRANCH_COST
1239 #define BRANCH_COST(speed_p, predictable_p) 1
1240 #endif
1241
1242 /* If a memory-to-memory move would take MOVE_RATIO or more simple
1243    move-instruction sequences, we will do a movmem or libcall instead.  */
1244
1245 #ifndef MOVE_RATIO
1246 #if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
1247 #define MOVE_RATIO(speed) 2
1248 #else
1249 /* If we are optimizing for space (-Os), cut down the default move ratio.  */
1250 #define MOVE_RATIO(speed) ((speed) ? 15 : 3)
1251 #endif
1252 #endif
1253
1254 /* If a clear memory operation would take CLEAR_RATIO or more simple
1255    move-instruction sequences, we will do a setmem or libcall instead.  */
1256
1257 #ifndef CLEAR_RATIO
1258 #if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti)
1259 #define CLEAR_RATIO(speed) 2
1260 #else
1261 /* If we are optimizing for space, cut down the default clear ratio.  */
1262 #define CLEAR_RATIO(speed) ((speed) ? 15 :3)
1263 #endif
1264 #endif
1265
1266 /* If a memory set (to value other than zero) operation would take
1267    SET_RATIO or more simple move-instruction sequences, we will do a movmem
1268    or libcall instead.  */
1269 #ifndef SET_RATIO
1270 #define SET_RATIO(speed) MOVE_RATIO(speed)
1271 #endif
1272
1273 /* Supply a default definition for FUNCTION_ARG_PADDING:
1274    usually pad upward, but pad short args downward on
1275    big-endian machines.  */
1276
1277 #define DEFAULT_FUNCTION_ARG_PADDING(MODE, TYPE)                        \
1278   (! BYTES_BIG_ENDIAN                                                   \
1279    ? upward                                                             \
1280    : (((MODE) == BLKmode                                                \
1281        ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST         \
1282           && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \
1283        : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY)                       \
1284       ? downward : upward))
1285
1286 #ifndef FUNCTION_ARG_PADDING
1287 #define FUNCTION_ARG_PADDING(MODE, TYPE)        \
1288   DEFAULT_FUNCTION_ARG_PADDING ((MODE), (TYPE))
1289 #endif
1290
1291 /* Supply a default definition for FUNCTION_ARG_BOUNDARY.  Normally, we let
1292    FUNCTION_ARG_PADDING, which also pads the length, handle any needed
1293    alignment.  */
1294
1295 #ifndef FUNCTION_ARG_BOUNDARY
1296 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)       PARM_BOUNDARY
1297 #endif
1298
1299 /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
1300    Normally move_insn, so Pmode stack pointer.  */
1301
1302 #ifndef STACK_SAVEAREA_MODE
1303 #define STACK_SAVEAREA_MODE(LEVEL) Pmode
1304 #endif
1305
1306 /* Supply a default definition of STACK_SIZE_MODE for
1307    allocate_dynamic_stack_space.  Normally PLUS/MINUS, so word_mode.  */
1308
1309 #ifndef STACK_SIZE_MODE
1310 #define STACK_SIZE_MODE word_mode
1311 #endif
1312
1313 /* Provide default values for the macros controlling stack checking.  */
1314
1315 /* The default is neither full builtin stack checking...  */
1316 #ifndef STACK_CHECK_BUILTIN
1317 #define STACK_CHECK_BUILTIN 0
1318 #endif
1319
1320 /* ...nor static builtin stack checking.  */
1321 #ifndef STACK_CHECK_STATIC_BUILTIN
1322 #define STACK_CHECK_STATIC_BUILTIN 0
1323 #endif
1324
1325 /* The default interval is one page (4096 bytes).  */
1326 #ifndef STACK_CHECK_PROBE_INTERVAL_EXP
1327 #define STACK_CHECK_PROBE_INTERVAL_EXP 12
1328 #endif
1329
1330 /* The default is not to move the stack pointer.  */
1331 #ifndef STACK_CHECK_MOVING_SP
1332 #define STACK_CHECK_MOVING_SP 0
1333 #endif
1334
1335 /* This is a kludge to try to capture the discrepancy between the old
1336    mechanism (generic stack checking) and the new mechanism (static
1337    builtin stack checking).  STACK_CHECK_PROTECT needs to be bumped
1338    for the latter because part of the protection area is effectively
1339    included in STACK_CHECK_MAX_FRAME_SIZE for the former.  */
1340 #ifdef STACK_CHECK_PROTECT
1341 #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
1342 #else
1343 #define STACK_OLD_CHECK_PROTECT \
1344  (targetm.except_unwind_info () == UI_SJLJ ? 75 * UNITS_PER_WORD : 8 * 1024)
1345 #endif
1346
1347 /* Minimum amount of stack required to recover from an anticipated stack
1348    overflow detection.  The default value conveys an estimate of the amount
1349    of stack required to propagate an exception.  */
1350 #ifndef STACK_CHECK_PROTECT
1351 #define STACK_CHECK_PROTECT \
1352  (targetm.except_unwind_info () == UI_SJLJ ? 75 * UNITS_PER_WORD : 12 * 1024)
1353 #endif
1354
1355 /* Make the maximum frame size be the largest we can and still only need
1356    one probe per function.  */
1357 #ifndef STACK_CHECK_MAX_FRAME_SIZE
1358 #define STACK_CHECK_MAX_FRAME_SIZE \
1359   ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
1360 #endif
1361
1362 /* This is arbitrary, but should be large enough everywhere.  */
1363 #ifndef STACK_CHECK_FIXED_FRAME_SIZE
1364 #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD)
1365 #endif
1366
1367 /* Provide a reasonable default for the maximum size of an object to
1368    allocate in the fixed frame.  We may need to be able to make this
1369    controllable by the user at some point.  */
1370 #ifndef STACK_CHECK_MAX_VAR_SIZE
1371 #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
1372 #endif
1373
1374 /* By default, the C++ compiler will use function addresses in the
1375    vtable entries.  Setting this nonzero tells the compiler to use
1376    function descriptors instead.  The value of this macro says how
1377    many words wide the descriptor is (normally 2).  It is assumed
1378    that the address of a function descriptor may be treated as a
1379    pointer to a function.  */
1380 #ifndef TARGET_VTABLE_USES_DESCRIPTORS
1381 #define TARGET_VTABLE_USES_DESCRIPTORS 0
1382 #endif
1383
1384 #ifndef SWITCHABLE_TARGET
1385 #define SWITCHABLE_TARGET 0
1386 #endif
1387
1388 #endif /* GCC_INSN_FLAGS_H  */
1389
1390 #endif  /* ! GCC_DEFAULTS_H */