1 /* Definitions of various defaults for tm.h macros.
2 Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
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
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
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)
35 #define obstack_chunk_alloc ((void *(*) (long)) xmalloc)
36 #define obstack_chunk_free ((void (*) (void *)) free)
37 #define OBSTACK_CHUNK_SIZE 0
38 #define gcc_obstack_init(OBSTACK) \
39 _obstack_begin ((OBSTACK), OBSTACK_CHUNK_SIZE, 0, \
40 obstack_chunk_alloc, \
43 /* Store in OUTPUT a string (made with alloca) containing an
44 assembler-name for a local static variable or function named NAME.
45 LABELNO is an integer which is different for each call. */
48 # ifndef NO_DOT_IN_LABEL
49 # define ASM_PN_FORMAT "%s.%lu"
51 # ifndef NO_DOLLAR_IN_LABEL
52 # define ASM_PN_FORMAT "%s$%lu"
54 # define ASM_PN_FORMAT "__%s_%lu"
57 #endif /* ! ASM_PN_FORMAT */
59 #ifndef ASM_FORMAT_PRIVATE_NAME
60 # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
61 do { const char *const name_ = (NAME); \
62 char *const output_ = (OUTPUT) = \
63 (char *) alloca (strlen (name_) + 32); \
64 sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
68 /* Choose a reasonable default for ASM_OUTPUT_ASCII. */
70 #ifndef ASM_OUTPUT_ASCII
71 #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
73 FILE *_hide_asm_out_file = (MYFILE); \
74 const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
75 int _hide_thissize = (MYLENGTH); \
77 FILE *asm_out_file = _hide_asm_out_file; \
78 const unsigned char *p = _hide_p; \
79 int thissize = _hide_thissize; \
81 fprintf (asm_out_file, "\t.ascii \""); \
83 for (i = 0; i < thissize; i++) \
86 if (c == '\"' || c == '\\') \
87 putc ('\\', asm_out_file); \
89 putc (c, asm_out_file); \
92 fprintf (asm_out_file, "\\%o", c); \
93 /* After an octal-escape, if a digit follows, \
94 terminate one string constant and start another. \
95 The VAX assembler fails to stop reading the escape \
96 after three digits, so this is the only way we \
97 can get it to parse the data properly. */ \
98 if (i < thissize - 1 && ISDIGIT(p[i + 1])) \
99 fprintf (asm_out_file, "\"\n\t.ascii \""); \
102 fprintf (asm_out_file, "\"\n"); \
108 /* This is how we tell the assembler to equate two values. */
110 #ifndef ASM_OUTPUT_DEF
111 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
112 do { fprintf ((FILE), "%s", SET_ASM_OP); \
113 assemble_name (FILE, LABEL1); \
114 fprintf (FILE, ","); \
115 assemble_name (FILE, LABEL2); \
116 fprintf (FILE, "\n"); \
121 #if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON)
122 #define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \
125 fprintf ((FILE), "\t.tls_common\t"); \
126 assemble_name ((FILE), (NAME)); \
127 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
128 (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \
133 /* Decide whether to defer emitting the assembler output for an equate
134 of two values. The default is to not defer output. */
135 #ifndef TARGET_DEFERRED_OUTPUT_DEFS
136 #define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
139 /* This is how to output the definition of a user-level label named
140 NAME, such as the label on a static function or variable NAME. */
142 #ifndef ASM_OUTPUT_LABEL
143 #define ASM_OUTPUT_LABEL(FILE,NAME) \
144 do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
147 /* Output the definition of a compiler-generated label named NAME. */
148 #ifndef ASM_OUTPUT_INTERNAL_LABEL
149 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \
151 assemble_name_raw ((FILE), (NAME)); \
152 fputs (":\n", (FILE)); \
156 /* This is how to output a reference to a user-level label named NAME. */
158 #ifndef ASM_OUTPUT_LABELREF
159 #define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
162 /* Allow target to print debug info labels specially. This is useful for
163 VLIW targets, since debug info labels should go into the middle of
164 instruction bundles instead of breaking them. */
166 #ifndef ASM_OUTPUT_DEBUG_LABEL
167 #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
168 (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
171 /* This is how we tell the assembler that a symbol is weak. */
172 #ifndef ASM_OUTPUT_WEAK_ALIAS
173 #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
174 #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
177 ASM_WEAKEN_LABEL (STREAM, NAME); \
179 ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
185 /* This is how we tell the assembler that a symbol is a weak alias to
186 another symbol that doesn't require the other symbol to be defined.
187 Uses of the former will turn into weak uses of the latter, i.e.,
188 uses that, in case the latter is undefined, will not cause errors,
189 and will add it to the symbol table as weak undefined. However, if
190 the latter is referenced directly, a strong reference prevails. */
191 #ifndef ASM_OUTPUT_WEAKREF
192 #if defined HAVE_GAS_WEAKREF
193 #define ASM_OUTPUT_WEAKREF(FILE, DECL, NAME, VALUE) \
196 fprintf ((FILE), "\t.weakref\t"); \
197 assemble_name ((FILE), (NAME)); \
198 fprintf ((FILE), ","); \
199 assemble_name ((FILE), (VALUE)); \
200 fprintf ((FILE), "\n"); \
206 /* How to emit a .type directive. */
207 #ifndef ASM_OUTPUT_TYPE_DIRECTIVE
208 #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
209 #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
212 fputs (TYPE_ASM_OP, STREAM); \
213 assemble_name (STREAM, NAME); \
214 fputs (", ", STREAM); \
215 fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
216 putc ('\n', STREAM); \
222 /* How to emit a .size directive. */
223 #ifndef ASM_OUTPUT_SIZE_DIRECTIVE
225 #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
228 HOST_WIDE_INT size_ = (SIZE); \
229 fputs (SIZE_ASM_OP, STREAM); \
230 assemble_name (STREAM, NAME); \
231 fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
235 #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
238 fputs (SIZE_ASM_OP, STREAM); \
239 assemble_name (STREAM, NAME); \
240 fputs (", .-", STREAM); \
241 assemble_name (STREAM, NAME); \
242 putc ('\n', STREAM); \
249 /* This determines whether or not we support weak symbols. */
250 #ifndef SUPPORTS_WEAK
251 #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
252 #define SUPPORTS_WEAK 1
254 #define SUPPORTS_WEAK 0
258 /* This determines whether or not we support link-once semantics. */
259 #ifndef SUPPORTS_ONE_ONLY
260 #ifdef MAKE_DECL_ONE_ONLY
261 #define SUPPORTS_ONE_ONLY 1
263 #define SUPPORTS_ONE_ONLY 0
267 /* This determines whether weak symbols must be left out of a static
268 archive's table of contents. Defining this macro to be nonzero has
269 the consequence that certain symbols will not be made weak that
270 otherwise would be. The C++ ABI requires this macro to be zero;
271 see the documentation. */
272 #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
273 #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
276 /* This determines whether or not we need linkonce unwind information. */
277 #ifndef TARGET_USES_WEAK_UNWIND_INFO
278 #define TARGET_USES_WEAK_UNWIND_INFO 0
281 /* By default, there is no prefix on user-defined symbols. */
282 #ifndef USER_LABEL_PREFIX
283 #define USER_LABEL_PREFIX ""
286 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
287 provide a weak attribute. Else define it to nothing.
289 This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
290 not available at that time.
292 Note, this is only for use by target files which we know are to be
294 #ifndef TARGET_ATTRIBUTE_WEAK
296 # define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
298 # define TARGET_ATTRIBUTE_WEAK
302 /* Determines whether we may use common symbols to represent one-only
303 semantics (a.k.a. "vague linkage"). */
304 #ifndef USE_COMMON_FOR_ONE_ONLY
305 # define USE_COMMON_FOR_ONE_ONLY 1
308 /* By default we can assume that all global symbols are in one namespace,
309 across all shared libraries. */
310 #ifndef MULTIPLE_SYMBOL_SPACES
311 # define MULTIPLE_SYMBOL_SPACES 0
314 /* If the target supports init_priority C++ attribute, give
315 SUPPORTS_INIT_PRIORITY a nonzero value. */
316 #ifndef SUPPORTS_INIT_PRIORITY
317 #define SUPPORTS_INIT_PRIORITY 1
318 #endif /* SUPPORTS_INIT_PRIORITY */
320 /* If duplicate library search directories can be removed from a
321 linker command without changing the linker's semantics, give this
323 #ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
324 #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0
325 #endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */
327 /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
328 the rest of the DWARF 2 frame unwind support is also provided. */
329 #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX) \
330 && !defined (TARGET_UNWIND_INFO)
331 #define DWARF2_UNWIND_INFO 1
334 /* If we have named sections, and we're using crtstuff to run ctors,
335 use them for registering eh frame information. */
336 #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
337 && !defined(EH_FRAME_IN_DATA_SECTION)
338 #ifndef EH_FRAME_SECTION_NAME
339 #define EH_FRAME_SECTION_NAME ".eh_frame"
343 /* On many systems, different EH table encodings are used under
344 difference circumstances. Some will require runtime relocations;
345 some will not. For those that do not require runtime relocations,
346 we would like to make the table read-only. However, since the
347 read-only tables may need to be combined with read-write tables
348 that do require runtime relocation, it is not safe to make the
349 tables read-only unless the linker will merge read-only and
350 read-write sections into a single read-write section. If your
351 linker does not have this ability, but your system is such that no
352 encoding used with non-PIC code will ever require a runtime
353 relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
354 your target configuration file. */
355 #ifndef EH_TABLES_CAN_BE_READ_ONLY
356 #ifdef HAVE_LD_RO_RW_SECTION_MIXING
357 #define EH_TABLES_CAN_BE_READ_ONLY 1
359 #define EH_TABLES_CAN_BE_READ_ONLY 0
363 /* If we have named section and we support weak symbols, then use the
364 .jcr section for recording java classes which need to be registered
365 at program start-up time. */
366 #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
367 #ifndef JCR_SECTION_NAME
368 #define JCR_SECTION_NAME ".jcr"
372 /* This decision to use a .jcr section can be overridden by defining
373 USE_JCR_SECTION to 0 in target file. This is necessary if target
374 can define JCR_SECTION_NAME but does not have crtstuff or
375 linker support for .jcr section. */
376 #ifndef TARGET_USE_JCR_SECTION
377 #ifdef JCR_SECTION_NAME
378 #define TARGET_USE_JCR_SECTION 1
380 #define TARGET_USE_JCR_SECTION 0
384 /* Number of hardware registers that go into the DWARF-2 unwind info.
385 If not defined, equals FIRST_PSEUDO_REGISTER */
387 #ifndef DWARF_FRAME_REGISTERS
388 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
391 /* How to renumber registers for dbx and gdb. If not defined, assume
392 no renumbering is necessary. */
394 #ifndef DBX_REGISTER_NUMBER
395 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
398 /* Default sizes for base C types. If the sizes are different for
399 your target, you should override these values by defining the
400 appropriate symbols in your tm.h file. */
402 #ifndef BITS_PER_UNIT
403 #define BITS_PER_UNIT 8
406 #ifndef BITS_PER_WORD
407 #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
410 #ifndef CHAR_TYPE_SIZE
411 #define CHAR_TYPE_SIZE BITS_PER_UNIT
414 #ifndef BOOL_TYPE_SIZE
415 /* `bool' has size and alignment `1', on almost all platforms. */
416 #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
419 #ifndef SHORT_TYPE_SIZE
420 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
423 #ifndef INT_TYPE_SIZE
424 #define INT_TYPE_SIZE BITS_PER_WORD
427 #ifndef LONG_TYPE_SIZE
428 #define LONG_TYPE_SIZE BITS_PER_WORD
431 #ifndef LONG_LONG_TYPE_SIZE
432 #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
435 #ifndef WCHAR_TYPE_SIZE
436 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
439 #ifndef FLOAT_TYPE_SIZE
440 #define FLOAT_TYPE_SIZE BITS_PER_WORD
443 #ifndef DOUBLE_TYPE_SIZE
444 #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
447 #ifndef LONG_DOUBLE_TYPE_SIZE
448 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
451 #ifndef DECIMAL32_TYPE_SIZE
452 #define DECIMAL32_TYPE_SIZE 32
455 #ifndef DECIMAL64_TYPE_SIZE
456 #define DECIMAL64_TYPE_SIZE 64
459 #ifndef DECIMAL128_TYPE_SIZE
460 #define DECIMAL128_TYPE_SIZE 128
463 #ifndef SHORT_FRACT_TYPE_SIZE
464 #define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT
467 #ifndef FRACT_TYPE_SIZE
468 #define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2)
471 #ifndef LONG_FRACT_TYPE_SIZE
472 #define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4)
475 #ifndef LONG_LONG_FRACT_TYPE_SIZE
476 #define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8)
479 #ifndef SHORT_ACCUM_TYPE_SIZE
480 #define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2)
483 #ifndef ACCUM_TYPE_SIZE
484 #define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2)
487 #ifndef LONG_ACCUM_TYPE_SIZE
488 #define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2)
491 #ifndef LONG_LONG_ACCUM_TYPE_SIZE
492 #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2)
495 /* We let tm.h override the types used here, to handle trivial differences
496 such as the choice of unsigned int or long unsigned int for size_t.
497 When machines start needing nontrivial differences in the size type,
498 it would be best to do something here to figure out automatically
499 from other information what type to use. */
502 #define SIZE_TYPE "long unsigned int"
506 #define PID_TYPE "int"
509 /* If GCC knows the exact uint_least16_t and uint_least32_t types from
510 <stdint.h>, use them for char16_t and char32_t. Otherwise, use
511 these guesses; getting the wrong type of a given width will not
512 affect C++ name mangling because in C++ these are distinct types
515 #ifdef UINT_LEAST16_TYPE
516 #define CHAR16_TYPE UINT_LEAST16_TYPE
518 #define CHAR16_TYPE "short unsigned int"
521 #ifdef UINT_LEAST32_TYPE
522 #define CHAR32_TYPE UINT_LEAST32_TYPE
524 #define CHAR32_TYPE "unsigned int"
528 #define WCHAR_TYPE "int"
531 /* WCHAR_TYPE gets overridden by -fshort-wchar. */
532 #define MODIFIED_WCHAR_TYPE \
533 (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
536 #define PTRDIFF_TYPE "long int"
540 #define WINT_TYPE "unsigned int"
544 #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
546 : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
552 #define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
554 : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
555 ? "long unsigned int" \
556 : "long long unsigned int"))
560 /* There are no default definitions of these <stdint.h> types. */
562 #ifndef SIG_ATOMIC_TYPE
563 #define SIG_ATOMIC_TYPE ((const char *) NULL)
567 #define INT8_TYPE ((const char *) NULL)
571 #define INT16_TYPE ((const char *) NULL)
575 #define INT32_TYPE ((const char *) NULL)
579 #define INT64_TYPE ((const char *) NULL)
583 #define UINT8_TYPE ((const char *) NULL)
587 #define UINT16_TYPE ((const char *) NULL)
591 #define UINT32_TYPE ((const char *) NULL)
595 #define UINT64_TYPE ((const char *) NULL)
598 #ifndef INT_LEAST8_TYPE
599 #define INT_LEAST8_TYPE ((const char *) NULL)
602 #ifndef INT_LEAST16_TYPE
603 #define INT_LEAST16_TYPE ((const char *) NULL)
606 #ifndef INT_LEAST32_TYPE
607 #define INT_LEAST32_TYPE ((const char *) NULL)
610 #ifndef INT_LEAST64_TYPE
611 #define INT_LEAST64_TYPE ((const char *) NULL)
614 #ifndef UINT_LEAST8_TYPE
615 #define UINT_LEAST8_TYPE ((const char *) NULL)
618 #ifndef UINT_LEAST16_TYPE
619 #define UINT_LEAST16_TYPE ((const char *) NULL)
622 #ifndef UINT_LEAST32_TYPE
623 #define UINT_LEAST32_TYPE ((const char *) NULL)
626 #ifndef UINT_LEAST64_TYPE
627 #define UINT_LEAST64_TYPE ((const char *) NULL)
630 #ifndef INT_FAST8_TYPE
631 #define INT_FAST8_TYPE ((const char *) NULL)
634 #ifndef INT_FAST16_TYPE
635 #define INT_FAST16_TYPE ((const char *) NULL)
638 #ifndef INT_FAST32_TYPE
639 #define INT_FAST32_TYPE ((const char *) NULL)
642 #ifndef INT_FAST64_TYPE
643 #define INT_FAST64_TYPE ((const char *) NULL)
646 #ifndef UINT_FAST8_TYPE
647 #define UINT_FAST8_TYPE ((const char *) NULL)
650 #ifndef UINT_FAST16_TYPE
651 #define UINT_FAST16_TYPE ((const char *) NULL)
654 #ifndef UINT_FAST32_TYPE
655 #define UINT_FAST32_TYPE ((const char *) NULL)
658 #ifndef UINT_FAST64_TYPE
659 #define UINT_FAST64_TYPE ((const char *) NULL)
663 #define INTPTR_TYPE ((const char *) NULL)
667 #define UINTPTR_TYPE ((const char *) NULL)
670 /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
672 #define POINTER_SIZE BITS_PER_WORD
675 #ifndef PIC_OFFSET_TABLE_REGNUM
676 #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
679 #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
680 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
683 #ifndef TARGET_DECLSPEC
684 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
685 /* If the target supports the "dllimport" attribute, users are
686 probably used to the "__declspec" syntax. */
687 #define TARGET_DECLSPEC 1
689 #define TARGET_DECLSPEC 0
693 /* By default, the preprocessor should be invoked the same way in C++
695 #ifndef CPLUSPLUS_CPP_SPEC
697 #define CPLUSPLUS_CPP_SPEC CPP_SPEC
701 #ifndef ACCUMULATE_OUTGOING_ARGS
702 #define ACCUMULATE_OUTGOING_ARGS 0
705 /* Supply a default definition for PUSH_ARGS. */
708 #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
714 /* Decide whether a function's arguments should be processed
715 from first to last or from last to first.
717 They should if the stack and args grow in opposite directions, but
718 only if we have push insns. */
722 #ifndef PUSH_ARGS_REVERSED
723 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
724 #define PUSH_ARGS_REVERSED PUSH_ARGS
730 #ifndef PUSH_ARGS_REVERSED
731 #define PUSH_ARGS_REVERSED 0
734 /* Default value for the alignment (in bits) a C conformant malloc has to
735 provide. This default is intended to be safe and always correct. */
736 #ifndef MALLOC_ABI_ALIGNMENT
737 #define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
740 /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
741 STACK_BOUNDARY is required. */
742 #ifndef PREFERRED_STACK_BOUNDARY
743 #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
746 /* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not
748 #ifndef INCOMING_STACK_BOUNDARY
749 #define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY
752 #ifndef TARGET_DEFAULT_PACK_STRUCT
753 #define TARGET_DEFAULT_PACK_STRUCT 0
756 /* By default, the C++ compiler will use function addresses in the
757 vtable entries. Setting this nonzero tells the compiler to use
758 function descriptors instead. The value of this macro says how
759 many words wide the descriptor is (normally 2). It is assumed
760 that the address of a function descriptor may be treated as a
761 pointer to a function. */
762 #ifndef TARGET_VTABLE_USES_DESCRIPTORS
763 #define TARGET_VTABLE_USES_DESCRIPTORS 0
766 /* By default, the vtable entries are void pointers, the so the alignment
767 is the same as pointer alignment. The value of this macro specifies
768 the alignment of the vtable entry in bits. It should be defined only
769 when special alignment is necessary. */
770 #ifndef TARGET_VTABLE_ENTRY_ALIGN
771 #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
774 /* There are a few non-descriptor entries in the vtable at offsets below
775 zero. If these entries must be padded (say, to preserve the alignment
776 specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
777 words in each data entry. */
778 #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
779 #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
782 /* Decide whether it is safe to use a local alias for a virtual function
783 when constructing thunks. */
784 #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
785 #ifdef ASM_OUTPUT_DEF
786 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
788 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
792 /* Select a format to encode pointers in exception handling data. We
793 prefer those that result in fewer dynamic relocations. Assume no
794 special support here and encode direct references. */
795 #ifndef ASM_PREFERRED_EH_DATA_FORMAT
796 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
799 /* By default, the C++ compiler will use the lowest bit of the pointer
800 to function to indicate a pointer-to-member-function points to a
801 virtual member function. However, if FUNCTION_BOUNDARY indicates
802 function addresses aren't always even, the lowest bit of the delta
803 field will be used. */
804 #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
805 #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
806 (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
807 ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
810 #ifndef DEFAULT_GDB_EXTENSIONS
811 #define DEFAULT_GDB_EXTENSIONS 1
814 /* If more than one debugging type is supported, you must define
815 PREFERRED_DEBUGGING_TYPE to choose the default. */
817 #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
818 + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
819 + defined (VMS_DEBUGGING_INFO))
820 #ifndef PREFERRED_DEBUGGING_TYPE
821 #error You must define PREFERRED_DEBUGGING_TYPE
822 #endif /* no PREFERRED_DEBUGGING_TYPE */
824 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
825 here so other code needn't care. */
826 #elif defined DBX_DEBUGGING_INFO
827 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
829 #elif defined SDB_DEBUGGING_INFO
830 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
832 #elif defined DWARF2_DEBUGGING_INFO
833 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
835 #elif defined VMS_DEBUGGING_INFO
836 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
838 #elif defined XCOFF_DEBUGGING_INFO
839 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
842 /* No debugging format is supported by this target. */
843 #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
846 #ifndef LARGEST_EXPONENT_IS_NORMAL
847 #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
850 #ifndef ROUND_TOWARDS_ZERO
851 #define ROUND_TOWARDS_ZERO 0
854 #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
855 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
858 /* True if the targets integer-comparison functions return { 0, 1, 2
859 } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
860 instead. The libgcc routines are biased. */
861 #ifndef TARGET_LIB_INT_CMP_BIASED
862 #define TARGET_LIB_INT_CMP_BIASED (true)
865 /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
866 then the word-endianness is the same as for integers. */
867 #ifndef FLOAT_WORDS_BIG_ENDIAN
868 #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
871 #ifdef TARGET_FLT_EVAL_METHOD
872 #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 1
874 #define TARGET_FLT_EVAL_METHOD 0
875 #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 0
878 #ifndef TARGET_DEC_EVAL_METHOD
879 #define TARGET_DEC_EVAL_METHOD 2
882 #ifndef HOT_TEXT_SECTION_NAME
883 #define HOT_TEXT_SECTION_NAME ".text.hot"
886 #ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
887 #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
890 #ifndef HAS_LONG_COND_BRANCH
891 #define HAS_LONG_COND_BRANCH 0
894 #ifndef HAS_LONG_UNCOND_BRANCH
895 #define HAS_LONG_UNCOND_BRANCH 0
898 /* By default, only attempt to parallelize bitwise operations, and
899 possibly adds/subtracts using bit-twiddling. */
900 #ifndef UNITS_PER_SIMD_WORD
901 #define UNITS_PER_SIMD_WORD(MODE) UNITS_PER_WORD
904 /* Determine whether __cxa_atexit, rather than atexit, is used to
905 register C++ destructors for local statics and global objects. */
906 #ifndef DEFAULT_USE_CXA_ATEXIT
907 #define DEFAULT_USE_CXA_ATEXIT 0
910 /* If none of these macros are defined, the port must use the new
911 technique of defining constraints in the machine description.
912 tm_p.h will define those macros that machine-independent code
914 #if !defined CONSTRAINT_LEN \
915 && !defined REG_CLASS_FROM_LETTER \
916 && !defined REG_CLASS_FROM_CONSTRAINT \
917 && !defined CONST_OK_FOR_LETTER_P \
918 && !defined CONST_OK_FOR_CONSTRAINT_P \
919 && !defined CONST_DOUBLE_OK_FOR_LETTER_P \
920 && !defined CONST_DOUBLE_OK_FOR_CONSTRAINT_P \
921 && !defined EXTRA_CONSTRAINT \
922 && !defined EXTRA_CONSTRAINT_STR \
923 && !defined EXTRA_MEMORY_CONSTRAINT \
924 && !defined EXTRA_ADDRESS_CONSTRAINT
926 #define USE_MD_CONSTRAINTS
928 #if GCC_VERSION >= 3000 && defined IN_GCC
929 /* These old constraint macros shouldn't appear anywhere in a
930 configuration using MD constraint definitions. */
931 #pragma GCC poison REG_CLASS_FROM_LETTER CONST_OK_FOR_LETTER_P \
932 CONST_DOUBLE_OK_FOR_LETTER_P EXTRA_CONSTRAINT
935 #else /* old constraint mechanism in use */
937 /* Determine whether extra constraint letter should be handled
938 via address reload (like 'o'). */
939 #ifndef EXTRA_MEMORY_CONSTRAINT
940 #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
943 /* Determine whether extra constraint letter should be handled
944 as an address (like 'p'). */
945 #ifndef EXTRA_ADDRESS_CONSTRAINT
946 #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
949 /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
950 for all the characters that it does not want to change, so things like the
951 'length' of a digit in a matching constraint is an implementation detail,
952 and not part of the interface. */
953 #define DEFAULT_CONSTRAINT_LEN(C,STR) 1
955 #ifndef CONSTRAINT_LEN
956 #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
959 #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
960 #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
963 #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
964 #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
965 CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
968 #ifndef REG_CLASS_FROM_CONSTRAINT
969 #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
972 #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
973 #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
976 #endif /* old constraint mechanism in use */
978 #ifndef REGISTER_MOVE_COST
979 #define REGISTER_MOVE_COST(m, x, y) 2
982 /* Determine whether the entire c99 runtime
983 is present in the runtime library. */
984 #ifndef TARGET_C99_FUNCTIONS
985 #define TARGET_C99_FUNCTIONS 0
988 /* Determine whether the target runtime library has
989 a sincos implementation following the GNU extension. */
990 #ifndef TARGET_HAS_SINCOS
991 #define TARGET_HAS_SINCOS 0
994 /* Indicate that CLZ and CTZ are undefined at zero. */
995 #ifndef CLZ_DEFINED_VALUE_AT_ZERO
996 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
998 #ifndef CTZ_DEFINED_VALUE_AT_ZERO
999 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
1002 /* Provide a default value for STORE_FLAG_VALUE. */
1003 #ifndef STORE_FLAG_VALUE
1004 #define STORE_FLAG_VALUE 1
1007 /* This macro is used to determine what the largest unit size that
1008 move_by_pieces can use is. */
1010 /* MOVE_MAX_PIECES is the number of bytes at a time which we can
1011 move efficiently, as opposed to MOVE_MAX which is the maximum
1012 number of bytes we can move with a single instruction. */
1014 #ifndef MOVE_MAX_PIECES
1015 #define MOVE_MAX_PIECES MOVE_MAX
1018 #ifndef STACK_POINTER_OFFSET
1019 #define STACK_POINTER_OFFSET 0
1023 #define LOCAL_REGNO(REGNO) 0
1026 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
1027 the stack pointer does not matter. The value is tested only in
1028 functions that have frame pointers. */
1029 #ifndef EXIT_IGNORE_STACK
1030 #define EXIT_IGNORE_STACK 0
1033 /* Assume that case vectors are not pc-relative. */
1034 #ifndef CASE_VECTOR_PC_RELATIVE
1035 #define CASE_VECTOR_PC_RELATIVE 0
1038 /* Assume that trampolines need function alignment. */
1039 #ifndef TRAMPOLINE_ALIGNMENT
1040 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
1043 /* Register mappings for target machines without register windows. */
1044 #ifndef INCOMING_REGNO
1045 #define INCOMING_REGNO(N) (N)
1048 #ifndef OUTGOING_REGNO
1049 #define OUTGOING_REGNO(N) (N)
1052 #ifndef SHIFT_COUNT_TRUNCATED
1053 #define SHIFT_COUNT_TRUNCATED 0
1056 #ifndef LEGITIMATE_PIC_OPERAND_P
1057 #define LEGITIMATE_PIC_OPERAND_P(X) 1
1060 #ifndef TARGET_MEM_CONSTRAINT
1061 #define TARGET_MEM_CONSTRAINT 'm'
1064 #ifndef REVERSIBLE_CC_MODE
1065 #define REVERSIBLE_CC_MODE(MODE) 0
1068 /* Biggest alignment supported by the object file format of this machine. */
1069 #ifndef MAX_OFILE_ALIGNMENT
1070 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
1073 #ifndef FRAME_GROWS_DOWNWARD
1074 #define FRAME_GROWS_DOWNWARD 0
1077 /* On most machines, the CFA coincides with the first incoming parm. */
1078 #ifndef ARG_POINTER_CFA_OFFSET
1079 #define ARG_POINTER_CFA_OFFSET(FNDECL) FIRST_PARM_OFFSET (FNDECL)
1082 /* On most machines, we use the CFA as DW_AT_frame_base. */
1083 #ifndef CFA_FRAME_BASE_OFFSET
1084 #define CFA_FRAME_BASE_OFFSET(FNDECL) 0
1087 /* The offset from the incoming value of %sp to the top of the stack frame
1088 for the current function. */
1089 #ifndef INCOMING_FRAME_SP_OFFSET
1090 #define INCOMING_FRAME_SP_OFFSET 0
1093 #ifndef HARD_REGNO_NREGS_HAS_PADDING
1094 #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
1095 #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
1098 #ifndef OUTGOING_REG_PARM_STACK_SPACE
1099 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
1102 /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
1103 the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
1104 effort stack alignment supported by the backend. If the backend
1105 supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
1106 MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack
1107 boundary will limit the maximum guaranteed stack alignment. */
1108 #ifdef MAX_STACK_ALIGNMENT
1109 #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
1111 #define MAX_STACK_ALIGNMENT STACK_BOUNDARY
1112 #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
1115 #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
1117 #ifndef LOCAL_ALIGNMENT
1118 #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
1121 #ifndef STACK_SLOT_ALIGNMENT
1122 #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
1123 ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
1126 #ifndef LOCAL_DECL_ALIGNMENT
1127 #define LOCAL_DECL_ALIGNMENT(DECL) \
1128 LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
1131 /* Alignment value for attribute ((aligned)). */
1132 #ifndef ATTRIBUTE_ALIGNED_VALUE
1133 #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
1136 /* Many ports have no mode-dependent addresses (except possibly autoincrement
1137 and autodecrement addresses, which are handled by target-independent code
1139 #ifndef GO_IF_MODE_DEPENDENT_ADDRESS
1140 #define GO_IF_MODE_DEPENDENT_ADDRESS(X, WIN)
1143 #ifndef FRAME_POINTER_REQUIRED
1144 #define FRAME_POINTER_REQUIRED false
1147 #endif /* ! GCC_DEFAULTS_H */