]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/defaults.h
re PR fortran/19269 (transpose(reshape(...)) of character array segfaults.)
[thirdparty/gcc.git] / gcc / defaults.h
CommitLineData
eff01bb6 1/* Definitions of various defaults for tm.h macros.
ad616de1
KH
2 Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005
d8ea8f28 4 Free Software Foundation, Inc.
b33c316c 5 Contributed by Ron Guilmette (rfg@monkeys.com)
c53a8ab6 6
1322177d 7This file is part of GCC.
c53a8ab6 8
1322177d
LB
9GCC is free software; you can redistribute it and/or modify it under
10the terms of the GNU General Public License as published by the Free
11Software Foundation; either version 2, or (at your option) any later
12version.
c53a8ab6 13
1322177d
LB
14GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17for more details.
c53a8ab6
RS
18
19You should have received a copy of the GNU General Public License
1322177d 20along with GCC; see the file COPYING. If not, write to the Free
366ccddb
KC
21Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
2202110-1301, USA. */
c53a8ab6 23
d8ea8f28
ZW
24#ifndef GCC_DEFAULTS_H
25#define GCC_DEFAULTS_H
26
2f8dd115
NB
27#ifndef GET_ENVIRONMENT
28#define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
29#endif
30
95ec27aa
SB
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)
4fa31c2a 38
4977bab6
ZW
39/* Store in OUTPUT a string (made with alloca) containing an
40 assembler-name for a local static variable or function named NAME.
7b73db04
CH
41 LABELNO is an integer which is different for each call. */
42
4977bab6
ZW
43#ifndef ASM_PN_FORMAT
44# ifndef NO_DOT_IN_LABEL
45# define ASM_PN_FORMAT "%s.%lu"
46# else
47# ifndef NO_DOLLAR_IN_LABEL
48# define ASM_PN_FORMAT "%s$%lu"
49# else
50# define ASM_PN_FORMAT "__%s_%lu"
51# endif
52# endif
53#endif /* ! ASM_PN_FORMAT */
54
7b73db04 55#ifndef ASM_FORMAT_PRIVATE_NAME
4977bab6
ZW
56# define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
57 do { const char *const name_ = (NAME); \
28dab132
BI
58 char *const output_ = (OUTPUT) = \
59 (char *) alloca (strlen (name_) + 32); \
4977bab6 60 sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
7b73db04
CH
61 } while (0)
62#endif
63
e0a21ab9 64/* Choose a reasonable default for ASM_OUTPUT_ASCII. */
c53a8ab6
RS
65
66#ifndef ASM_OUTPUT_ASCII
67#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
68 do { \
69 FILE *_hide_asm_out_file = (MYFILE); \
47ee9bcb 70 const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
c53a8ab6
RS
71 int _hide_thissize = (MYLENGTH); \
72 { \
73 FILE *asm_out_file = _hide_asm_out_file; \
47ee9bcb 74 const unsigned char *p = _hide_p; \
c53a8ab6
RS
75 int thissize = _hide_thissize; \
76 int i; \
77 fprintf (asm_out_file, "\t.ascii \""); \
78 \
79 for (i = 0; i < thissize; i++) \
80 { \
b3694847 81 int c = p[i]; \
c53a8ab6
RS
82 if (c == '\"' || c == '\\') \
83 putc ('\\', asm_out_file); \
5f6d3823 84 if (ISPRINT(c)) \
c53a8ab6
RS
85 putc (c, asm_out_file); \
86 else \
87 { \
88 fprintf (asm_out_file, "\\%o", c); \
89 /* After an octal-escape, if a digit follows, \
90 terminate one string constant and start another. \
8aeea6e6 91 The VAX assembler fails to stop reading the escape \
c53a8ab6
RS
92 after three digits, so this is the only way we \
93 can get it to parse the data properly. */ \
d07ecc3b 94 if (i < thissize - 1 && ISDIGIT(p[i + 1])) \
c53a8ab6
RS
95 fprintf (asm_out_file, "\"\n\t.ascii \""); \
96 } \
97 } \
98 fprintf (asm_out_file, "\"\n"); \
99 } \
100 } \
101 while (0)
102#endif
d0d4af87 103
650f773a
JW
104/* This is how we tell the assembler to equate two values. */
105#ifdef SET_ASM_OP
106#ifndef ASM_OUTPUT_DEF
107#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
e8638df0 108 do { fprintf ((FILE), "%s", SET_ASM_OP); \
650f773a
JW
109 assemble_name (FILE, LABEL1); \
110 fprintf (FILE, ","); \
111 assemble_name (FILE, LABEL2); \
112 fprintf (FILE, "\n"); \
113 } while (0)
114#endif
115#endif
daefd78b 116
083b6717
JDA
117/* Decide whether to defer emitting the assembler output for an equate
118 of two values. The default is to not defer output. */
119#ifndef TARGET_DEFERRED_OUTPUT_DEFS
120#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
121#endif
122
4ad5e05d
KG
123/* This is how to output the definition of a user-level label named
124 NAME, such as the label on a static function or variable NAME. */
125
126#ifndef ASM_OUTPUT_LABEL
127#define ASM_OUTPUT_LABEL(FILE,NAME) \
128 do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
129#endif
130
57829bc4
MM
131/* Output the definition of a compiler-generated label named NAME. */
132#ifndef ASM_OUTPUT_INTERNAL_LABEL
133#define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \
134 do { \
135 assemble_name_raw ((FILE), (NAME)); \
136 fputs (":\n", (FILE)); \
137 } while (0)
138#endif
139
81d77cda
RK
140/* This is how to output a reference to a user-level label named NAME. */
141
142#ifndef ASM_OUTPUT_LABELREF
19283265 143#define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
81d77cda
RK
144#endif
145
8215347e
JW
146/* Allow target to print debug info labels specially. This is useful for
147 VLIW targets, since debug info labels should go into the middle of
148 instruction bundles instead of breaking them. */
149
150#ifndef ASM_OUTPUT_DEBUG_LABEL
151#define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
4977bab6 152 (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
8215347e
JW
153#endif
154
3aa8ab7b 155/* This is how we tell the assembler that a symbol is weak. */
20c93f7c
RO
156#ifndef ASM_OUTPUT_WEAK_ALIAS
157#if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
3aa8ab7b
L
158#define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
159 do \
160 { \
161 ASM_WEAKEN_LABEL (STREAM, NAME); \
162 if (VALUE) \
163 ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
164 } \
165 while (0)
166#endif
20c93f7c 167#endif
3aa8ab7b 168
2be2ac70
ZW
169/* How to emit a .type directive. */
170#ifndef ASM_OUTPUT_TYPE_DIRECTIVE
171#if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
172#define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
173 do \
174 { \
175 fputs (TYPE_ASM_OP, STREAM); \
176 assemble_name (STREAM, NAME); \
177 fputs (", ", STREAM); \
178 fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
179 putc ('\n', STREAM); \
180 } \
181 while (0)
182#endif
183#endif
184
185/* How to emit a .size directive. */
186#ifndef ASM_OUTPUT_SIZE_DIRECTIVE
187#ifdef SIZE_ASM_OP
188#define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
189 do \
190 { \
191 HOST_WIDE_INT size_ = (SIZE); \
192 fputs (SIZE_ASM_OP, STREAM); \
193 assemble_name (STREAM, NAME); \
90ff44cf 194 fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
2be2ac70
ZW
195 } \
196 while (0)
197
99086d59 198#define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
2be2ac70
ZW
199 do \
200 { \
201 fputs (SIZE_ASM_OP, STREAM); \
99086d59
ZW
202 assemble_name (STREAM, NAME); \
203 fputs (", .-", STREAM); \
204 assemble_name (STREAM, NAME); \
2be2ac70
ZW
205 putc ('\n', STREAM); \
206 } \
207 while (0)
208
209#endif
210#endif
211
daefd78b
JM
212/* This determines whether or not we support weak symbols. */
213#ifndef SUPPORTS_WEAK
79c4e63f 214#if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
daefd78b
JM
215#define SUPPORTS_WEAK 1
216#else
217#define SUPPORTS_WEAK 0
218#endif
219#endif
a6ab3aad 220
1ca894a0
MM
221/* This determines whether or not we support link-once semantics. */
222#ifndef SUPPORTS_ONE_ONLY
223#ifdef MAKE_DECL_ONE_ONLY
224#define SUPPORTS_ONE_ONLY 1
225#else
226#define SUPPORTS_ONE_ONLY 0
227#endif
228#endif
229
0524c91d
MA
230/* This determines whether weak symbols must be left out of a static
231 archive's table of contents. Defining this macro to be nonzero has
232 the consequence that certain symbols will not be made weak that
233 otherwise would be. The C++ ABI requires this macro to be zero;
8c27b7d4 234 see the documentation. */
0524c91d
MA
235#ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
236#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
4746cf84
MA
237#endif
238
ea4b7848 239/* This determines whether or not we need linkonce unwind information. */
4746cf84
MA
240#ifndef TARGET_USES_WEAK_UNWIND_INFO
241#define TARGET_USES_WEAK_UNWIND_INFO 0
242#endif
243
d48fd218
ZW
244/* By default, there is no prefix on user-defined symbols. */
245#ifndef USER_LABEL_PREFIX
246#define USER_LABEL_PREFIX ""
247#endif
248
8f08ea1e 249/* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
f676971a 250 provide a weak attribute. Else define it to nothing.
8f08ea1e 251
d02af173 252 This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
8f08ea1e
L
253 not available at that time.
254
255 Note, this is only for use by target files which we know are to be
256 compiled by GCC. */
257#ifndef TARGET_ATTRIBUTE_WEAK
258# if SUPPORTS_WEAK
259# define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
260# else
261# define TARGET_ATTRIBUTE_WEAK
262# endif
263#endif
264
4746cf84 265/* Determines whether we may use common symbols to represent one-only
9cf737f8 266 semantics (a.k.a. "vague linkage"). */
4746cf84
MA
267#ifndef USE_COMMON_FOR_ONE_ONLY
268# define USE_COMMON_FOR_ONE_ONLY 1
269#endif
270
15072eb1
ZW
271/* By default we can assume that all global symbols are in one namespace,
272 across all shared libraries. */
273#ifndef MULTIPLE_SYMBOL_SPACES
274# define MULTIPLE_SYMBOL_SPACES 0
275#endif
4746cf84 276
ea4f1fce
JO
277/* If the target supports init_priority C++ attribute, give
278 SUPPORTS_INIT_PRIORITY a nonzero value. */
279#ifndef SUPPORTS_INIT_PRIORITY
280#define SUPPORTS_INIT_PRIORITY 1
281#endif /* SUPPORTS_INIT_PRIORITY */
282
5897739e
JO
283/* If duplicate library search directories can be removed from a
284 linker command without changing the linker's semantics, give this
285 symbol a nonzero. */
286#ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
287#define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0
288#endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */
289
a6ab3aad
JM
290/* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
291 the rest of the DWARF 2 frame unwind support is also provided. */
0021b564
JM
292#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
293#define DWARF2_UNWIND_INFO 1
a6ab3aad 294#endif
b366352b 295
2cc07db4
RH
296/* If we have named sections, and we're using crtstuff to run ctors,
297 use them for registering eh frame information. */
bc2a8f08
RH
298#if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
299 && !defined(EH_FRAME_IN_DATA_SECTION)
7c262518
RH
300#ifndef EH_FRAME_SECTION_NAME
301#define EH_FRAME_SECTION_NAME ".eh_frame"
302#endif
31cf0144
JM
303#endif
304
1a35e62d
MM
305/* On many systems, different EH table encodings are used under
306 difference circumstances. Some will require runtime relocations;
307 some will not. For those that do not require runtime relocations,
308 we would like to make the table read-only. However, since the
309 read-only tables may need to be combined with read-write tables
310 that do require runtime relocation, it is not safe to make the
311 tables read-only unless the linker will merge read-only and
312 read-write sections into a single read-write section. If your
313 linker does not have this ability, but your system is such that no
314 encoding used with non-PIC code will ever require a runtime
315 relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
316 your target configuration file. */
317#ifndef EH_TABLES_CAN_BE_READ_ONLY
318#ifdef HAVE_LD_RO_RW_SECTION_MIXING
319#define EH_TABLES_CAN_BE_READ_ONLY 1
320#else
321#define EH_TABLES_CAN_BE_READ_ONLY 0
322#endif
323#endif
324
6351543d
AG
325/* If we have named section and we support weak symbols, then use the
326 .jcr section for recording java classes which need to be registered
327 at program start-up time. */
328#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
329#ifndef JCR_SECTION_NAME
330#define JCR_SECTION_NAME ".jcr"
331#endif
332#endif
333
adb35797 334/* This decision to use a .jcr section can be overridden by defining
e50e6b88
DS
335 USE_JCR_SECTION to 0 in target file. This is necessary if target
336 can define JCR_SECTION_NAME but does not have crtstuff or
337 linker support for .jcr section. */
338#ifndef TARGET_USE_JCR_SECTION
339#ifdef JCR_SECTION_NAME
340#define TARGET_USE_JCR_SECTION 1
341#else
342#define TARGET_USE_JCR_SECTION 0
343#endif
344#endif
345
c478efd1
GDR
346/* Number of hardware registers that go into the DWARF-2 unwind info.
347 If not defined, equals FIRST_PSEUDO_REGISTER */
348
349#ifndef DWARF_FRAME_REGISTERS
350#define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
351#endif
d8ea8f28 352
4617e3b5
KG
353/* How to renumber registers for dbx and gdb. If not defined, assume
354 no renumbering is necessary. */
355
356#ifndef DBX_REGISTER_NUMBER
357#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
358#endif
359
d8ea8f28
ZW
360/* Default sizes for base C types. If the sizes are different for
361 your target, you should override these values by defining the
362 appropriate symbols in your tm.h file. */
363
5c60f03d
KG
364#ifndef BITS_PER_UNIT
365#define BITS_PER_UNIT 8
366#endif
367
e81dd381
KG
368#ifndef BITS_PER_WORD
369#define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
370#endif
371
d8ea8f28
ZW
372#ifndef CHAR_TYPE_SIZE
373#define CHAR_TYPE_SIZE BITS_PER_UNIT
374#endif
375
609688f3
JM
376#ifndef BOOL_TYPE_SIZE
377/* `bool' has size and alignment `1', on almost all platforms. */
378#define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
379#endif
380
d8ea8f28
ZW
381#ifndef SHORT_TYPE_SIZE
382#define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
383#endif
384
385#ifndef INT_TYPE_SIZE
386#define INT_TYPE_SIZE BITS_PER_WORD
387#endif
388
389#ifndef LONG_TYPE_SIZE
390#define LONG_TYPE_SIZE BITS_PER_WORD
391#endif
392
393#ifndef LONG_LONG_TYPE_SIZE
394#define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
395#endif
396
397#ifndef WCHAR_TYPE_SIZE
398#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
399#endif
400
d8ea8f28
ZW
401#ifndef FLOAT_TYPE_SIZE
402#define FLOAT_TYPE_SIZE BITS_PER_WORD
403#endif
404
405#ifndef DOUBLE_TYPE_SIZE
406#define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
407#endif
408
409#ifndef LONG_DOUBLE_TYPE_SIZE
410#define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
411#endif
412
2465bf76
KG
413/* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
414#ifndef POINTER_SIZE
415#define POINTER_SIZE BITS_PER_WORD
416#endif
417
848e0190
JH
418#ifndef PIC_OFFSET_TABLE_REGNUM
419#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
420#endif
421
b2ca3702
MM
422#ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
423#define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
424#endif
425
63c5b495 426#ifndef TARGET_DECLSPEC
b2ca3702 427#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
63c5b495
MM
428/* If the target supports the "dllimport" attribute, users are
429 probably used to the "__declspec" syntax. */
430#define TARGET_DECLSPEC 1
431#else
432#define TARGET_DECLSPEC 0
433#endif
434#endif
435
a9374841
MM
436/* By default, the preprocessor should be invoked the same way in C++
437 as in C. */
438#ifndef CPLUSPLUS_CPP_SPEC
439#ifdef CPP_SPEC
440#define CPLUSPLUS_CPP_SPEC CPP_SPEC
441#endif
442#endif
443
bf501a65
RH
444#ifndef ACCUMULATE_OUTGOING_ARGS
445#define ACCUMULATE_OUTGOING_ARGS 0
446#endif
447
448/* Supply a default definition for PUSH_ARGS. */
449#ifndef PUSH_ARGS
450#ifdef PUSH_ROUNDING
451#define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
452#else
453#define PUSH_ARGS 0
454#endif
455#endif
456
9d6bef95
JM
457/* Decide whether a function's arguments should be processed
458 from first to last or from last to first.
459
460 They should if the stack and args grow in opposite directions, but
461 only if we have push insns. */
462
463#ifdef PUSH_ROUNDING
464
465#ifndef PUSH_ARGS_REVERSED
466#if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
467#define PUSH_ARGS_REVERSED PUSH_ARGS
468#endif
469#endif
470
471#endif
472
473#ifndef PUSH_ARGS_REVERSED
474#define PUSH_ARGS_REVERSED 0
475#endif
476
31cdd499
ZW
477/* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
478 STACK_BOUNDARY is required. */
479#ifndef PREFERRED_STACK_BOUNDARY
480#define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
481#endif
482
467cecf3
JB
483#ifndef TARGET_DEFAULT_PACK_STRUCT
484#define TARGET_DEFAULT_PACK_STRUCT 0
485#endif
486
67231816 487/* By default, the C++ compiler will use function addresses in the
cc2902df 488 vtable entries. Setting this nonzero tells the compiler to use
67231816 489 function descriptors instead. The value of this macro says how
f676971a 490 many words wide the descriptor is (normally 2). It is assumed
67231816
RH
491 that the address of a function descriptor may be treated as a
492 pointer to a function. */
493#ifndef TARGET_VTABLE_USES_DESCRIPTORS
494#define TARGET_VTABLE_USES_DESCRIPTORS 0
495#endif
496
a6f5e048
RH
497/* By default, the vtable entries are void pointers, the so the alignment
498 is the same as pointer alignment. The value of this macro specifies
499 the alignment of the vtable entry in bits. It should be defined only
4b7e68e7 500 when special alignment is necessary. */
a6f5e048
RH
501#ifndef TARGET_VTABLE_ENTRY_ALIGN
502#define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
503#endif
504
505/* There are a few non-descriptor entries in the vtable at offsets below
506 zero. If these entries must be padded (say, to preserve the alignment
507 specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
508 words in each data entry. */
509#ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
510#define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
511#endif
512
4a77e08c
DS
513/* Decide whether it is safe to use a local alias for a virtual function
514 when constructing thunks. */
515#ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
516#ifdef ASM_OUTPUT_DEF
517#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
518#else
519#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
520#endif
521#endif
522
2a1ee410
RH
523/* Select a format to encode pointers in exception handling data. We
524 prefer those that result in fewer dynamic relocations. Assume no
525 special support here and encode direct references. */
526#ifndef ASM_PREFERRED_EH_DATA_FORMAT
527#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
528#endif
529
f3c55c97
AO
530/* By default, the C++ compiler will use the lowest bit of the pointer
531 to function to indicate a pointer-to-member-function points to a
532 virtual member function. However, if FUNCTION_BOUNDARY indicates
533 function addresses aren't always even, the lowest bit of the delta
534 field will be used. */
535#ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
536#define TARGET_PTRMEMFUNC_VBIT_LOCATION \
537 (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
538 ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
539#endif
540
5f0e9ea2
GK
541#ifndef DEFAULT_GDB_EXTENSIONS
542#define DEFAULT_GDB_EXTENSIONS 1
543#endif
544
545/* If more than one debugging type is supported, you must define
f8ca7e49 546 PREFERRED_DEBUGGING_TYPE to choose the default. */
5f0e9ea2 547
f8ca7e49
ZW
548#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
549 + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
550 + defined (VMS_DEBUGGING_INFO))
5f0e9ea2 551#ifndef PREFERRED_DEBUGGING_TYPE
f8ca7e49 552#error You must define PREFERRED_DEBUGGING_TYPE
5f0e9ea2 553#endif /* no PREFERRED_DEBUGGING_TYPE */
f8ca7e49
ZW
554
555/* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
556 here so other code needn't care. */
557#elif defined DBX_DEBUGGING_INFO
5f0e9ea2 558#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
f8ca7e49
ZW
559
560#elif defined SDB_DEBUGGING_INFO
5f0e9ea2 561#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
f8ca7e49
ZW
562
563#elif defined DWARF2_DEBUGGING_INFO
5f0e9ea2 564#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
f8ca7e49
ZW
565
566#elif defined VMS_DEBUGGING_INFO
7a0c8d71 567#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
f8ca7e49
ZW
568
569#elif defined XCOFF_DEBUGGING_INFO
5f0e9ea2 570#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
5f0e9ea2 571
f8ca7e49
ZW
572#else
573/* No debugging format is supported by this target. */
5f0e9ea2
GK
574#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
575#endif
576
66d93b5a
RH
577/* Define codes for all the float formats that we know of. */
578#define UNKNOWN_FLOAT_FORMAT 0
579#define IEEE_FLOAT_FORMAT 1
580#define VAX_FLOAT_FORMAT 2
581#define IBM_FLOAT_FORMAT 3
582#define C4X_FLOAT_FORMAT 4
583
584/* Default to IEEE float if not specified. Nearly all machines use it. */
585#ifndef TARGET_FLOAT_FORMAT
586#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
587#endif
588
888d2cd6
DJ
589/* Some macros can be defined by the backend in either a mode-dependent
590 or mode-independent form. The compiler proper should only use the
591 mode-dependent form, providing VOIDmode when the mode is unknown.
592 We can't poison the macros because the backend may reference them. */
593
594#ifndef REGNO_MODE_OK_FOR_BASE_P
595#define REGNO_MODE_OK_FOR_BASE_P(REGNO, MODE) REGNO_OK_FOR_BASE_P (REGNO)
596#endif
597
598#ifndef REG_MODE_OK_FOR_BASE_P
599#define REG_MODE_OK_FOR_BASE_P(REG, MODE) REG_OK_FOR_BASE_P (REG)
600#endif
601
3dcc68a4
NC
602/* Determine the register class for registers suitable to be the base
603 address register in a MEM. Allow the choice to be dependent upon
604 the mode of the memory access. */
605#ifndef MODE_BASE_REG_CLASS
606#define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS
607#endif
608
888d2cd6
DJ
609/* Some machines require a different base register class if the index
610 is a register. By default, assume that a base register is acceptable. */
611#ifndef MODE_BASE_REG_REG_CLASS
612#define MODE_BASE_REG_REG_CLASS(MODE) MODE_BASE_REG_CLASS(MODE)
613#endif
614
615#ifndef REGNO_MODE_OK_FOR_REG_BASE_P
616#define REGNO_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REGNO_MODE_OK_FOR_BASE_P (REGNO, MODE)
617#endif
618
619#ifndef REG_MODE_OK_FOR_REG_BASE_P
620#define REG_MODE_OK_FOR_REG_BASE_P(REGNO, MODE) REG_MODE_OK_FOR_BASE_P (REGNO, MODE)
621#endif
622
3fcaac1d
RS
623#ifndef LARGEST_EXPONENT_IS_NORMAL
624#define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
625#endif
626
627#ifndef ROUND_TOWARDS_ZERO
628#define ROUND_TOWARDS_ZERO 0
629#endif
630
71925bc0 631#ifndef MODE_HAS_NANS
3fcaac1d
RS
632#define MODE_HAS_NANS(MODE) \
633 (FLOAT_MODE_P (MODE) \
634 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
635 && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
71925bc0
RS
636#endif
637
638#ifndef MODE_HAS_INFINITIES
3fcaac1d
RS
639#define MODE_HAS_INFINITIES(MODE) \
640 (FLOAT_MODE_P (MODE) \
641 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
642 && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE)))
71925bc0
RS
643#endif
644
645#ifndef MODE_HAS_SIGNED_ZEROS
646#define MODE_HAS_SIGNED_ZEROS(MODE) \
647 (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
648#endif
649
650#ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING
3fcaac1d
RS
651#define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \
652 (FLOAT_MODE_P (MODE) \
653 && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \
654 && !ROUND_TOWARDS_ZERO)
71925bc0
RS
655#endif
656
c15c90bb
ZW
657#ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
658#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
659#endif
660
6cb38cd4 661/* True if the targets integer-comparison functions return { 0, 1, 2
b3f8d95d
MM
662 } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
663 instead. The libgcc routines are biased. */
664#ifndef TARGET_LIB_INT_CMP_BIASED
665#define TARGET_LIB_INT_CMP_BIASED (true)
666#endif
667
2d295af5
ZW
668/* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
669 then the word-endianness is the same as for integers. */
efdc7e19
RH
670#ifndef FLOAT_WORDS_BIG_ENDIAN
671#define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
672#endif
673
d57a4b98
RH
674#ifndef TARGET_FLT_EVAL_METHOD
675#define TARGET_FLT_EVAL_METHOD 0
676#endif
677
194734e9 678#ifndef HOT_TEXT_SECTION_NAME
3a4bdd05 679#define HOT_TEXT_SECTION_NAME ".text.hot"
194734e9
JH
680#endif
681
682#ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
3a4bdd05 683#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
194734e9
JH
684#endif
685
750054a2
CT
686#ifndef HAS_LONG_COND_BRANCH
687#define HAS_LONG_COND_BRANCH 0
688#endif
689
690#ifndef HAS_LONG_UNCOND_BRANCH
691#define HAS_LONG_UNCOND_BRANCH 0
692#endif
693
c4336539
PB
694/* By default, only attempt to parallelize bitwise operations, and
695 possibly adds/subtracts using bit-twiddling. */
79fe1b3b 696#ifndef UNITS_PER_SIMD_WORD
c4336539 697#define UNITS_PER_SIMD_WORD UNITS_PER_WORD
79fe1b3b
DN
698#endif
699
4bafaa6f 700/* Determine whether __cxa_atexit, rather than atexit, is used to
4b7e68e7 701 register C++ destructors for local statics and global objects. */
4bafaa6f
L
702#ifndef DEFAULT_USE_CXA_ATEXIT
703#define DEFAULT_USE_CXA_ATEXIT 0
704#endif
705
ccfc6cc8
UW
706/* Determine whether extra constraint letter should be handled
707 via address reload (like 'o'). */
708#ifndef EXTRA_MEMORY_CONSTRAINT
97488870 709#define EXTRA_MEMORY_CONSTRAINT(C,STR) 0
ccfc6cc8
UW
710#endif
711
712/* Determine whether extra constraint letter should be handled
713 as an address (like 'p'). */
714#ifndef EXTRA_ADDRESS_CONSTRAINT
97488870
R
715#define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0
716#endif
717
718/* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN
719 for all the characters that it does not want to change, so things like the
720 'length' of a digit in a matching constraint is an implementation detail,
721 and not part of the interface. */
722#define DEFAULT_CONSTRAINT_LEN(C,STR) 1
723
724#ifndef CONSTRAINT_LEN
725#define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR)
726#endif
727
728#if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P)
729#define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C)
730#endif
731
732#if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P)
733#define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \
734 CONST_DOUBLE_OK_FOR_LETTER_P (OP, C)
735#endif
736
3ff5ef1b 737#ifndef REG_CLASS_FROM_CONSTRAINT
97488870 738#define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C)
3ff5ef1b 739#endif
97488870
R
740
741#if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR)
742#define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C)
ccfc6cc8
UW
743#endif
744
37706dd1
HPN
745#ifndef REGISTER_MOVE_COST
746#define REGISTER_MOVE_COST(m, x, y) 2
747#endif
748
3f117656 749/* Determine whether the entire c99 runtime
272f51a3
JH
750 is present in the runtime library. */
751#ifndef TARGET_C99_FUNCTIONS
752#define TARGET_C99_FUNCTIONS 0
753#endif
754
7dba8395 755/* Indicate that CLZ and CTZ are undefined at zero. */
f676971a 756#ifndef CLZ_DEFINED_VALUE_AT_ZERO
7dba8395
RH
757#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
758#endif
f676971a 759#ifndef CTZ_DEFINED_VALUE_AT_ZERO
7dba8395
RH
760#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
761#endif
762
06f31100
RS
763/* Provide a default value for STORE_FLAG_VALUE. */
764#ifndef STORE_FLAG_VALUE
765#define STORE_FLAG_VALUE 1
766#endif
767
436bcda1
GK
768/* This macro is used to determine what the largest unit size that
769 move_by_pieces can use is. */
770
771/* MOVE_MAX_PIECES is the number of bytes at a time which we can
772 move efficiently, as opposed to MOVE_MAX which is the maximum
773 number of bytes we can move with a single instruction. */
774
775#ifndef MOVE_MAX_PIECES
776#define MOVE_MAX_PIECES MOVE_MAX
777#endif
778
a594a19c
GK
779#ifndef STACK_POINTER_OFFSET
780#define STACK_POINTER_OFFSET 0
781#endif
782
cca8fb0e
KH
783#ifndef LOCAL_REGNO
784#define LOCAL_REGNO(REGNO) 0
785#endif
786
9d05bbce
KH
787/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
788 the stack pointer does not matter. The value is tested only in
789 functions that have frame pointers. */
790#ifndef EXIT_IGNORE_STACK
791#define EXIT_IGNORE_STACK 0
792#endif
793
0ede749d
KH
794/* Assume that case vectors are not pc-relative. */
795#ifndef CASE_VECTOR_PC_RELATIVE
796#define CASE_VECTOR_PC_RELATIVE 0
797#endif
798
6de9cd9a
DN
799/* Assume that trampolines need function alignment. */
800#ifndef TRAMPOLINE_ALIGNMENT
801#define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
802#endif
803
d220de0e
KH
804/* Register mappings for target machines without register windows. */
805#ifndef INCOMING_REGNO
806#define INCOMING_REGNO(N) (N)
807#endif
808
809#ifndef OUTGOING_REGNO
810#define OUTGOING_REGNO(N) (N)
811#endif
812
bee07d3f
KH
813#ifndef SHIFT_COUNT_TRUNCATED
814#define SHIFT_COUNT_TRUNCATED 0
815#endif
816
3e759eda
KH
817#ifndef LEGITIMIZE_ADDRESS
818#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
819#endif
820
2e4e72b1
ZW
821#ifndef LEGITIMATE_PIC_OPERAND_P
822#define LEGITIMATE_PIC_OPERAND_P(X) 1
823#endif
824
1f8551b2
KH
825#ifndef REVERSIBLE_CC_MODE
826#define REVERSIBLE_CC_MODE(MODE) 0
827#endif
828
07e15286
DE
829/* Biggest alignment supported by the object file format of this machine. */
830#ifndef MAX_OFILE_ALIGNMENT
831#define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
832#endif
833
f62c8a5c
JJ
834#ifndef FRAME_GROWS_DOWNWARD
835#define FRAME_GROWS_DOWNWARD 0
836#endif
837
88657302 838#endif /* ! GCC_DEFAULTS_H */