* varasm.c (default_assemble_integer): Return false for values wider
[official-gcc.git] / gcc / defaults.h
blob013a74ca37e8f8fea7fc9cf877ce7daac3195e5a
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 #ifndef ASM_STABD_OP
77 #define ASM_STABD_OP "\t.stabd\t"
78 #endif
80 /* This is how to output an element of a case-vector that is absolute.
81 Some targets don't use this, but we have to define it anyway. */
83 #ifndef ASM_OUTPUT_ADDR_VEC_ELT
84 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
85 do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
86 (*targetm.asm_out.internal_label) (FILE, "L", (VALUE)); \
87 fputc ('\n', FILE); \
88 } while (0)
89 #endif
91 /* Choose a reasonable default for ASM_OUTPUT_ASCII. */
93 #ifndef ASM_OUTPUT_ASCII
94 #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
95 do { \
96 FILE *_hide_asm_out_file = (MYFILE); \
97 const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
98 int _hide_thissize = (MYLENGTH); \
99 { \
100 FILE *asm_out_file = _hide_asm_out_file; \
101 const unsigned char *p = _hide_p; \
102 int thissize = _hide_thissize; \
103 int i; \
104 fprintf (asm_out_file, "\t.ascii \""); \
106 for (i = 0; i < thissize; i++) \
108 int c = p[i]; \
109 if (c == '\"' || c == '\\') \
110 putc ('\\', asm_out_file); \
111 if (ISPRINT(c)) \
112 putc (c, asm_out_file); \
113 else \
115 fprintf (asm_out_file, "\\%o", c); \
116 /* After an octal-escape, if a digit follows, \
117 terminate one string constant and start another. \
118 The VAX assembler fails to stop reading the escape \
119 after three digits, so this is the only way we \
120 can get it to parse the data properly. */ \
121 if (i < thissize - 1 && ISDIGIT(p[i + 1])) \
122 fprintf (asm_out_file, "\"\n\t.ascii \""); \
125 fprintf (asm_out_file, "\"\n"); \
128 while (0)
129 #endif
131 /* This is how we tell the assembler to equate two values. */
132 #ifdef SET_ASM_OP
133 #ifndef ASM_OUTPUT_DEF
134 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
135 do { fprintf ((FILE), "%s", SET_ASM_OP); \
136 assemble_name (FILE, LABEL1); \
137 fprintf (FILE, ","); \
138 assemble_name (FILE, LABEL2); \
139 fprintf (FILE, "\n"); \
140 } while (0)
141 #endif
142 #endif
144 /* This is how to output the definition of a user-level label named
145 NAME, such as the label on a static function or variable NAME. */
147 #ifndef ASM_OUTPUT_LABEL
148 #define ASM_OUTPUT_LABEL(FILE,NAME) \
149 do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
150 #endif
152 /* This is how to output a reference to a user-level label named NAME. */
154 #ifndef ASM_OUTPUT_LABELREF
155 #define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
156 #endif
158 /* Allow target to print debug info labels specially. This is useful for
159 VLIW targets, since debug info labels should go into the middle of
160 instruction bundles instead of breaking them. */
162 #ifndef ASM_OUTPUT_DEBUG_LABEL
163 #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
164 (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
165 #endif
167 /* This is how we tell the assembler that a symbol is weak. */
168 #ifndef ASM_OUTPUT_WEAK_ALIAS
169 #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
170 #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
171 do \
173 ASM_WEAKEN_LABEL (STREAM, NAME); \
174 if (VALUE) \
175 ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
177 while (0)
178 #endif
179 #endif
181 /* How to emit a .type directive. */
182 #ifndef ASM_OUTPUT_TYPE_DIRECTIVE
183 #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
184 #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
185 do \
187 fputs (TYPE_ASM_OP, STREAM); \
188 assemble_name (STREAM, NAME); \
189 fputs (", ", STREAM); \
190 fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
191 putc ('\n', STREAM); \
193 while (0)
194 #endif
195 #endif
197 /* How to emit a .size directive. */
198 #ifndef ASM_OUTPUT_SIZE_DIRECTIVE
199 #ifdef SIZE_ASM_OP
200 #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
201 do \
203 HOST_WIDE_INT size_ = (SIZE); \
204 fputs (SIZE_ASM_OP, STREAM); \
205 assemble_name (STREAM, NAME); \
206 fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
208 while (0)
210 #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
211 do \
213 fputs (SIZE_ASM_OP, STREAM); \
214 assemble_name (STREAM, NAME); \
215 fputs (", .-", STREAM); \
216 assemble_name (STREAM, NAME); \
217 putc ('\n', STREAM); \
219 while (0)
221 #endif
222 #endif
224 /* This determines whether or not we support weak symbols. */
225 #ifndef SUPPORTS_WEAK
226 #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
227 #define SUPPORTS_WEAK 1
228 #else
229 #define SUPPORTS_WEAK 0
230 #endif
231 #endif
233 /* This determines whether or not we support link-once semantics. */
234 #ifndef SUPPORTS_ONE_ONLY
235 #ifdef MAKE_DECL_ONE_ONLY
236 #define SUPPORTS_ONE_ONLY 1
237 #else
238 #define SUPPORTS_ONE_ONLY 0
239 #endif
240 #endif
242 /* This determines whether weak symbols must be left out of a static
243 archive's table of contents. Defining this macro to be nonzero has
244 the consequence that certain symbols will not be made weak that
245 otherwise would be. The C++ ABI requires this macro to be zero;
246 see the documentation. */
247 #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
248 #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
249 #endif
251 /* This determines whether or not we need linkonce unwind information */
252 #ifndef TARGET_USES_WEAK_UNWIND_INFO
253 #define TARGET_USES_WEAK_UNWIND_INFO 0
254 #endif
256 /* By default, there is no prefix on user-defined symbols. */
257 #ifndef USER_LABEL_PREFIX
258 #define USER_LABEL_PREFIX ""
259 #endif
261 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
262 provide a weak attribute. Else define it to nothing.
264 This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
265 not available at that time.
267 Note, this is only for use by target files which we know are to be
268 compiled by GCC. */
269 #ifndef TARGET_ATTRIBUTE_WEAK
270 # if SUPPORTS_WEAK
271 # define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
272 # else
273 # define TARGET_ATTRIBUTE_WEAK
274 # endif
275 #endif
277 /* This determines whether this target supports hidden visibility.
278 This is a weaker condition than HAVE_GAS_HIDDEN, which probes for
279 specific assembler syntax. */
280 #ifndef TARGET_SUPPORTS_HIDDEN
281 # ifdef HAVE_GAS_HIDDEN
282 # define TARGET_SUPPORTS_HIDDEN 1
283 # else
284 # define TARGET_SUPPORTS_HIDDEN 0
285 # endif
286 #endif
288 /* Determines whether we may use common symbols to represent one-only
289 semantics (a.k.a. "vague linkage"). */
290 #ifndef USE_COMMON_FOR_ONE_ONLY
291 # define USE_COMMON_FOR_ONE_ONLY 1
292 #endif
294 /* By default we can assume that all global symbols are in one namespace,
295 across all shared libraries. */
296 #ifndef MULTIPLE_SYMBOL_SPACES
297 # define MULTIPLE_SYMBOL_SPACES 0
298 #endif
300 /* If the target supports init_priority C++ attribute, give
301 SUPPORTS_INIT_PRIORITY a nonzero value. */
302 #ifndef SUPPORTS_INIT_PRIORITY
303 #define SUPPORTS_INIT_PRIORITY 1
304 #endif /* SUPPORTS_INIT_PRIORITY */
306 /* If duplicate library search directories can be removed from a
307 linker command without changing the linker's semantics, give this
308 symbol a nonzero. */
309 #ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
310 #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0
311 #endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */
313 /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
314 the rest of the DWARF 2 frame unwind support is also provided. */
315 #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
316 #define DWARF2_UNWIND_INFO 1
317 #endif
319 /* If we have named sections, and we're using crtstuff to run ctors,
320 use them for registering eh frame information. */
321 #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
322 && !defined(EH_FRAME_IN_DATA_SECTION)
323 #ifndef EH_FRAME_SECTION_NAME
324 #define EH_FRAME_SECTION_NAME ".eh_frame"
325 #endif
326 #endif
328 /* If we have named section and we support weak symbols, then use the
329 .jcr section for recording java classes which need to be registered
330 at program start-up time. */
331 #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
332 #ifndef JCR_SECTION_NAME
333 #define JCR_SECTION_NAME ".jcr"
334 #endif
335 #endif
337 /* By default, we generate a label at the beginning and end of the
338 text section, and compute the size of the text section by
339 subtracting the two. However, on some platforms that doesn't
340 work, and we use the section itself, rather than a label at the
341 beginning of it, to indicate the start of the section. On such
342 platforms, define this to zero. */
343 #ifndef DWARF2_GENERATE_TEXT_SECTION_LABEL
344 #define DWARF2_GENERATE_TEXT_SECTION_LABEL 1
345 #endif
347 /* Number of hardware registers that go into the DWARF-2 unwind info.
348 If not defined, equals FIRST_PSEUDO_REGISTER */
350 #ifndef DWARF_FRAME_REGISTERS
351 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
352 #endif
354 /* How to renumber registers for dbx and gdb. If not defined, assume
355 no renumbering is necessary. */
357 #ifndef DBX_REGISTER_NUMBER
358 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
359 #endif
361 /* Default sizes for base C types. If the sizes are different for
362 your target, you should override these values by defining the
363 appropriate symbols in your tm.h file. */
365 #ifndef BITS_PER_UNIT
366 #define BITS_PER_UNIT 8
367 #endif
369 #ifndef BITS_PER_WORD
370 #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
371 #endif
373 #ifndef CHAR_TYPE_SIZE
374 #define CHAR_TYPE_SIZE BITS_PER_UNIT
375 #endif
377 #ifndef BOOL_TYPE_SIZE
378 /* `bool' has size and alignment `1', on almost all platforms. */
379 #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
380 #endif
382 #ifndef SHORT_TYPE_SIZE
383 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
384 #endif
386 #ifndef INT_TYPE_SIZE
387 #define INT_TYPE_SIZE BITS_PER_WORD
388 #endif
390 #ifndef LONG_TYPE_SIZE
391 #define LONG_TYPE_SIZE BITS_PER_WORD
392 #endif
394 #ifndef LONG_LONG_TYPE_SIZE
395 #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
396 #endif
398 #ifndef WCHAR_TYPE_SIZE
399 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
400 #endif
402 #ifndef FLOAT_TYPE_SIZE
403 #define FLOAT_TYPE_SIZE BITS_PER_WORD
404 #endif
406 #ifndef DOUBLE_TYPE_SIZE
407 #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
408 #endif
410 #ifndef LONG_DOUBLE_TYPE_SIZE
411 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
412 #endif
414 /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
415 #ifndef POINTER_SIZE
416 #define POINTER_SIZE BITS_PER_WORD
417 #endif
419 #ifndef PIC_OFFSET_TABLE_REGNUM
420 #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
421 #endif
423 #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
424 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
425 #endif
427 #ifndef TARGET_DECLSPEC
428 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
429 /* If the target supports the "dllimport" attribute, users are
430 probably used to the "__declspec" syntax. */
431 #define TARGET_DECLSPEC 1
432 #else
433 #define TARGET_DECLSPEC 0
434 #endif
435 #endif
437 /* By default, the preprocessor should be invoked the same way in C++
438 as in C. */
439 #ifndef CPLUSPLUS_CPP_SPEC
440 #ifdef CPP_SPEC
441 #define CPLUSPLUS_CPP_SPEC CPP_SPEC
442 #endif
443 #endif
445 #ifndef ACCUMULATE_OUTGOING_ARGS
446 #define ACCUMULATE_OUTGOING_ARGS 0
447 #endif
449 /* Supply a default definition for PUSH_ARGS. */
450 #ifndef PUSH_ARGS
451 #ifdef PUSH_ROUNDING
452 #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
453 #else
454 #define PUSH_ARGS 0
455 #endif
456 #endif
458 /* Decide whether a function's arguments should be processed
459 from first to last or from last to first.
461 They should if the stack and args grow in opposite directions, but
462 only if we have push insns. */
464 #ifdef PUSH_ROUNDING
466 #ifndef PUSH_ARGS_REVERSED
467 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
468 #define PUSH_ARGS_REVERSED PUSH_ARGS
469 #endif
470 #endif
472 #endif
474 #ifndef PUSH_ARGS_REVERSED
475 #define PUSH_ARGS_REVERSED 0
476 #endif
478 /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
479 STACK_BOUNDARY is required. */
480 #ifndef PREFERRED_STACK_BOUNDARY
481 #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
482 #endif
484 #ifndef TARGET_DEFAULT_PACK_STRUCT
485 #define TARGET_DEFAULT_PACK_STRUCT 0
486 #endif
488 /* By default, the C++ compiler will use function addresses in the
489 vtable entries. Setting this nonzero tells the compiler to use
490 function descriptors instead. The value of this macro says how
491 many words wide the descriptor is (normally 2). It is assumed
492 that the address of a function descriptor may be treated as a
493 pointer to a function. */
494 #ifndef TARGET_VTABLE_USES_DESCRIPTORS
495 #define TARGET_VTABLE_USES_DESCRIPTORS 0
496 #endif
498 /* By default, the vtable entries are void pointers, the so the alignment
499 is the same as pointer alignment. The value of this macro specifies
500 the alignment of the vtable entry in bits. It should be defined only
501 when special alignment is necessary. */
502 #ifndef TARGET_VTABLE_ENTRY_ALIGN
503 #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
504 #endif
506 /* There are a few non-descriptor entries in the vtable at offsets below
507 zero. If these entries must be padded (say, to preserve the alignment
508 specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
509 words in each data entry. */
510 #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
511 #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
512 #endif
514 /* Decide whether it is safe to use a local alias for a virtual function
515 when constructing thunks. */
516 #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
517 #ifdef ASM_OUTPUT_DEF
518 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
519 #else
520 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
521 #endif
522 #endif
524 /* Select a format to encode pointers in exception handling data. We
525 prefer those that result in fewer dynamic relocations. Assume no
526 special support here and encode direct references. */
527 #ifndef ASM_PREFERRED_EH_DATA_FORMAT
528 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
529 #endif
531 /* By default, the C++ compiler will use the lowest bit of the pointer
532 to function to indicate a pointer-to-member-function points to a
533 virtual member function. However, if FUNCTION_BOUNDARY indicates
534 function addresses aren't always even, the lowest bit of the delta
535 field will be used. */
536 #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
537 #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
538 (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
539 ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
540 #endif
542 #ifndef DEFAULT_GDB_EXTENSIONS
543 #define DEFAULT_GDB_EXTENSIONS 1
544 #endif
546 /* If more than one debugging type is supported, you must define
547 PREFERRED_DEBUGGING_TYPE to choose the default. */
549 #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
550 + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
551 + defined (VMS_DEBUGGING_INFO))
552 #ifndef PREFERRED_DEBUGGING_TYPE
553 #error You must define PREFERRED_DEBUGGING_TYPE
554 #endif /* no PREFERRED_DEBUGGING_TYPE */
556 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
557 here so other code needn't care. */
558 #elif defined DBX_DEBUGGING_INFO
559 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
561 #elif defined SDB_DEBUGGING_INFO
562 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
564 #elif defined DWARF2_DEBUGGING_INFO
565 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
567 #elif defined VMS_DEBUGGING_INFO
568 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
570 #elif defined XCOFF_DEBUGGING_INFO
571 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
573 #else
574 /* No debugging format is supported by this target. */
575 #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
576 #endif
578 /* Define codes for all the float formats that we know of. */
579 #define UNKNOWN_FLOAT_FORMAT 0
580 #define IEEE_FLOAT_FORMAT 1
581 #define VAX_FLOAT_FORMAT 2
582 #define IBM_FLOAT_FORMAT 3
583 #define C4X_FLOAT_FORMAT 4
585 /* Default to IEEE float if not specified. Nearly all machines use it. */
586 #ifndef TARGET_FLOAT_FORMAT
587 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
588 #endif
590 /* Determine the register class for registers suitable to be the base
591 address register in a MEM. Allow the choice to be dependent upon
592 the mode of the memory access. */
593 #ifndef MODE_BASE_REG_CLASS
594 #define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS
595 #endif
597 #ifndef LARGEST_EXPONENT_IS_NORMAL
598 #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
599 #endif
601 #ifndef ROUND_TOWARDS_ZERO
602 #define ROUND_TOWARDS_ZERO 0
603 #endif
605 #ifndef MODE_HAS_NANS
606 #define MODE_HAS_NANS(MODE) \
607 (FLOAT_MODE_P (MODE) \
608 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
609 && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
610 #endif
612 #ifndef MODE_HAS_INFINITIES
613 #define MODE_HAS_INFINITIES(MODE) \
614 (FLOAT_MODE_P (MODE) \
615 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
616 && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
617 #endif
619 #ifndef MODE_HAS_SIGNED_ZEROS
620 #define MODE_HAS_SIGNED_ZEROS(MODE) \
621 (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
622 #endif
624 #ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING
625 #define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \
626 (FLOAT_MODE_P (MODE) \
627 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
628 && !ROUND_TOWARDS_ZERO)
629 #endif
631 #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
632 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
633 #endif
635 /* True if the targets integer-comparison functions return { 0, 1, 2
636 } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
637 instead. The libgcc routines are biased. */
638 #ifndef TARGET_LIB_INT_CMP_BIASED
639 #define TARGET_LIB_INT_CMP_BIASED (true)
640 #endif
642 /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
643 then the word-endianness is the same as for integers. */
644 #ifndef FLOAT_WORDS_BIG_ENDIAN
645 #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
646 #endif
648 #ifndef TARGET_FLT_EVAL_METHOD
649 #define TARGET_FLT_EVAL_METHOD 0
650 #endif
652 #ifndef HOT_TEXT_SECTION_NAME
653 #define HOT_TEXT_SECTION_NAME ".text.hot"
654 #endif
656 #ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
657 #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
658 #endif
660 #ifndef HAS_LONG_COND_BRANCH
661 #define HAS_LONG_COND_BRANCH 0
662 #endif
664 #ifndef HAS_LONG_UNCOND_BRANCH
665 #define HAS_LONG_UNCOND_BRANCH 0
666 #endif
668 #ifndef UNITS_PER_SIMD_WORD
669 #define UNITS_PER_SIMD_WORD 0
670 #endif
672 /* Determine whether __cxa_atexit, rather than atexit, is used to
673 register C++ destructors for local statics and global objects. */
674 #ifndef DEFAULT_USE_CXA_ATEXIT
675 #define DEFAULT_USE_CXA_ATEXIT 0
676 #endif
678 /* Determine whether extra constraint letter should be handled
679 via address reload (like 'o'). */
680 #ifndef EXTRA_MEMORY_CONSTRAINT
681 #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
682 #endif
684 /* Determine whether extra constraint letter should be handled
685 as an address (like 'p'). */
686 #ifndef EXTRA_ADDRESS_CONSTRAINT
687 #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
688 #endif
690 /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
691 for all the characters that it does not want to change, so things like the
692 'length' of a digit in a matching constraint is an implementation detail,
693 and not part of the interface. */
694 #define DEFAULT_CONSTRAINT_LEN(C,STR) 1
696 #ifndef CONSTRAINT_LEN
697 #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
698 #endif
700 #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
701 #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
702 #endif
704 #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
705 #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
706 CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
707 #endif
709 #ifndef REG_CLASS_FROM_CONSTRAINT
710 #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
711 #endif
713 #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
714 #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
715 #endif
717 #ifndef REGISTER_MOVE_COST
718 #define REGISTER_MOVE_COST(m, x, y) 2
719 #endif
721 /* Determine whether the the entire c99 runtime
722 is present in the runtime library. */
723 #ifndef TARGET_C99_FUNCTIONS
724 #define TARGET_C99_FUNCTIONS 0
725 #endif
727 /* Indicate that CLZ and CTZ are undefined at zero. */
728 #ifndef CLZ_DEFINED_VALUE_AT_ZERO
729 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
730 #endif
731 #ifndef CTZ_DEFINED_VALUE_AT_ZERO
732 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
733 #endif
735 /* Provide a default value for STORE_FLAG_VALUE. */
736 #ifndef STORE_FLAG_VALUE
737 #define STORE_FLAG_VALUE 1
738 #endif
740 /* This macro is used to determine what the largest unit size that
741 move_by_pieces can use is. */
743 /* MOVE_MAX_PIECES is the number of bytes at a time which we can
744 move efficiently, as opposed to MOVE_MAX which is the maximum
745 number of bytes we can move with a single instruction. */
747 #ifndef MOVE_MAX_PIECES
748 #define MOVE_MAX_PIECES MOVE_MAX
749 #endif
751 #ifndef STACK_POINTER_OFFSET
752 #define STACK_POINTER_OFFSET 0
753 #endif
755 #ifndef LOCAL_REGNO
756 #define LOCAL_REGNO(REGNO) 0
757 #endif
759 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
760 the stack pointer does not matter. The value is tested only in
761 functions that have frame pointers. */
762 #ifndef EXIT_IGNORE_STACK
763 #define EXIT_IGNORE_STACK 0
764 #endif
766 /* Assume that case vectors are not pc-relative. */
767 #ifndef CASE_VECTOR_PC_RELATIVE
768 #define CASE_VECTOR_PC_RELATIVE 0
769 #endif
771 /* Assume that trampolines need function alignment. */
772 #ifndef TRAMPOLINE_ALIGNMENT
773 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
774 #endif
776 /* Register mappings for target machines without register windows. */
777 #ifndef INCOMING_REGNO
778 #define INCOMING_REGNO(N) (N)
779 #endif
781 #ifndef OUTGOING_REGNO
782 #define OUTGOING_REGNO(N) (N)
783 #endif
785 #ifndef SHIFT_COUNT_TRUNCATED
786 #define SHIFT_COUNT_TRUNCATED 0
787 #endif
789 #ifndef LEGITIMIZE_ADDRESS
790 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
791 #endif
793 #ifndef LEGITIMATE_PIC_OPERAND_P
794 #define LEGITIMATE_PIC_OPERAND_P(X) 1
795 #endif
797 #ifndef REVERSIBLE_CC_MODE
798 #define REVERSIBLE_CC_MODE(MODE) 0
799 #endif
801 /* Biggest alignment supported by the object file format of this machine. */
802 #ifndef MAX_OFILE_ALIGNMENT
803 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
804 #endif
806 #endif /* ! GCC_DEFAULTS_H */