linux-unwind.h: Add exception clause to copyright.
[official-gcc.git] / gcc / defaults.h
blob7c8812963940181ebec0ef3a36b586670a7bad2a
1 /* Definitions of various defaults for tm.h macros.
2 Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005
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 2, 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 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING. If not, write to the Free
21 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 02111-1307, USA. */
24 #ifndef GCC_DEFAULTS_H
25 #define GCC_DEFAULTS_H
27 #ifndef GET_ENVIRONMENT
28 #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
29 #endif
31 #define obstack_chunk_alloc ((void *(*) (long)) xmalloc)
32 #define obstack_chunk_free ((void (*) (void *)) free)
33 #define OBSTACK_CHUNK_SIZE 0
34 #define gcc_obstack_init(OBSTACK) \
35 _obstack_begin ((OBSTACK), OBSTACK_CHUNK_SIZE, 0, \
36 obstack_chunk_alloc, \
37 obstack_chunk_free)
39 /* Define default standard character escape sequences. */
40 #ifndef TARGET_BELL
41 # define TARGET_BELL 007
42 # define TARGET_BS 010
43 # define TARGET_CR 015
44 # define TARGET_DIGIT0 060
45 # define TARGET_ESC 033
46 # define TARGET_FF 014
47 # define TARGET_NEWLINE 012
48 # define TARGET_TAB 011
49 # define TARGET_VT 013
50 #endif
52 /* Store in OUTPUT a string (made with alloca) containing an
53 assembler-name for a local static variable or function named NAME.
54 LABELNO is an integer which is different for each call. */
56 #ifndef ASM_PN_FORMAT
57 # ifndef NO_DOT_IN_LABEL
58 # define ASM_PN_FORMAT "%s.%lu"
59 # else
60 # ifndef NO_DOLLAR_IN_LABEL
61 # define ASM_PN_FORMAT "%s$%lu"
62 # else
63 # define ASM_PN_FORMAT "__%s_%lu"
64 # endif
65 # endif
66 #endif /* ! ASM_PN_FORMAT */
68 #ifndef ASM_FORMAT_PRIVATE_NAME
69 # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
70 do { const char *const name_ = (NAME); \
71 char *const output_ = (OUTPUT) = \
72 (char *) alloca (strlen (name_) + 32); \
73 sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
74 } while (0)
75 #endif
77 /* This is how to output an element of a case-vector that is absolute.
78 Some targets don't use this, but we have to define it anyway. */
80 #ifndef ASM_OUTPUT_ADDR_VEC_ELT
81 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
82 do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
83 (*targetm.asm_out.internal_label) (FILE, "L", (VALUE)); \
84 fputc ('\n', FILE); \
85 } while (0)
86 #endif
88 /* Choose a reasonable default for ASM_OUTPUT_ASCII. */
90 #ifndef ASM_OUTPUT_ASCII
91 #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
92 do { \
93 FILE *_hide_asm_out_file = (MYFILE); \
94 const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
95 int _hide_thissize = (MYLENGTH); \
96 { \
97 FILE *asm_out_file = _hide_asm_out_file; \
98 const unsigned char *p = _hide_p; \
99 int thissize = _hide_thissize; \
100 int i; \
101 fprintf (asm_out_file, "\t.ascii \""); \
103 for (i = 0; i < thissize; i++) \
105 int c = p[i]; \
106 if (c == '\"' || c == '\\') \
107 putc ('\\', asm_out_file); \
108 if (ISPRINT(c)) \
109 putc (c, asm_out_file); \
110 else \
112 fprintf (asm_out_file, "\\%o", c); \
113 /* After an octal-escape, if a digit follows, \
114 terminate one string constant and start another. \
115 The VAX assembler fails to stop reading the escape \
116 after three digits, so this is the only way we \
117 can get it to parse the data properly. */ \
118 if (i < thissize - 1 && ISDIGIT(p[i + 1])) \
119 fprintf (asm_out_file, "\"\n\t.ascii \""); \
122 fprintf (asm_out_file, "\"\n"); \
125 while (0)
126 #endif
128 /* This is how we tell the assembler to equate two values. */
129 #ifdef SET_ASM_OP
130 #ifndef ASM_OUTPUT_DEF
131 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
132 do { fprintf ((FILE), "%s", SET_ASM_OP); \
133 assemble_name (FILE, LABEL1); \
134 fprintf (FILE, ","); \
135 assemble_name (FILE, LABEL2); \
136 fprintf (FILE, "\n"); \
137 } while (0)
138 #endif
139 #endif
141 /* Decide whether to defer emitting the assembler output for an equate
142 of two values. The default is to not defer output. */
143 #ifndef TARGET_DEFERRED_OUTPUT_DEFS
144 #define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
145 #endif
147 /* This is how to output the definition of a user-level label named
148 NAME, such as the label on a static function or variable NAME. */
150 #ifndef ASM_OUTPUT_LABEL
151 #define ASM_OUTPUT_LABEL(FILE,NAME) \
152 do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
153 #endif
155 /* Output the definition of a compiler-generated label named NAME. */
156 #ifndef ASM_OUTPUT_INTERNAL_LABEL
157 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \
158 do { \
159 assemble_name_raw ((FILE), (NAME)); \
160 fputs (":\n", (FILE)); \
161 } while (0)
162 #endif
164 /* This is how to output a reference to a user-level label named NAME. */
166 #ifndef ASM_OUTPUT_LABELREF
167 #define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
168 #endif
170 /* Allow target to print debug info labels specially. This is useful for
171 VLIW targets, since debug info labels should go into the middle of
172 instruction bundles instead of breaking them. */
174 #ifndef ASM_OUTPUT_DEBUG_LABEL
175 #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
176 (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
177 #endif
179 /* This is how we tell the assembler that a symbol is weak. */
180 #ifndef ASM_OUTPUT_WEAK_ALIAS
181 #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
182 #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
183 do \
185 ASM_WEAKEN_LABEL (STREAM, NAME); \
186 if (VALUE) \
187 ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
189 while (0)
190 #endif
191 #endif
193 /* How to emit a .type directive. */
194 #ifndef ASM_OUTPUT_TYPE_DIRECTIVE
195 #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
196 #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
197 do \
199 fputs (TYPE_ASM_OP, STREAM); \
200 assemble_name (STREAM, NAME); \
201 fputs (", ", STREAM); \
202 fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
203 putc ('\n', STREAM); \
205 while (0)
206 #endif
207 #endif
209 /* How to emit a .size directive. */
210 #ifndef ASM_OUTPUT_SIZE_DIRECTIVE
211 #ifdef SIZE_ASM_OP
212 #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
213 do \
215 HOST_WIDE_INT size_ = (SIZE); \
216 fputs (SIZE_ASM_OP, STREAM); \
217 assemble_name (STREAM, NAME); \
218 fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
220 while (0)
222 #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
223 do \
225 fputs (SIZE_ASM_OP, STREAM); \
226 assemble_name (STREAM, NAME); \
227 fputs (", .-", STREAM); \
228 assemble_name (STREAM, NAME); \
229 putc ('\n', STREAM); \
231 while (0)
233 #endif
234 #endif
236 /* This determines whether or not we support weak symbols. */
237 #ifndef SUPPORTS_WEAK
238 #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
239 #define SUPPORTS_WEAK 1
240 #else
241 #define SUPPORTS_WEAK 0
242 #endif
243 #endif
245 /* This determines whether or not we support link-once semantics. */
246 #ifndef SUPPORTS_ONE_ONLY
247 #ifdef MAKE_DECL_ONE_ONLY
248 #define SUPPORTS_ONE_ONLY 1
249 #else
250 #define SUPPORTS_ONE_ONLY 0
251 #endif
252 #endif
254 /* This determines whether weak symbols must be left out of a static
255 archive's table of contents. Defining this macro to be nonzero has
256 the consequence that certain symbols will not be made weak that
257 otherwise would be. The C++ ABI requires this macro to be zero;
258 see the documentation. */
259 #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
260 #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
261 #endif
263 /* This determines whether or not we need linkonce unwind information. */
264 #ifndef TARGET_USES_WEAK_UNWIND_INFO
265 #define TARGET_USES_WEAK_UNWIND_INFO 0
266 #endif
268 /* By default, there is no prefix on user-defined symbols. */
269 #ifndef USER_LABEL_PREFIX
270 #define USER_LABEL_PREFIX ""
271 #endif
273 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
274 provide a weak attribute. Else define it to nothing.
276 This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
277 not available at that time.
279 Note, this is only for use by target files which we know are to be
280 compiled by GCC. */
281 #ifndef TARGET_ATTRIBUTE_WEAK
282 # if SUPPORTS_WEAK
283 # define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
284 # else
285 # define TARGET_ATTRIBUTE_WEAK
286 # endif
287 #endif
289 /* Determines whether we may use common symbols to represent one-only
290 semantics (a.k.a. "vague linkage"). */
291 #ifndef USE_COMMON_FOR_ONE_ONLY
292 # define USE_COMMON_FOR_ONE_ONLY 1
293 #endif
295 /* By default we can assume that all global symbols are in one namespace,
296 across all shared libraries. */
297 #ifndef MULTIPLE_SYMBOL_SPACES
298 # define MULTIPLE_SYMBOL_SPACES 0
299 #endif
301 /* If the target supports init_priority C++ attribute, give
302 SUPPORTS_INIT_PRIORITY a nonzero value. */
303 #ifndef SUPPORTS_INIT_PRIORITY
304 #define SUPPORTS_INIT_PRIORITY 1
305 #endif /* SUPPORTS_INIT_PRIORITY */
307 /* If duplicate library search directories can be removed from a
308 linker command without changing the linker's semantics, give this
309 symbol a nonzero. */
310 #ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
311 #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0
312 #endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */
314 /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
315 the rest of the DWARF 2 frame unwind support is also provided. */
316 #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
317 #define DWARF2_UNWIND_INFO 1
318 #endif
320 /* If we have named sections, and we're using crtstuff to run ctors,
321 use them for registering eh frame information. */
322 #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
323 && !defined(EH_FRAME_IN_DATA_SECTION)
324 #ifndef EH_FRAME_SECTION_NAME
325 #define EH_FRAME_SECTION_NAME ".eh_frame"
326 #endif
327 #endif
329 /* On many systems, different EH table encodings are used under
330 difference circumstances. Some will require runtime relocations;
331 some will not. For those that do not require runtime relocations,
332 we would like to make the table read-only. However, since the
333 read-only tables may need to be combined with read-write tables
334 that do require runtime relocation, it is not safe to make the
335 tables read-only unless the linker will merge read-only and
336 read-write sections into a single read-write section. If your
337 linker does not have this ability, but your system is such that no
338 encoding used with non-PIC code will ever require a runtime
339 relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
340 your target configuration file. */
341 #ifndef EH_TABLES_CAN_BE_READ_ONLY
342 #ifdef HAVE_LD_RO_RW_SECTION_MIXING
343 #define EH_TABLES_CAN_BE_READ_ONLY 1
344 #else
345 #define EH_TABLES_CAN_BE_READ_ONLY 0
346 #endif
347 #endif
349 /* If we have named section and we support weak symbols, then use the
350 .jcr section for recording java classes which need to be registered
351 at program start-up time. */
352 #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
353 #ifndef JCR_SECTION_NAME
354 #define JCR_SECTION_NAME ".jcr"
355 #endif
356 #endif
358 /* This decision to use a .jcr section can be overridden by defining
359 USE_JCR_SECTION to 0 in target file. This is necessary if target
360 can define JCR_SECTION_NAME but does not have crtstuff or
361 linker support for .jcr section. */
362 #ifndef TARGET_USE_JCR_SECTION
363 #ifdef JCR_SECTION_NAME
364 #define TARGET_USE_JCR_SECTION 1
365 #else
366 #define TARGET_USE_JCR_SECTION 0
367 #endif
368 #endif
370 /* Number of hardware registers that go into the DWARF-2 unwind info.
371 If not defined, equals FIRST_PSEUDO_REGISTER */
373 #ifndef DWARF_FRAME_REGISTERS
374 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
375 #endif
377 /* How to renumber registers for dbx and gdb. If not defined, assume
378 no renumbering is necessary. */
380 #ifndef DBX_REGISTER_NUMBER
381 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
382 #endif
384 /* Default sizes for base C types. If the sizes are different for
385 your target, you should override these values by defining the
386 appropriate symbols in your tm.h file. */
388 #ifndef BITS_PER_UNIT
389 #define BITS_PER_UNIT 8
390 #endif
392 #ifndef BITS_PER_WORD
393 #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
394 #endif
396 #ifndef CHAR_TYPE_SIZE
397 #define CHAR_TYPE_SIZE BITS_PER_UNIT
398 #endif
400 #ifndef BOOL_TYPE_SIZE
401 /* `bool' has size and alignment `1', on almost all platforms. */
402 #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
403 #endif
405 #ifndef SHORT_TYPE_SIZE
406 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
407 #endif
409 #ifndef INT_TYPE_SIZE
410 #define INT_TYPE_SIZE BITS_PER_WORD
411 #endif
413 #ifndef LONG_TYPE_SIZE
414 #define LONG_TYPE_SIZE BITS_PER_WORD
415 #endif
417 #ifndef LONG_LONG_TYPE_SIZE
418 #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
419 #endif
421 #ifndef WCHAR_TYPE_SIZE
422 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
423 #endif
425 #ifndef FLOAT_TYPE_SIZE
426 #define FLOAT_TYPE_SIZE BITS_PER_WORD
427 #endif
429 #ifndef DOUBLE_TYPE_SIZE
430 #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
431 #endif
433 #ifndef LONG_DOUBLE_TYPE_SIZE
434 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
435 #endif
437 /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
438 #ifndef POINTER_SIZE
439 #define POINTER_SIZE BITS_PER_WORD
440 #endif
442 #ifndef PIC_OFFSET_TABLE_REGNUM
443 #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
444 #endif
446 #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
447 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
448 #endif
450 #ifndef TARGET_DECLSPEC
451 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
452 /* If the target supports the "dllimport" attribute, users are
453 probably used to the "__declspec" syntax. */
454 #define TARGET_DECLSPEC 1
455 #else
456 #define TARGET_DECLSPEC 0
457 #endif
458 #endif
460 /* By default, the preprocessor should be invoked the same way in C++
461 as in C. */
462 #ifndef CPLUSPLUS_CPP_SPEC
463 #ifdef CPP_SPEC
464 #define CPLUSPLUS_CPP_SPEC CPP_SPEC
465 #endif
466 #endif
468 #ifndef ACCUMULATE_OUTGOING_ARGS
469 #define ACCUMULATE_OUTGOING_ARGS 0
470 #endif
472 /* Supply a default definition for PUSH_ARGS. */
473 #ifndef PUSH_ARGS
474 #ifdef PUSH_ROUNDING
475 #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
476 #else
477 #define PUSH_ARGS 0
478 #endif
479 #endif
481 /* Decide whether a function's arguments should be processed
482 from first to last or from last to first.
484 They should if the stack and args grow in opposite directions, but
485 only if we have push insns. */
487 #ifdef PUSH_ROUNDING
489 #ifndef PUSH_ARGS_REVERSED
490 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
491 #define PUSH_ARGS_REVERSED PUSH_ARGS
492 #endif
493 #endif
495 #endif
497 #ifndef PUSH_ARGS_REVERSED
498 #define PUSH_ARGS_REVERSED 0
499 #endif
501 /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
502 STACK_BOUNDARY is required. */
503 #ifndef PREFERRED_STACK_BOUNDARY
504 #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
505 #endif
507 #ifndef TARGET_DEFAULT_PACK_STRUCT
508 #define TARGET_DEFAULT_PACK_STRUCT 0
509 #endif
511 /* By default, the C++ compiler will use function addresses in the
512 vtable entries. Setting this nonzero tells the compiler to use
513 function descriptors instead. The value of this macro says how
514 many words wide the descriptor is (normally 2). It is assumed
515 that the address of a function descriptor may be treated as a
516 pointer to a function. */
517 #ifndef TARGET_VTABLE_USES_DESCRIPTORS
518 #define TARGET_VTABLE_USES_DESCRIPTORS 0
519 #endif
521 /* By default, the vtable entries are void pointers, the so the alignment
522 is the same as pointer alignment. The value of this macro specifies
523 the alignment of the vtable entry in bits. It should be defined only
524 when special alignment is necessary. */
525 #ifndef TARGET_VTABLE_ENTRY_ALIGN
526 #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
527 #endif
529 /* There are a few non-descriptor entries in the vtable at offsets below
530 zero. If these entries must be padded (say, to preserve the alignment
531 specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
532 words in each data entry. */
533 #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
534 #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
535 #endif
537 /* Decide whether it is safe to use a local alias for a virtual function
538 when constructing thunks. */
539 #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
540 #ifdef ASM_OUTPUT_DEF
541 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
542 #else
543 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
544 #endif
545 #endif
547 /* Select a format to encode pointers in exception handling data. We
548 prefer those that result in fewer dynamic relocations. Assume no
549 special support here and encode direct references. */
550 #ifndef ASM_PREFERRED_EH_DATA_FORMAT
551 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
552 #endif
554 /* By default, the C++ compiler will use the lowest bit of the pointer
555 to function to indicate a pointer-to-member-function points to a
556 virtual member function. However, if FUNCTION_BOUNDARY indicates
557 function addresses aren't always even, the lowest bit of the delta
558 field will be used. */
559 #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
560 #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
561 (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
562 ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
563 #endif
565 #ifndef DEFAULT_GDB_EXTENSIONS
566 #define DEFAULT_GDB_EXTENSIONS 1
567 #endif
569 /* If more than one debugging type is supported, you must define
570 PREFERRED_DEBUGGING_TYPE to choose the default. */
572 #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
573 + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
574 + defined (VMS_DEBUGGING_INFO))
575 #ifndef PREFERRED_DEBUGGING_TYPE
576 #error You must define PREFERRED_DEBUGGING_TYPE
577 #endif /* no PREFERRED_DEBUGGING_TYPE */
579 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
580 here so other code needn't care. */
581 #elif defined DBX_DEBUGGING_INFO
582 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
584 #elif defined SDB_DEBUGGING_INFO
585 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
587 #elif defined DWARF2_DEBUGGING_INFO
588 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
590 #elif defined VMS_DEBUGGING_INFO
591 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
593 #elif defined XCOFF_DEBUGGING_INFO
594 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
596 #else
597 /* No debugging format is supported by this target. */
598 #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
599 #endif
601 /* Define codes for all the float formats that we know of. */
602 #define UNKNOWN_FLOAT_FORMAT 0
603 #define IEEE_FLOAT_FORMAT 1
604 #define VAX_FLOAT_FORMAT 2
605 #define IBM_FLOAT_FORMAT 3
606 #define C4X_FLOAT_FORMAT 4
608 /* Default to IEEE float if not specified. Nearly all machines use it. */
609 #ifndef TARGET_FLOAT_FORMAT
610 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
611 #endif
613 /* Some macros can be defined by the backend in either a mode-dependent
614 or mode-independent form. The compiler proper should only use the
615 mode-dependent form, providing VOIDmode when the mode is unknown.
616 We can't poison the macros because the backend may reference them. */
618 #ifndef REGNO_MODE_OK_FOR_BASE_P
619 #define REGNO_MODE_OK_FOR_BASE_P(REGNO, MODE) REGNO_OK_FOR_BASE_P (REGNO)
620 #endif
622 #ifndef REG_MODE_OK_FOR_BASE_P
623 #define REG_MODE_OK_FOR_BASE_P(REG, MODE) REG_OK_FOR_BASE_P (REG)
624 #endif
626 /* Determine the register class for registers suitable to be the base
627 address register in a MEM. Allow the choice to be dependent upon
628 the mode of the memory access. */
629 #ifndef MODE_BASE_REG_CLASS
630 #define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS
631 #endif
633 /* Some machines require a different base register class if the index
634 is a register. By default, assume that a base register is acceptable. */
635 #ifndef MODE_BASE_REG_REG_CLASS
636 #define MODE_BASE_REG_REG_CLASS(MODE) MODE_BASE_REG_CLASS(MODE)
637 #endif
639 #ifndef REGNO_MODE_OK_FOR_REG_BASE_P
640 #define REGNO_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REGNO_MODE_OK_FOR_BASE_P (REGNO, MODE)
641 #endif
643 #ifndef REG_MODE_OK_FOR_REG_BASE_P
644 #define REG_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REG_MODE_OK_FOR_BASE_P (REGNO, MODE)
645 #endif
647 #ifndef LARGEST_EXPONENT_IS_NORMAL
648 #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
649 #endif
651 #ifndef ROUND_TOWARDS_ZERO
652 #define ROUND_TOWARDS_ZERO 0
653 #endif
655 #ifndef MODE_HAS_NANS
656 #define MODE_HAS_NANS(MODE) \
657 (FLOAT_MODE_P (MODE) \
658 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
659 && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
660 #endif
662 #ifndef MODE_HAS_INFINITIES
663 #define MODE_HAS_INFINITIES(MODE) \
664 (FLOAT_MODE_P (MODE) \
665 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
666 && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
667 #endif
669 #ifndef MODE_HAS_SIGNED_ZEROS
670 #define MODE_HAS_SIGNED_ZEROS(MODE) \
671 (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
672 #endif
674 #ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING
675 #define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \
676 (FLOAT_MODE_P (MODE) \
677 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
678 && !ROUND_TOWARDS_ZERO)
679 #endif
681 #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
682 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
683 #endif
685 /* True if the targets integer-comparison functions return { 0, 1, 2
686 } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
687 instead. The libgcc routines are biased. */
688 #ifndef TARGET_LIB_INT_CMP_BIASED
689 #define TARGET_LIB_INT_CMP_BIASED (true)
690 #endif
692 /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
693 then the word-endianness is the same as for integers. */
694 #ifndef FLOAT_WORDS_BIG_ENDIAN
695 #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
696 #endif
698 #ifndef TARGET_FLT_EVAL_METHOD
699 #define TARGET_FLT_EVAL_METHOD 0
700 #endif
702 #ifndef HOT_TEXT_SECTION_NAME
703 #define HOT_TEXT_SECTION_NAME ".text.hot"
704 #endif
706 #ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
707 #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
708 #endif
710 #ifndef HAS_LONG_COND_BRANCH
711 #define HAS_LONG_COND_BRANCH 0
712 #endif
714 #ifndef HAS_LONG_UNCOND_BRANCH
715 #define HAS_LONG_UNCOND_BRANCH 0
716 #endif
718 #ifndef UNITS_PER_SIMD_WORD
719 #define UNITS_PER_SIMD_WORD 0
720 #endif
722 /* Determine whether __cxa_atexit, rather than atexit, is used to
723 register C++ destructors for local statics and global objects. */
724 #ifndef DEFAULT_USE_CXA_ATEXIT
725 #define DEFAULT_USE_CXA_ATEXIT 0
726 #endif
728 /* Determine whether extra constraint letter should be handled
729 via address reload (like 'o'). */
730 #ifndef EXTRA_MEMORY_CONSTRAINT
731 #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
732 #endif
734 /* Determine whether extra constraint letter should be handled
735 as an address (like 'p'). */
736 #ifndef EXTRA_ADDRESS_CONSTRAINT
737 #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
738 #endif
740 /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
741 for all the characters that it does not want to change, so things like the
742 'length' of a digit in a matching constraint is an implementation detail,
743 and not part of the interface. */
744 #define DEFAULT_CONSTRAINT_LEN(C,STR) 1
746 #ifndef CONSTRAINT_LEN
747 #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
748 #endif
750 #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
751 #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
752 #endif
754 #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
755 #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
756 CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
757 #endif
759 #ifndef REG_CLASS_FROM_CONSTRAINT
760 #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
761 #endif
763 #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
764 #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
765 #endif
767 #ifndef REGISTER_MOVE_COST
768 #define REGISTER_MOVE_COST(m, x, y) 2
769 #endif
771 /* Determine whether the the entire c99 runtime
772 is present in the runtime library. */
773 #ifndef TARGET_C99_FUNCTIONS
774 #define TARGET_C99_FUNCTIONS 0
775 #endif
777 /* Indicate that CLZ and CTZ are undefined at zero. */
778 #ifndef CLZ_DEFINED_VALUE_AT_ZERO
779 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
780 #endif
781 #ifndef CTZ_DEFINED_VALUE_AT_ZERO
782 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
783 #endif
785 /* Provide a default value for STORE_FLAG_VALUE. */
786 #ifndef STORE_FLAG_VALUE
787 #define STORE_FLAG_VALUE 1
788 #endif
790 /* This macro is used to determine what the largest unit size that
791 move_by_pieces can use is. */
793 /* MOVE_MAX_PIECES is the number of bytes at a time which we can
794 move efficiently, as opposed to MOVE_MAX which is the maximum
795 number of bytes we can move with a single instruction. */
797 #ifndef MOVE_MAX_PIECES
798 #define MOVE_MAX_PIECES MOVE_MAX
799 #endif
801 #ifndef STACK_POINTER_OFFSET
802 #define STACK_POINTER_OFFSET 0
803 #endif
805 #ifndef LOCAL_REGNO
806 #define LOCAL_REGNO(REGNO) 0
807 #endif
809 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
810 the stack pointer does not matter. The value is tested only in
811 functions that have frame pointers. */
812 #ifndef EXIT_IGNORE_STACK
813 #define EXIT_IGNORE_STACK 0
814 #endif
816 /* Assume that case vectors are not pc-relative. */
817 #ifndef CASE_VECTOR_PC_RELATIVE
818 #define CASE_VECTOR_PC_RELATIVE 0
819 #endif
821 /* Assume that trampolines need function alignment. */
822 #ifndef TRAMPOLINE_ALIGNMENT
823 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
824 #endif
826 /* Register mappings for target machines without register windows. */
827 #ifndef INCOMING_REGNO
828 #define INCOMING_REGNO(N) (N)
829 #endif
831 #ifndef OUTGOING_REGNO
832 #define OUTGOING_REGNO(N) (N)
833 #endif
835 #ifndef SHIFT_COUNT_TRUNCATED
836 #define SHIFT_COUNT_TRUNCATED 0
837 #endif
839 #ifndef LEGITIMIZE_ADDRESS
840 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
841 #endif
843 #ifndef LEGITIMATE_PIC_OPERAND_P
844 #define LEGITIMATE_PIC_OPERAND_P(X) 1
845 #endif
847 #ifndef REVERSIBLE_CC_MODE
848 #define REVERSIBLE_CC_MODE(MODE) 0
849 #endif
851 /* Biggest alignment supported by the object file format of this machine. */
852 #ifndef MAX_OFILE_ALIGNMENT
853 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
854 #endif
856 #endif /* ! GCC_DEFAULTS_H */