In gcc/objc/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / gcc / defaults.h
blob88585726c7c8b4019b2011642e1cdc6dfda90f1d
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)
7 This file is part of GCC.
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.
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.
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.
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/>. */
28 #ifndef GCC_DEFAULTS_H
29 #define GCC_DEFAULTS_H
31 #ifndef GET_ENVIRONMENT
32 #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
33 #endif
35 /* This defines which switch letters take arguments. */
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')
44 /* This defines which multi-letter switches take arguments. */
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"))
59 #ifndef SWITCH_TAKES_ARG
60 #define SWITCH_TAKES_ARG(CHAR) DEFAULT_SWITCH_TAKES_ARG (CHAR)
61 #endif
63 #ifndef WORD_SWITCH_TAKES_ARG
64 #define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR)
65 #endif
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. */
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 */
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
92 /* Choose a reasonable default for ASM_OUTPUT_ASCII. */
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); \
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 \""); \
107 for (i = 0; i < thissize; i++) \
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 \
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 \""); \
126 fprintf (asm_out_file, "\"\n"); \
129 while (0)
130 #endif
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
145 #ifndef IFUNC_ASM_TYPE
146 #define IFUNC_ASM_TYPE "gnu_indirect_function"
147 #endif
149 #ifndef TLS_COMMON_ASM_OP
150 #define TLS_COMMON_ASM_OP ".tls_common"
151 #endif
153 #if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON)
154 #define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \
155 do \
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); \
162 while (0)
163 #endif
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
171 /* This is how to output the definition of a user-level label named
172 NAME, such as the label on variable NAME. */
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
179 /* This is how to output the definition of a user-level label named
180 NAME, such as the label on a function. */
182 #ifndef ASM_OUTPUT_FUNCTION_LABEL
183 #define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \
184 ASM_OUTPUT_LABEL ((FILE), (NAME))
185 #endif
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
196 /* This is how to output a reference to a user-level label named NAME. */
198 #ifndef ASM_OUTPUT_LABELREF
199 #define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
200 #endif
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. */
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
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 \
217 ASM_WEAKEN_LABEL (STREAM, NAME); \
218 if (VALUE) \
219 ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
221 while (0)
222 #endif
223 #endif
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 \
236 fprintf ((FILE), "\t.weakref\t"); \
237 assemble_name ((FILE), (NAME)); \
238 fprintf ((FILE), ","); \
239 assemble_name ((FILE), (VALUE)); \
240 fprintf ((FILE), "\n"); \
242 while (0)
243 #endif
244 #endif
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 \
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); \
258 while (0)
259 #endif
260 #endif
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 \
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_); \
273 while (0)
275 #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
276 do \
278 fputs (SIZE_ASM_OP, STREAM); \
279 assemble_name (STREAM, NAME); \
280 fputs (", .-", STREAM); \
281 assemble_name (STREAM, NAME); \
282 putc ('\n', STREAM); \
284 while (0)
286 #endif
287 #endif
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
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
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
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
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
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
338 /* By default, there is no prefix on user-defined symbols. */
339 #ifndef USER_LABEL_PREFIX
340 #define USER_LABEL_PREFIX ""
341 #endif
343 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
344 provide a weak attribute. Else define it to nothing.
346 This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
347 not available at that time.
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
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
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
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 */
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 */
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
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
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
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
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
440 /* Number of hardware registers that go into the DWARF-2 unwind info.
441 If not defined, equals FIRST_PSEUDO_REGISTER */
443 #ifndef DWARF_FRAME_REGISTERS
444 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
445 #endif
447 /* How to renumber registers for dbx and gdb. If not defined, assume
448 no renumbering is necessary. */
450 #ifndef DBX_REGISTER_NUMBER
451 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
452 #endif
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. */
458 #ifndef BITS_PER_UNIT
459 #define BITS_PER_UNIT 8
460 #endif
462 #ifndef BITS_PER_WORD
463 #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
464 #endif
466 #ifndef CHAR_TYPE_SIZE
467 #define CHAR_TYPE_SIZE BITS_PER_UNIT
468 #endif
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
475 #ifndef SHORT_TYPE_SIZE
476 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
477 #endif
479 #ifndef INT_TYPE_SIZE
480 #define INT_TYPE_SIZE BITS_PER_WORD
481 #endif
483 #ifndef LONG_TYPE_SIZE
484 #define LONG_TYPE_SIZE BITS_PER_WORD
485 #endif
487 #ifndef LONG_LONG_TYPE_SIZE
488 #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
489 #endif
491 #ifndef WCHAR_TYPE_SIZE
492 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
493 #endif
495 #ifndef FLOAT_TYPE_SIZE
496 #define FLOAT_TYPE_SIZE BITS_PER_WORD
497 #endif
499 #ifndef DOUBLE_TYPE_SIZE
500 #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
501 #endif
503 #ifndef LONG_DOUBLE_TYPE_SIZE
504 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
505 #endif
507 #ifndef DECIMAL32_TYPE_SIZE
508 #define DECIMAL32_TYPE_SIZE 32
509 #endif
511 #ifndef DECIMAL64_TYPE_SIZE
512 #define DECIMAL64_TYPE_SIZE 64
513 #endif
515 #ifndef DECIMAL128_TYPE_SIZE
516 #define DECIMAL128_TYPE_SIZE 128
517 #endif
519 #ifndef SHORT_FRACT_TYPE_SIZE
520 #define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT
521 #endif
523 #ifndef FRACT_TYPE_SIZE
524 #define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2)
525 #endif
527 #ifndef LONG_FRACT_TYPE_SIZE
528 #define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4)
529 #endif
531 #ifndef LONG_LONG_FRACT_TYPE_SIZE
532 #define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8)
533 #endif
535 #ifndef SHORT_ACCUM_TYPE_SIZE
536 #define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2)
537 #endif
539 #ifndef ACCUM_TYPE_SIZE
540 #define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2)
541 #endif
543 #ifndef LONG_ACCUM_TYPE_SIZE
544 #define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2)
545 #endif
547 #ifndef LONG_LONG_ACCUM_TYPE_SIZE
548 #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2)
549 #endif
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. */
557 #ifndef SIZE_TYPE
558 #define SIZE_TYPE "long unsigned int"
559 #endif
561 #ifndef PID_TYPE
562 #define PID_TYPE "int"
563 #endif
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. */
571 #ifdef UINT_LEAST16_TYPE
572 #define CHAR16_TYPE UINT_LEAST16_TYPE
573 #else
574 #define CHAR16_TYPE "short unsigned int"
575 #endif
577 #ifdef UINT_LEAST32_TYPE
578 #define CHAR32_TYPE UINT_LEAST32_TYPE
579 #else
580 #define CHAR32_TYPE "unsigned int"
581 #endif
583 #ifndef WCHAR_TYPE
584 #define WCHAR_TYPE "int"
585 #endif
587 /* WCHAR_TYPE gets overridden by -fshort-wchar. */
588 #define MODIFIED_WCHAR_TYPE \
589 (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
591 #ifndef PTRDIFF_TYPE
592 #define PTRDIFF_TYPE "long int"
593 #endif
595 #ifndef WINT_TYPE
596 #define WINT_TYPE "unsigned int"
597 #endif
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
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
616 /* There are no default definitions of these <stdint.h> types. */
618 #ifndef SIG_ATOMIC_TYPE
619 #define SIG_ATOMIC_TYPE ((const char *) NULL)
620 #endif
622 #ifndef INT8_TYPE
623 #define INT8_TYPE ((const char *) NULL)
624 #endif
626 #ifndef INT16_TYPE
627 #define INT16_TYPE ((const char *) NULL)
628 #endif
630 #ifndef INT32_TYPE
631 #define INT32_TYPE ((const char *) NULL)
632 #endif
634 #ifndef INT64_TYPE
635 #define INT64_TYPE ((const char *) NULL)
636 #endif
638 #ifndef UINT8_TYPE
639 #define UINT8_TYPE ((const char *) NULL)
640 #endif
642 #ifndef UINT16_TYPE
643 #define UINT16_TYPE ((const char *) NULL)
644 #endif
646 #ifndef UINT32_TYPE
647 #define UINT32_TYPE ((const char *) NULL)
648 #endif
650 #ifndef UINT64_TYPE
651 #define UINT64_TYPE ((const char *) NULL)
652 #endif
654 #ifndef INT_LEAST8_TYPE
655 #define INT_LEAST8_TYPE ((const char *) NULL)
656 #endif
658 #ifndef INT_LEAST16_TYPE
659 #define INT_LEAST16_TYPE ((const char *) NULL)
660 #endif
662 #ifndef INT_LEAST32_TYPE
663 #define INT_LEAST32_TYPE ((const char *) NULL)
664 #endif
666 #ifndef INT_LEAST64_TYPE
667 #define INT_LEAST64_TYPE ((const char *) NULL)
668 #endif
670 #ifndef UINT_LEAST8_TYPE
671 #define UINT_LEAST8_TYPE ((const char *) NULL)
672 #endif
674 #ifndef UINT_LEAST16_TYPE
675 #define UINT_LEAST16_TYPE ((const char *) NULL)
676 #endif
678 #ifndef UINT_LEAST32_TYPE
679 #define UINT_LEAST32_TYPE ((const char *) NULL)
680 #endif
682 #ifndef UINT_LEAST64_TYPE
683 #define UINT_LEAST64_TYPE ((const char *) NULL)
684 #endif
686 #ifndef INT_FAST8_TYPE
687 #define INT_FAST8_TYPE ((const char *) NULL)
688 #endif
690 #ifndef INT_FAST16_TYPE
691 #define INT_FAST16_TYPE ((const char *) NULL)
692 #endif
694 #ifndef INT_FAST32_TYPE
695 #define INT_FAST32_TYPE ((const char *) NULL)
696 #endif
698 #ifndef INT_FAST64_TYPE
699 #define INT_FAST64_TYPE ((const char *) NULL)
700 #endif
702 #ifndef UINT_FAST8_TYPE
703 #define UINT_FAST8_TYPE ((const char *) NULL)
704 #endif
706 #ifndef UINT_FAST16_TYPE
707 #define UINT_FAST16_TYPE ((const char *) NULL)
708 #endif
710 #ifndef UINT_FAST32_TYPE
711 #define UINT_FAST32_TYPE ((const char *) NULL)
712 #endif
714 #ifndef UINT_FAST64_TYPE
715 #define UINT_FAST64_TYPE ((const char *) NULL)
716 #endif
718 #ifndef INTPTR_TYPE
719 #define INTPTR_TYPE ((const char *) NULL)
720 #endif
722 #ifndef UINTPTR_TYPE
723 #define UINTPTR_TYPE ((const char *) NULL)
724 #endif
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
731 #ifndef PIC_OFFSET_TABLE_REGNUM
732 #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
733 #endif
735 #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
736 #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0
737 #endif
739 #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
740 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
741 #endif
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
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
761 #ifndef ACCUMULATE_OUTGOING_ARGS
762 #define ACCUMULATE_OUTGOING_ARGS 0
763 #endif
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
774 /* Decide whether a function's arguments should be processed
775 from first to last or from last to first.
777 They should if the stack and args grow in opposite directions, but
778 only if we have push insns. */
780 #ifdef PUSH_ROUNDING
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
788 #endif
790 #ifndef PUSH_ARGS_REVERSED
791 #define PUSH_ARGS_REVERSED 0
792 #endif
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
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
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
812 #ifndef TARGET_DEFAULT_PACK_STRUCT
813 #define TARGET_DEFAULT_PACK_STRUCT 0
814 #endif
816 /* By default, the C++ compiler will use function addresses in the
817 vtable entries. Setting this nonzero tells the compiler to use
818 function descriptors instead. The value of this macro says how
819 many words wide the descriptor is (normally 2). It is assumed
820 that the address of a function descriptor may be treated as a
821 pointer to a function. */
822 #ifndef TARGET_VTABLE_USES_DESCRIPTORS
823 #define TARGET_VTABLE_USES_DESCRIPTORS 0
824 #endif
826 /* By default, the vtable entries are void pointers, the so the alignment
827 is the same as pointer alignment. The value of this macro specifies
828 the alignment of the vtable entry in bits. It should be defined only
829 when special alignment is necessary. */
830 #ifndef TARGET_VTABLE_ENTRY_ALIGN
831 #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
832 #endif
834 /* There are a few non-descriptor entries in the vtable at offsets below
835 zero. If these entries must be padded (say, to preserve the alignment
836 specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
837 words in each data entry. */
838 #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
839 #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
840 #endif
842 /* Decide whether it is safe to use a local alias for a virtual function
843 when constructing thunks. */
844 #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
845 #ifdef ASM_OUTPUT_DEF
846 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
847 #else
848 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
849 #endif
850 #endif
852 /* Select a format to encode pointers in exception handling data. We
853 prefer those that result in fewer dynamic relocations. Assume no
854 special support here and encode direct references. */
855 #ifndef ASM_PREFERRED_EH_DATA_FORMAT
856 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
857 #endif
859 /* By default, the C++ compiler will use the lowest bit of the pointer
860 to function to indicate a pointer-to-member-function points to a
861 virtual member function. However, if FUNCTION_BOUNDARY indicates
862 function addresses aren't always even, the lowest bit of the delta
863 field will be used. */
864 #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
865 #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
866 (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
867 ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
868 #endif
870 #ifndef DEFAULT_GDB_EXTENSIONS
871 #define DEFAULT_GDB_EXTENSIONS 1
872 #endif
874 /* If more than one debugging type is supported, you must define
875 PREFERRED_DEBUGGING_TYPE to choose the default. */
877 #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
878 + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
879 + defined (VMS_DEBUGGING_INFO))
880 #ifndef PREFERRED_DEBUGGING_TYPE
881 #error You must define PREFERRED_DEBUGGING_TYPE
882 #endif /* no PREFERRED_DEBUGGING_TYPE */
884 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
885 here so other code needn't care. */
886 #elif defined DBX_DEBUGGING_INFO
887 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
889 #elif defined SDB_DEBUGGING_INFO
890 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
892 #elif defined DWARF2_DEBUGGING_INFO
893 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
895 #elif defined VMS_DEBUGGING_INFO
896 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
898 #elif defined XCOFF_DEBUGGING_INFO
899 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
901 #else
902 /* No debugging format is supported by this target. */
903 #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
904 #endif
906 #ifndef LARGEST_EXPONENT_IS_NORMAL
907 #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
908 #endif
910 #ifndef ROUND_TOWARDS_ZERO
911 #define ROUND_TOWARDS_ZERO 0
912 #endif
914 #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
915 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
916 #endif
918 /* True if the targets integer-comparison functions return { 0, 1, 2
919 } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
920 instead. The libgcc routines are biased. */
921 #ifndef TARGET_LIB_INT_CMP_BIASED
922 #define TARGET_LIB_INT_CMP_BIASED (true)
923 #endif
925 /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
926 then the word-endianness is the same as for integers. */
927 #ifndef FLOAT_WORDS_BIG_ENDIAN
928 #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
929 #endif
931 #ifdef TARGET_FLT_EVAL_METHOD
932 #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 1
933 #else
934 #define TARGET_FLT_EVAL_METHOD 0
935 #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 0
936 #endif
938 #ifndef TARGET_DEC_EVAL_METHOD
939 #define TARGET_DEC_EVAL_METHOD 2
940 #endif
942 #ifndef HOT_TEXT_SECTION_NAME
943 #define HOT_TEXT_SECTION_NAME ".text.hot"
944 #endif
946 #ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
947 #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
948 #endif
950 #ifndef HAS_LONG_COND_BRANCH
951 #define HAS_LONG_COND_BRANCH 0
952 #endif
954 #ifndef HAS_LONG_UNCOND_BRANCH
955 #define HAS_LONG_UNCOND_BRANCH 0
956 #endif
958 /* Determine whether __cxa_atexit, rather than atexit, is used to
959 register C++ destructors for local statics and global objects. */
960 #ifndef DEFAULT_USE_CXA_ATEXIT
961 #define DEFAULT_USE_CXA_ATEXIT 0
962 #endif
964 /* If none of these macros are defined, the port must use the new
965 technique of defining constraints in the machine description.
966 tm_p.h will define those macros that machine-independent code
967 still uses. */
968 #if !defined CONSTRAINT_LEN \
969 && !defined REG_CLASS_FROM_LETTER \
970 && !defined REG_CLASS_FROM_CONSTRAINT \
971 && !defined CONST_OK_FOR_LETTER_P \
972 && !defined CONST_OK_FOR_CONSTRAINT_P \
973 && !defined CONST_DOUBLE_OK_FOR_LETTER_P \
974 && !defined CONST_DOUBLE_OK_FOR_CONSTRAINT_P \
975 && !defined EXTRA_CONSTRAINT \
976 && !defined EXTRA_CONSTRAINT_STR \
977 && !defined EXTRA_MEMORY_CONSTRAINT \
978 && !defined EXTRA_ADDRESS_CONSTRAINT
980 #define USE_MD_CONSTRAINTS
982 #if GCC_VERSION >= 3000 && defined IN_GCC
983 /* These old constraint macros shouldn't appear anywhere in a
984 configuration using MD constraint definitions. */
985 #pragma GCC poison REG_CLASS_FROM_LETTER CONST_OK_FOR_LETTER_P \
986 CONST_DOUBLE_OK_FOR_LETTER_P EXTRA_CONSTRAINT
987 #endif
989 #else /* old constraint mechanism in use */
991 /* Determine whether extra constraint letter should be handled
992 via address reload (like 'o'). */
993 #ifndef EXTRA_MEMORY_CONSTRAINT
994 #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
995 #endif
997 /* Determine whether extra constraint letter should be handled
998 as an address (like 'p'). */
999 #ifndef EXTRA_ADDRESS_CONSTRAINT
1000 #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
1001 #endif
1003 /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
1004 for all the characters that it does not want to change, so things like the
1005 'length' of a digit in a matching constraint is an implementation detail,
1006 and not part of the interface. */
1007 #define DEFAULT_CONSTRAINT_LEN(C,STR) 1
1009 #ifndef CONSTRAINT_LEN
1010 #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
1011 #endif
1013 #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
1014 #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
1015 #endif
1017 #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
1018 #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
1019 CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
1020 #endif
1022 #ifndef REG_CLASS_FROM_CONSTRAINT
1023 #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
1024 #endif
1026 #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
1027 #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
1028 #endif
1030 #endif /* old constraint mechanism in use */
1032 /* Determine whether the entire c99 runtime
1033 is present in the runtime library. */
1034 #ifndef TARGET_C99_FUNCTIONS
1035 #define TARGET_C99_FUNCTIONS 0
1036 #endif
1038 /* Determine whether the target runtime library has
1039 a sincos implementation following the GNU extension. */
1040 #ifndef TARGET_HAS_SINCOS
1041 #define TARGET_HAS_SINCOS 0
1042 #endif
1044 /* Indicate that CLZ and CTZ are undefined at zero. */
1045 #ifndef CLZ_DEFINED_VALUE_AT_ZERO
1046 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
1047 #endif
1048 #ifndef CTZ_DEFINED_VALUE_AT_ZERO
1049 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
1050 #endif
1052 /* Provide a default value for STORE_FLAG_VALUE. */
1053 #ifndef STORE_FLAG_VALUE
1054 #define STORE_FLAG_VALUE 1
1055 #endif
1057 /* This macro is used to determine what the largest unit size that
1058 move_by_pieces can use is. */
1060 /* MOVE_MAX_PIECES is the number of bytes at a time which we can
1061 move efficiently, as opposed to MOVE_MAX which is the maximum
1062 number of bytes we can move with a single instruction. */
1064 #ifndef MOVE_MAX_PIECES
1065 #define MOVE_MAX_PIECES MOVE_MAX
1066 #endif
1068 #ifndef MAX_MOVE_MAX
1069 #define MAX_MOVE_MAX MOVE_MAX
1070 #endif
1072 #ifndef MIN_UNITS_PER_WORD
1073 #define MIN_UNITS_PER_WORD UNITS_PER_WORD
1074 #endif
1076 #ifndef MAX_BITS_PER_WORD
1077 #define MAX_BITS_PER_WORD BITS_PER_WORD
1078 #endif
1080 #ifndef STACK_POINTER_OFFSET
1081 #define STACK_POINTER_OFFSET 0
1082 #endif
1084 #ifndef LOCAL_REGNO
1085 #define LOCAL_REGNO(REGNO) 0
1086 #endif
1088 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
1089 the stack pointer does not matter. The value is tested only in
1090 functions that have frame pointers. */
1091 #ifndef EXIT_IGNORE_STACK
1092 #define EXIT_IGNORE_STACK 0
1093 #endif
1095 /* Assume that case vectors are not pc-relative. */
1096 #ifndef CASE_VECTOR_PC_RELATIVE
1097 #define CASE_VECTOR_PC_RELATIVE 0
1098 #endif
1100 /* Assume that trampolines need function alignment. */
1101 #ifndef TRAMPOLINE_ALIGNMENT
1102 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
1103 #endif
1105 /* Register mappings for target machines without register windows. */
1106 #ifndef INCOMING_REGNO
1107 #define INCOMING_REGNO(N) (N)
1108 #endif
1110 #ifndef OUTGOING_REGNO
1111 #define OUTGOING_REGNO(N) (N)
1112 #endif
1114 #ifndef SHIFT_COUNT_TRUNCATED
1115 #define SHIFT_COUNT_TRUNCATED 0
1116 #endif
1118 #ifndef LEGITIMATE_PIC_OPERAND_P
1119 #define LEGITIMATE_PIC_OPERAND_P(X) 1
1120 #endif
1122 #ifndef TARGET_MEM_CONSTRAINT
1123 #define TARGET_MEM_CONSTRAINT 'm'
1124 #endif
1126 #ifndef REVERSIBLE_CC_MODE
1127 #define REVERSIBLE_CC_MODE(MODE) 0
1128 #endif
1130 /* Biggest alignment supported by the object file format of this machine. */
1131 #ifndef MAX_OFILE_ALIGNMENT
1132 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
1133 #endif
1135 #ifndef FRAME_GROWS_DOWNWARD
1136 #define FRAME_GROWS_DOWNWARD 0
1137 #endif
1139 /* On most machines, the CFA coincides with the first incoming parm. */
1140 #ifndef ARG_POINTER_CFA_OFFSET
1141 #define ARG_POINTER_CFA_OFFSET(FNDECL) \
1142 (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
1143 #endif
1145 /* On most machines, we use the CFA as DW_AT_frame_base. */
1146 #ifndef CFA_FRAME_BASE_OFFSET
1147 #define CFA_FRAME_BASE_OFFSET(FNDECL) 0
1148 #endif
1150 /* The offset from the incoming value of %sp to the top of the stack frame
1151 for the current function. */
1152 #ifndef INCOMING_FRAME_SP_OFFSET
1153 #define INCOMING_FRAME_SP_OFFSET 0
1154 #endif
1156 #ifndef HARD_REGNO_NREGS_HAS_PADDING
1157 #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
1158 #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
1159 #endif
1161 #ifndef OUTGOING_REG_PARM_STACK_SPACE
1162 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
1163 #endif
1165 /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
1166 the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
1167 effort stack alignment supported by the backend. If the backend
1168 supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
1169 MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack
1170 boundary will limit the maximum guaranteed stack alignment. */
1171 #ifdef MAX_STACK_ALIGNMENT
1172 #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
1173 #else
1174 #define MAX_STACK_ALIGNMENT STACK_BOUNDARY
1175 #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
1176 #endif
1178 #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
1180 #ifndef LOCAL_ALIGNMENT
1181 #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
1182 #endif
1184 #ifndef STACK_SLOT_ALIGNMENT
1185 #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
1186 ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
1187 #endif
1189 #ifndef LOCAL_DECL_ALIGNMENT
1190 #define LOCAL_DECL_ALIGNMENT(DECL) \
1191 LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
1192 #endif
1194 #ifndef MINIMUM_ALIGNMENT
1195 #define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN)
1196 #endif
1198 /* Alignment value for attribute ((aligned)). */
1199 #ifndef ATTRIBUTE_ALIGNED_VALUE
1200 #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
1201 #endif
1203 /* Many ports have no mode-dependent addresses (except possibly autoincrement
1204 and autodecrement addresses, which are handled by target-independent code
1205 in recog.c). */
1206 #ifndef GO_IF_MODE_DEPENDENT_ADDRESS
1207 #define GO_IF_MODE_DEPENDENT_ADDRESS(X, WIN)
1208 #endif
1210 /* For most ports anything that evaluates to a constant symbolic
1211 or integer value is acceptable as a constant address. */
1212 #ifndef CONSTANT_ADDRESS_P
1213 #define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
1214 #endif
1216 #ifndef MAX_FIXED_MODE_SIZE
1217 #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
1218 #endif
1220 /* Nonzero if structures and unions should be returned in memory.
1222 This should only be defined if compatibility with another compiler or
1223 with an ABI is needed, because it results in slower code. */
1225 #ifndef DEFAULT_PCC_STRUCT_RETURN
1226 #define DEFAULT_PCC_STRUCT_RETURN 1
1227 #endif
1229 #ifdef GCC_INSN_FLAGS_H
1230 /* Dependent default target macro definitions
1232 This section of defaults.h defines target macros that depend on generated
1233 headers. This is a bit awkward: We want to put all default definitions
1234 for target macros in defaults.h, but some of the defaults depend on the
1235 HAVE_* flags defines of insn-flags.h. But insn-flags.h is not always
1236 included by files that do include defaults.h.
1238 Fortunately, the default macro definitions that depend on the HAVE_*
1239 macros are also the ones that will only be used inside GCC itself, i.e.
1240 not in the gen* programs or in target objects like libgcc.
1242 Obviously, it would be best to keep this section of defaults.h as small
1243 as possible, by converting the macros defined below to target hooks or
1244 functions.
1247 /* The default branch cost is 1. */
1248 #ifndef BRANCH_COST
1249 #define BRANCH_COST(speed_p, predictable_p) 1
1250 #endif
1252 /* If a memory-to-memory move would take MOVE_RATIO or more simple
1253 move-instruction sequences, we will do a movmem or libcall instead. */
1255 #ifndef MOVE_RATIO
1256 #if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
1257 #define MOVE_RATIO(speed) 2
1258 #else
1259 /* If we are optimizing for space (-Os), cut down the default move ratio. */
1260 #define MOVE_RATIO(speed) ((speed) ? 15 : 3)
1261 #endif
1262 #endif
1264 /* If a clear memory operation would take CLEAR_RATIO or more simple
1265 move-instruction sequences, we will do a setmem or libcall instead. */
1267 #ifndef CLEAR_RATIO
1268 #if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti)
1269 #define CLEAR_RATIO(speed) 2
1270 #else
1271 /* If we are optimizing for space, cut down the default clear ratio. */
1272 #define CLEAR_RATIO(speed) ((speed) ? 15 :3)
1273 #endif
1274 #endif
1276 /* If a memory set (to value other than zero) operation would take
1277 SET_RATIO or more simple move-instruction sequences, we will do a movmem
1278 or libcall instead. */
1279 #ifndef SET_RATIO
1280 #define SET_RATIO(speed) MOVE_RATIO(speed)
1281 #endif
1283 /* Supply a default definition for FUNCTION_ARG_PADDING:
1284 usually pad upward, but pad short args downward on
1285 big-endian machines. */
1287 #define DEFAULT_FUNCTION_ARG_PADDING(MODE, TYPE) \
1288 (! BYTES_BIG_ENDIAN \
1289 ? upward \
1290 : (((MODE) == BLKmode \
1291 ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \
1292 && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \
1293 : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \
1294 ? downward : upward))
1296 #ifndef FUNCTION_ARG_PADDING
1297 #define FUNCTION_ARG_PADDING(MODE, TYPE) \
1298 DEFAULT_FUNCTION_ARG_PADDING ((MODE), (TYPE))
1299 #endif
1301 /* Supply a default definition for FUNCTION_ARG_BOUNDARY. Normally, we let
1302 FUNCTION_ARG_PADDING, which also pads the length, handle any needed
1303 alignment. */
1305 #ifndef FUNCTION_ARG_BOUNDARY
1306 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) PARM_BOUNDARY
1307 #endif
1309 /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
1310 Normally move_insn, so Pmode stack pointer. */
1312 #ifndef STACK_SAVEAREA_MODE
1313 #define STACK_SAVEAREA_MODE(LEVEL) Pmode
1314 #endif
1316 /* Supply a default definition of STACK_SIZE_MODE for
1317 allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */
1319 #ifndef STACK_SIZE_MODE
1320 #define STACK_SIZE_MODE word_mode
1321 #endif
1323 /* Provide default values for the macros controlling stack checking. */
1325 /* The default is neither full builtin stack checking... */
1326 #ifndef STACK_CHECK_BUILTIN
1327 #define STACK_CHECK_BUILTIN 0
1328 #endif
1330 /* ...nor static builtin stack checking. */
1331 #ifndef STACK_CHECK_STATIC_BUILTIN
1332 #define STACK_CHECK_STATIC_BUILTIN 0
1333 #endif
1335 /* The default interval is one page (4096 bytes). */
1336 #ifndef STACK_CHECK_PROBE_INTERVAL_EXP
1337 #define STACK_CHECK_PROBE_INTERVAL_EXP 12
1338 #endif
1340 /* The default is not to move the stack pointer. */
1341 #ifndef STACK_CHECK_MOVING_SP
1342 #define STACK_CHECK_MOVING_SP 0
1343 #endif
1345 /* This is a kludge to try to capture the discrepancy between the old
1346 mechanism (generic stack checking) and the new mechanism (static
1347 builtin stack checking). STACK_CHECK_PROTECT needs to be bumped
1348 for the latter because part of the protection area is effectively
1349 included in STACK_CHECK_MAX_FRAME_SIZE for the former. */
1350 #ifdef STACK_CHECK_PROTECT
1351 #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
1352 #else
1353 #define STACK_OLD_CHECK_PROTECT \
1354 (targetm.except_unwind_info () == UI_SJLJ ? 75 * UNITS_PER_WORD : 8 * 1024)
1355 #endif
1357 /* Minimum amount of stack required to recover from an anticipated stack
1358 overflow detection. The default value conveys an estimate of the amount
1359 of stack required to propagate an exception. */
1360 #ifndef STACK_CHECK_PROTECT
1361 #define STACK_CHECK_PROTECT \
1362 (targetm.except_unwind_info () == UI_SJLJ ? 75 * UNITS_PER_WORD : 12 * 1024)
1363 #endif
1365 /* Make the maximum frame size be the largest we can and still only need
1366 one probe per function. */
1367 #ifndef STACK_CHECK_MAX_FRAME_SIZE
1368 #define STACK_CHECK_MAX_FRAME_SIZE \
1369 ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
1370 #endif
1372 /* This is arbitrary, but should be large enough everywhere. */
1373 #ifndef STACK_CHECK_FIXED_FRAME_SIZE
1374 #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD)
1375 #endif
1377 /* Provide a reasonable default for the maximum size of an object to
1378 allocate in the fixed frame. We may need to be able to make this
1379 controllable by the user at some point. */
1380 #ifndef STACK_CHECK_MAX_VAR_SIZE
1381 #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
1382 #endif
1384 #ifndef SWITCHABLE_TARGET
1385 #define SWITCHABLE_TARGET 0
1386 #endif
1388 #endif /* GCC_INSN_FLAGS_H */
1390 #endif /* ! GCC_DEFAULTS_H */