OSDN Git Service

PR target/16304
[pf3gnuchains/gcc-fork.git] / gcc / defaults.h
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)
5
6 This file is part of GCC.
7
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.
12
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.
17
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.  */
22
23 #ifndef GCC_DEFAULTS_H
24 #define GCC_DEFAULTS_H
25
26 #ifndef GET_ENVIRONMENT
27 #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
28 #endif
29
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)
37
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
50
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.  */
54
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 */
66
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
75
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.  */
78
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
86
87 /* Choose a reasonable default for ASM_OUTPUT_ASCII.  */
88
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 \"");                                  \
101                                                                               \
102       for (i = 0; i < thissize; i++)                                          \
103         {                                                                     \
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                                                                \
110             {                                                                 \
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 \"");                    \
119           }                                                                   \
120         }                                                                     \
121       fprintf (asm_out_file, "\"\n");                                         \
122     }                                                                         \
123   }                                                                           \
124   while (0)
125 #endif
126
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
139
140 /* Decide whether to defer emitting the assembler output for an equate
141    of two values.  The default is to not defer output.  */
142 #ifndef TARGET_DEFERRED_OUTPUT_DEFS
143 #define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
144 #endif
145
146 /* This is how to output the definition of a user-level label named
147    NAME, such as the label on a static function or variable NAME.  */
148
149 #ifndef ASM_OUTPUT_LABEL
150 #define ASM_OUTPUT_LABEL(FILE,NAME) \
151   do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
152 #endif
153
154 /* Output the definition of a compiler-generated label named NAME.  */
155 #ifndef ASM_OUTPUT_INTERNAL_LABEL
156 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME)    \
157   do {                                          \
158     assemble_name_raw ((FILE), (NAME));         \
159     fputs (":\n", (FILE));                      \
160   } while (0)
161 #endif
162
163 /* This is how to output a reference to a user-level label named NAME.  */
164
165 #ifndef ASM_OUTPUT_LABELREF
166 #define ASM_OUTPUT_LABELREF(FILE,NAME)  asm_fprintf ((FILE), "%U%s", (NAME))
167 #endif
168
169 /* Allow target to print debug info labels specially.  This is useful for
170    VLIW targets, since debug info labels should go into the middle of
171    instruction bundles instead of breaking them.  */
172
173 #ifndef ASM_OUTPUT_DEBUG_LABEL
174 #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
175   (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
176 #endif
177
178 /* This is how we tell the assembler that a symbol is weak.  */
179 #ifndef ASM_OUTPUT_WEAK_ALIAS
180 #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
181 #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE)      \
182   do                                                    \
183     {                                                   \
184       ASM_WEAKEN_LABEL (STREAM, NAME);                  \
185       if (VALUE)                                        \
186         ASM_OUTPUT_DEF (STREAM, NAME, VALUE);           \
187     }                                                   \
188   while (0)
189 #endif
190 #endif
191
192 /* How to emit a .type directive.  */
193 #ifndef ASM_OUTPUT_TYPE_DIRECTIVE
194 #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
195 #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE)   \
196   do                                                    \
197     {                                                   \
198       fputs (TYPE_ASM_OP, STREAM);                      \
199       assemble_name (STREAM, NAME);                     \
200       fputs (", ", STREAM);                             \
201       fprintf (STREAM, TYPE_OPERAND_FMT, TYPE);         \
202       putc ('\n', STREAM);                              \
203     }                                                   \
204   while (0)
205 #endif
206 #endif
207
208 /* How to emit a .size directive.  */
209 #ifndef ASM_OUTPUT_SIZE_DIRECTIVE
210 #ifdef SIZE_ASM_OP
211 #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE)   \
212   do                                                    \
213     {                                                   \
214       HOST_WIDE_INT size_ = (SIZE);                     \
215       fputs (SIZE_ASM_OP, STREAM);                      \
216       assemble_name (STREAM, NAME);                     \
217       fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
218     }                                                   \
219   while (0)
220
221 #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME)          \
222   do                                                    \
223     {                                                   \
224       fputs (SIZE_ASM_OP, STREAM);                      \
225       assemble_name (STREAM, NAME);                     \
226       fputs (", .-", STREAM);                           \
227       assemble_name (STREAM, NAME);                     \
228       putc ('\n', STREAM);                              \
229     }                                                   \
230   while (0)
231
232 #endif
233 #endif
234
235 /* This determines whether or not we support weak symbols.  */
236 #ifndef SUPPORTS_WEAK
237 #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
238 #define SUPPORTS_WEAK 1
239 #else
240 #define SUPPORTS_WEAK 0
241 #endif
242 #endif
243
244 /* This determines whether or not we support link-once semantics.  */
245 #ifndef SUPPORTS_ONE_ONLY
246 #ifdef MAKE_DECL_ONE_ONLY
247 #define SUPPORTS_ONE_ONLY 1
248 #else
249 #define SUPPORTS_ONE_ONLY 0
250 #endif
251 #endif
252
253 /* This determines whether weak symbols must be left out of a static
254    archive's table of contents.  Defining this macro to be nonzero has
255    the consequence that certain symbols will not be made weak that
256    otherwise would be.  The C++ ABI requires this macro to be zero;
257    see the documentation.  */
258 #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
259 #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
260 #endif
261
262 /* This determines whether or not we need linkonce unwind information.  */
263 #ifndef TARGET_USES_WEAK_UNWIND_INFO
264 #define TARGET_USES_WEAK_UNWIND_INFO 0
265 #endif
266
267 /* By default, there is no prefix on user-defined symbols.  */
268 #ifndef USER_LABEL_PREFIX
269 #define USER_LABEL_PREFIX ""
270 #endif
271
272 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
273    provide a weak attribute.  Else define it to nothing.
274
275    This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
276    not available at that time.
277
278    Note, this is only for use by target files which we know are to be
279    compiled by GCC.  */
280 #ifndef TARGET_ATTRIBUTE_WEAK
281 # if SUPPORTS_WEAK
282 #  define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
283 # else
284 #  define TARGET_ATTRIBUTE_WEAK
285 # endif
286 #endif
287
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
293
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
299
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 */
305
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 */
312
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
318
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
327
328 /* On many systems, different EH table encodings are used under
329    difference circumstances.  Some will require runtime relocations;
330    some will not.  For those that do not require runtime relocations,
331    we would like to make the table read-only.  However, since the
332    read-only tables may need to be combined with read-write tables
333    that do require runtime relocation, it is not safe to make the
334    tables read-only unless the linker will merge read-only and
335    read-write sections into a single read-write section.  If your
336    linker does not have this ability, but your system is such that no
337    encoding used with non-PIC code will ever require a runtime
338    relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
339    your target configuration file.  */
340 #ifndef EH_TABLES_CAN_BE_READ_ONLY
341 #ifdef HAVE_LD_RO_RW_SECTION_MIXING
342 #define EH_TABLES_CAN_BE_READ_ONLY 1
343 #else
344 #define EH_TABLES_CAN_BE_READ_ONLY 0
345 #endif
346 #endif
347
348 /* If we have named section and we support weak symbols, then use the
349    .jcr section for recording java classes which need to be registered
350    at program start-up time.  */
351 #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
352 #ifndef JCR_SECTION_NAME
353 #define JCR_SECTION_NAME ".jcr"
354 #endif
355 #endif
356
357 /* This decision to use a .jcr section can be overridden by defining
358    USE_JCR_SECTION to 0 in target file.  This is necessary if target
359    can define JCR_SECTION_NAME but does not have crtstuff or
360    linker support for .jcr section.  */
361 #ifndef TARGET_USE_JCR_SECTION
362 #ifdef JCR_SECTION_NAME
363 #define TARGET_USE_JCR_SECTION 1
364 #else
365 #define TARGET_USE_JCR_SECTION 0
366 #endif
367 #endif
368
369 /* Number of hardware registers that go into the DWARF-2 unwind info.
370    If not defined, equals FIRST_PSEUDO_REGISTER  */
371
372 #ifndef DWARF_FRAME_REGISTERS
373 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
374 #endif
375
376 /* How to renumber registers for dbx and gdb.  If not defined, assume
377    no renumbering is necessary.  */
378
379 #ifndef DBX_REGISTER_NUMBER
380 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
381 #endif
382
383 /* Default sizes for base C types.  If the sizes are different for
384    your target, you should override these values by defining the
385    appropriate symbols in your tm.h file.  */
386
387 #ifndef BITS_PER_UNIT
388 #define BITS_PER_UNIT 8
389 #endif
390
391 #ifndef BITS_PER_WORD
392 #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
393 #endif
394
395 #ifndef CHAR_TYPE_SIZE
396 #define CHAR_TYPE_SIZE BITS_PER_UNIT
397 #endif
398
399 #ifndef BOOL_TYPE_SIZE
400 /* `bool' has size and alignment `1', on almost all platforms.  */
401 #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
402 #endif
403
404 #ifndef SHORT_TYPE_SIZE
405 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
406 #endif
407
408 #ifndef INT_TYPE_SIZE
409 #define INT_TYPE_SIZE BITS_PER_WORD
410 #endif
411
412 #ifndef LONG_TYPE_SIZE
413 #define LONG_TYPE_SIZE BITS_PER_WORD
414 #endif
415
416 #ifndef LONG_LONG_TYPE_SIZE
417 #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
418 #endif
419
420 #ifndef WCHAR_TYPE_SIZE
421 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
422 #endif
423
424 #ifndef FLOAT_TYPE_SIZE
425 #define FLOAT_TYPE_SIZE BITS_PER_WORD
426 #endif
427
428 #ifndef DOUBLE_TYPE_SIZE
429 #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
430 #endif
431
432 #ifndef LONG_DOUBLE_TYPE_SIZE
433 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
434 #endif
435
436 /* Width in bits of a pointer.  Mind the value of the macro `Pmode'.  */
437 #ifndef POINTER_SIZE
438 #define POINTER_SIZE BITS_PER_WORD
439 #endif
440
441 #ifndef PIC_OFFSET_TABLE_REGNUM
442 #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
443 #endif
444
445 #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
446 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
447 #endif
448
449 #ifndef TARGET_DECLSPEC
450 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
451 /* If the target supports the "dllimport" attribute, users are
452    probably used to the "__declspec" syntax.  */
453 #define TARGET_DECLSPEC 1
454 #else
455 #define TARGET_DECLSPEC 0
456 #endif
457 #endif
458
459 /* By default, the preprocessor should be invoked the same way in C++
460    as in C.  */
461 #ifndef CPLUSPLUS_CPP_SPEC
462 #ifdef CPP_SPEC
463 #define CPLUSPLUS_CPP_SPEC CPP_SPEC
464 #endif
465 #endif
466
467 #ifndef ACCUMULATE_OUTGOING_ARGS
468 #define ACCUMULATE_OUTGOING_ARGS 0
469 #endif
470
471 /* Supply a default definition for PUSH_ARGS.  */
472 #ifndef PUSH_ARGS
473 #ifdef PUSH_ROUNDING
474 #define PUSH_ARGS       !ACCUMULATE_OUTGOING_ARGS
475 #else
476 #define PUSH_ARGS       0
477 #endif
478 #endif
479
480 /* Decide whether a function's arguments should be processed
481    from first to last or from last to first.
482
483    They should if the stack and args grow in opposite directions, but
484    only if we have push insns.  */
485
486 #ifdef PUSH_ROUNDING
487
488 #ifndef PUSH_ARGS_REVERSED
489 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
490 #define PUSH_ARGS_REVERSED  PUSH_ARGS
491 #endif
492 #endif
493
494 #endif
495
496 #ifndef PUSH_ARGS_REVERSED
497 #define PUSH_ARGS_REVERSED 0
498 #endif
499
500 /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
501    STACK_BOUNDARY is required.  */
502 #ifndef PREFERRED_STACK_BOUNDARY
503 #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
504 #endif
505
506 #ifndef TARGET_DEFAULT_PACK_STRUCT
507 #define TARGET_DEFAULT_PACK_STRUCT 0
508 #endif
509
510 /* By default, the C++ compiler will use function addresses in the
511    vtable entries.  Setting this nonzero tells the compiler to use
512    function descriptors instead.  The value of this macro says how
513    many words wide the descriptor is (normally 2).  It is assumed
514    that the address of a function descriptor may be treated as a
515    pointer to a function.  */
516 #ifndef TARGET_VTABLE_USES_DESCRIPTORS
517 #define TARGET_VTABLE_USES_DESCRIPTORS 0
518 #endif
519
520 /* By default, the vtable entries are void pointers, the so the alignment
521    is the same as pointer alignment.  The value of this macro specifies
522    the alignment of the vtable entry in bits.  It should be defined only
523    when special alignment is necessary.  */
524 #ifndef TARGET_VTABLE_ENTRY_ALIGN
525 #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
526 #endif
527
528 /* There are a few non-descriptor entries in the vtable at offsets below
529    zero.  If these entries must be padded (say, to preserve the alignment
530    specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
531    words in each data entry.  */
532 #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
533 #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
534 #endif
535
536 /* Decide whether it is safe to use a local alias for a virtual function
537    when constructing thunks.  */
538 #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
539 #ifdef ASM_OUTPUT_DEF
540 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
541 #else
542 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
543 #endif
544 #endif
545
546 /* Select a format to encode pointers in exception handling data.  We
547    prefer those that result in fewer dynamic relocations.  Assume no
548    special support here and encode direct references.  */
549 #ifndef ASM_PREFERRED_EH_DATA_FORMAT
550 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)  DW_EH_PE_absptr
551 #endif
552
553 /* By default, the C++ compiler will use the lowest bit of the pointer
554    to function to indicate a pointer-to-member-function points to a
555    virtual member function.  However, if FUNCTION_BOUNDARY indicates
556    function addresses aren't always even, the lowest bit of the delta
557    field will be used.  */
558 #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
559 #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
560   (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
561    ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
562 #endif
563
564 #ifndef DEFAULT_GDB_EXTENSIONS
565 #define DEFAULT_GDB_EXTENSIONS 1
566 #endif
567
568 /* If more than one debugging type is supported, you must define
569    PREFERRED_DEBUGGING_TYPE to choose the default.  */
570
571 #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
572          + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
573          + defined (VMS_DEBUGGING_INFO))
574 #ifndef PREFERRED_DEBUGGING_TYPE
575 #error You must define PREFERRED_DEBUGGING_TYPE
576 #endif /* no PREFERRED_DEBUGGING_TYPE */
577
578 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
579    here so other code needn't care.  */
580 #elif defined DBX_DEBUGGING_INFO
581 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
582
583 #elif defined SDB_DEBUGGING_INFO
584 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
585
586 #elif defined DWARF2_DEBUGGING_INFO
587 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
588
589 #elif defined VMS_DEBUGGING_INFO
590 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
591
592 #elif defined XCOFF_DEBUGGING_INFO
593 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
594
595 #else
596 /* No debugging format is supported by this target.  */
597 #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
598 #endif
599
600 /* Define codes for all the float formats that we know of.  */
601 #define UNKNOWN_FLOAT_FORMAT 0
602 #define IEEE_FLOAT_FORMAT 1
603 #define VAX_FLOAT_FORMAT 2
604 #define IBM_FLOAT_FORMAT 3
605 #define C4X_FLOAT_FORMAT 4
606
607 /* Default to IEEE float if not specified.  Nearly all machines use it.  */
608 #ifndef TARGET_FLOAT_FORMAT
609 #define TARGET_FLOAT_FORMAT     IEEE_FLOAT_FORMAT
610 #endif
611
612 /* Some macros can be defined by the backend in either a mode-dependent
613    or mode-independent form.  The compiler proper should only use the
614    mode-dependent form, providing VOIDmode when the mode is unknown.
615    We can't poison the macros because the backend may reference them.  */
616
617 #ifndef REGNO_MODE_OK_FOR_BASE_P
618 #define REGNO_MODE_OK_FOR_BASE_P(REGNO, MODE) REGNO_OK_FOR_BASE_P (REGNO)
619 #endif
620
621 #ifndef REG_MODE_OK_FOR_BASE_P
622 #define REG_MODE_OK_FOR_BASE_P(REG, MODE) REG_OK_FOR_BASE_P (REG)
623 #endif
624
625 /* Determine the register class for registers suitable to be the base
626    address register in a MEM.  Allow the choice to be dependent upon
627    the mode of the memory access.  */
628 #ifndef MODE_BASE_REG_CLASS
629 #define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS
630 #endif
631
632 /* Some machines require a different base register class if the index
633    is a register.  By default, assume that a base register is acceptable.  */
634 #ifndef MODE_BASE_REG_REG_CLASS
635 #define MODE_BASE_REG_REG_CLASS(MODE) MODE_BASE_REG_CLASS(MODE)
636 #endif
637
638 #ifndef REGNO_MODE_OK_FOR_REG_BASE_P
639 #define REGNO_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REGNO_MODE_OK_FOR_BASE_P (REGNO, MODE)
640 #endif
641
642 #ifndef REG_MODE_OK_FOR_REG_BASE_P
643 #define REG_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REG_MODE_OK_FOR_BASE_P (REGNO, MODE)
644 #endif
645
646 #ifndef LARGEST_EXPONENT_IS_NORMAL
647 #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
648 #endif
649
650 #ifndef ROUND_TOWARDS_ZERO
651 #define ROUND_TOWARDS_ZERO 0
652 #endif
653
654 #ifndef MODE_HAS_NANS
655 #define MODE_HAS_NANS(MODE)                                     \
656   (FLOAT_MODE_P (MODE)                                          \
657    && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT                  \
658    && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
659 #endif
660
661 #ifndef MODE_HAS_INFINITIES
662 #define MODE_HAS_INFINITIES(MODE)                               \
663   (FLOAT_MODE_P (MODE)                                          \
664    && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT                  \
665    && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
666 #endif
667
668 #ifndef MODE_HAS_SIGNED_ZEROS
669 #define MODE_HAS_SIGNED_ZEROS(MODE) \
670   (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
671 #endif
672
673 #ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING
674 #define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE)                  \
675   (FLOAT_MODE_P (MODE)                                          \
676    && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT                  \
677    && !ROUND_TOWARDS_ZERO)
678 #endif
679
680 #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
681 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
682 #endif
683
684 /* True if the targets integer-comparison functions return { 0, 1, 2
685    } to indicate { <, ==, > }.  False if { -1, 0, 1 } is used
686    instead.  The libgcc routines are biased.  */
687 #ifndef TARGET_LIB_INT_CMP_BIASED
688 #define TARGET_LIB_INT_CMP_BIASED (true)
689 #endif
690
691 /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
692    then the word-endianness is the same as for integers.  */
693 #ifndef FLOAT_WORDS_BIG_ENDIAN
694 #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
695 #endif
696
697 #ifndef TARGET_FLT_EVAL_METHOD
698 #define TARGET_FLT_EVAL_METHOD 0
699 #endif
700
701 #ifndef HOT_TEXT_SECTION_NAME
702 #define HOT_TEXT_SECTION_NAME ".text.hot"
703 #endif
704
705 #ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
706 #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
707 #endif
708
709 #ifndef HAS_LONG_COND_BRANCH
710 #define HAS_LONG_COND_BRANCH 0
711 #endif
712
713 #ifndef HAS_LONG_UNCOND_BRANCH
714 #define HAS_LONG_UNCOND_BRANCH 0
715 #endif
716
717 #ifndef UNITS_PER_SIMD_WORD
718 #define UNITS_PER_SIMD_WORD 0
719 #endif
720
721 /* Determine whether __cxa_atexit, rather than atexit, is used to
722    register C++ destructors for local statics and global objects.  */
723 #ifndef DEFAULT_USE_CXA_ATEXIT
724 #define DEFAULT_USE_CXA_ATEXIT 0
725 #endif
726
727 /* Determine whether extra constraint letter should be handled
728    via address reload (like 'o').  */
729 #ifndef EXTRA_MEMORY_CONSTRAINT
730 #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
731 #endif
732
733 /* Determine whether extra constraint letter should be handled
734    as an address (like 'p').  */
735 #ifndef EXTRA_ADDRESS_CONSTRAINT
736 #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
737 #endif
738
739 /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
740    for all the characters that it does not want to change, so things like the
741   'length' of a digit in a matching constraint is an implementation detail,
742    and not part of the interface.  */
743 #define DEFAULT_CONSTRAINT_LEN(C,STR) 1
744
745 #ifndef CONSTRAINT_LEN
746 #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
747 #endif
748
749 #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
750 #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
751 #endif
752
753 #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
754 #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
755   CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
756 #endif
757
758 #ifndef REG_CLASS_FROM_CONSTRAINT
759 #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
760 #endif
761
762 #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
763 #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
764 #endif
765
766 #ifndef REGISTER_MOVE_COST
767 #define REGISTER_MOVE_COST(m, x, y) 2
768 #endif
769
770 /* Determine whether the the entire c99 runtime
771    is present in the runtime library.  */
772 #ifndef TARGET_C99_FUNCTIONS
773 #define TARGET_C99_FUNCTIONS 0
774 #endif
775
776 /* Indicate that CLZ and CTZ are undefined at zero.  */
777 #ifndef CLZ_DEFINED_VALUE_AT_ZERO
778 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  0
779 #endif
780 #ifndef CTZ_DEFINED_VALUE_AT_ZERO
781 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  0
782 #endif
783
784 /* Provide a default value for STORE_FLAG_VALUE.  */
785 #ifndef STORE_FLAG_VALUE
786 #define STORE_FLAG_VALUE  1
787 #endif
788
789 /* This macro is used to determine what the largest unit size that
790    move_by_pieces can use is.  */
791
792 /* MOVE_MAX_PIECES is the number of bytes at a time which we can
793    move efficiently, as opposed to  MOVE_MAX which is the maximum
794    number of bytes we can move with a single instruction.  */
795
796 #ifndef MOVE_MAX_PIECES
797 #define MOVE_MAX_PIECES   MOVE_MAX
798 #endif
799
800 #ifndef STACK_POINTER_OFFSET
801 #define STACK_POINTER_OFFSET    0
802 #endif
803
804 #ifndef LOCAL_REGNO
805 #define LOCAL_REGNO(REGNO)  0
806 #endif
807
808 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
809    the stack pointer does not matter.  The value is tested only in
810    functions that have frame pointers.  */
811 #ifndef EXIT_IGNORE_STACK
812 #define EXIT_IGNORE_STACK 0
813 #endif
814
815 /* Assume that case vectors are not pc-relative.  */
816 #ifndef CASE_VECTOR_PC_RELATIVE
817 #define CASE_VECTOR_PC_RELATIVE 0
818 #endif
819
820 /* Assume that trampolines need function alignment.  */
821 #ifndef TRAMPOLINE_ALIGNMENT
822 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
823 #endif
824
825 /* Register mappings for target machines without register windows.  */
826 #ifndef INCOMING_REGNO
827 #define INCOMING_REGNO(N) (N)
828 #endif
829
830 #ifndef OUTGOING_REGNO
831 #define OUTGOING_REGNO(N) (N)
832 #endif
833
834 #ifndef SHIFT_COUNT_TRUNCATED
835 #define SHIFT_COUNT_TRUNCATED 0
836 #endif
837
838 #ifndef LEGITIMIZE_ADDRESS
839 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
840 #endif
841
842 #ifndef LEGITIMATE_PIC_OPERAND_P
843 #define LEGITIMATE_PIC_OPERAND_P(X) 1
844 #endif
845
846 #ifndef REVERSIBLE_CC_MODE
847 #define REVERSIBLE_CC_MODE(MODE) 0
848 #endif
849
850 /* Biggest alignment supported by the object file format of this machine.  */
851 #ifndef MAX_OFILE_ALIGNMENT
852 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
853 #endif
854
855 #endif  /* ! GCC_DEFAULTS_H */