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