]>
Commit | Line | Data |
---|---|---|
eff01bb6 | 1 | /* Definitions of various defaults for tm.h macros. |
d9221e01 | 2 | Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
d8ea8f28 | 3 | Free Software Foundation, Inc. |
b33c316c | 4 | Contributed by Ron Guilmette (rfg@monkeys.com) |
c53a8ab6 | 5 | |
1322177d | 6 | This file is part of GCC. |
c53a8ab6 | 7 | |
1322177d LB |
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. | |
c53a8ab6 | 12 | |
1322177d LB |
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. | |
c53a8ab6 RS |
17 | |
18 | You should have received a copy of the GNU General Public License | |
1322177d LB |
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. */ | |
c53a8ab6 | 22 | |
d8ea8f28 ZW |
23 | #ifndef GCC_DEFAULTS_H |
24 | #define GCC_DEFAULTS_H | |
25 | ||
2f8dd115 NB |
26 | #ifndef GET_ENVIRONMENT |
27 | #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0) | |
28 | #endif | |
29 | ||
95ec27aa SB |
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) | |
4fa31c2a | 37 | |
b2b263e1 NB |
38 | /* Define default standard character escape sequences. */ |
39 | #ifndef TARGET_BELL | |
40 | # define TARGET_BELL 007 | |
41 | # define TARGET_BS 010 | |
42 | # define TARGET_TAB 011 | |
43 | # define TARGET_NEWLINE 012 | |
44 | # define TARGET_VT 013 | |
45 | # define TARGET_FF 014 | |
46 | # define TARGET_CR 015 | |
501990bb | 47 | # define TARGET_ESC 033 |
b2b263e1 NB |
48 | #endif |
49 | ||
4977bab6 ZW |
50 | /* Store in OUTPUT a string (made with alloca) containing an |
51 | assembler-name for a local static variable or function named NAME. | |
7b73db04 CH |
52 | LABELNO is an integer which is different for each call. */ |
53 | ||
4977bab6 ZW |
54 | #ifndef ASM_PN_FORMAT |
55 | # ifndef NO_DOT_IN_LABEL | |
56 | # define ASM_PN_FORMAT "%s.%lu" | |
57 | # else | |
58 | # ifndef NO_DOLLAR_IN_LABEL | |
59 | # define ASM_PN_FORMAT "%s$%lu" | |
60 | # else | |
61 | # define ASM_PN_FORMAT "__%s_%lu" | |
62 | # endif | |
63 | # endif | |
64 | #endif /* ! ASM_PN_FORMAT */ | |
65 | ||
7b73db04 | 66 | #ifndef ASM_FORMAT_PRIVATE_NAME |
4977bab6 ZW |
67 | # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ |
68 | do { const char *const name_ = (NAME); \ | |
703ad42b | 69 | char *const output_ = (OUTPUT) = alloca (strlen (name_) + 32);\ |
4977bab6 | 70 | sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \ |
7b73db04 CH |
71 | } while (0) |
72 | #endif | |
73 | ||
74 | #ifndef ASM_STABD_OP | |
0a3e1f45 | 75 | #define ASM_STABD_OP "\t.stabd\t" |
7b73db04 CH |
76 | #endif |
77 | ||
78 | /* This is how to output an element of a case-vector that is absolute. | |
79 | Some targets don't use this, but we have to define it anyway. */ | |
80 | ||
81 | #ifndef ASM_OUTPUT_ADDR_VEC_ELT | |
82 | #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ | |
07b50aad | 83 | do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \ |
4977bab6 | 84 | (*targetm.asm_out.internal_label) (FILE, "L", (VALUE)); \ |
7b73db04 CH |
85 | fputc ('\n', FILE); \ |
86 | } while (0) | |
87 | #endif | |
88 | ||
e0a21ab9 | 89 | /* Choose a reasonable default for ASM_OUTPUT_ASCII. */ |
c53a8ab6 RS |
90 | |
91 | #ifndef ASM_OUTPUT_ASCII | |
92 | #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ | |
93 | do { \ | |
94 | FILE *_hide_asm_out_file = (MYFILE); \ | |
47ee9bcb | 95 | const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \ |
c53a8ab6 RS |
96 | int _hide_thissize = (MYLENGTH); \ |
97 | { \ | |
98 | FILE *asm_out_file = _hide_asm_out_file; \ | |
47ee9bcb | 99 | const unsigned char *p = _hide_p; \ |
c53a8ab6 RS |
100 | int thissize = _hide_thissize; \ |
101 | int i; \ | |
102 | fprintf (asm_out_file, "\t.ascii \""); \ | |
103 | \ | |
104 | for (i = 0; i < thissize; i++) \ | |
105 | { \ | |
b3694847 | 106 | int c = p[i]; \ |
c53a8ab6 RS |
107 | if (c == '\"' || c == '\\') \ |
108 | putc ('\\', asm_out_file); \ | |
5f6d3823 | 109 | if (ISPRINT(c)) \ |
c53a8ab6 RS |
110 | putc (c, asm_out_file); \ |
111 | else \ | |
112 | { \ | |
113 | fprintf (asm_out_file, "\\%o", c); \ | |
114 | /* After an octal-escape, if a digit follows, \ | |
115 | terminate one string constant and start another. \ | |
8aeea6e6 | 116 | The VAX assembler fails to stop reading the escape \ |
c53a8ab6 RS |
117 | after three digits, so this is the only way we \ |
118 | can get it to parse the data properly. */ \ | |
d07ecc3b | 119 | if (i < thissize - 1 && ISDIGIT(p[i + 1])) \ |
c53a8ab6 RS |
120 | fprintf (asm_out_file, "\"\n\t.ascii \""); \ |
121 | } \ | |
122 | } \ | |
123 | fprintf (asm_out_file, "\"\n"); \ | |
124 | } \ | |
125 | } \ | |
126 | while (0) | |
127 | #endif | |
d0d4af87 | 128 | |
650f773a JW |
129 | /* This is how we tell the assembler to equate two values. */ |
130 | #ifdef SET_ASM_OP | |
131 | #ifndef ASM_OUTPUT_DEF | |
132 | #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ | |
e8638df0 | 133 | do { fprintf ((FILE), "%s", SET_ASM_OP); \ |
650f773a JW |
134 | assemble_name (FILE, LABEL1); \ |
135 | fprintf (FILE, ","); \ | |
136 | assemble_name (FILE, LABEL2); \ | |
137 | fprintf (FILE, "\n"); \ | |
138 | } while (0) | |
139 | #endif | |
140 | #endif | |
daefd78b | 141 | |
4ad5e05d KG |
142 | /* This is how to output the definition of a user-level label named |
143 | NAME, such as the label on a static function or variable NAME. */ | |
144 | ||
145 | #ifndef ASM_OUTPUT_LABEL | |
146 | #define ASM_OUTPUT_LABEL(FILE,NAME) \ | |
147 | do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0) | |
148 | #endif | |
149 | ||
81d77cda RK |
150 | /* This is how to output a reference to a user-level label named NAME. */ |
151 | ||
152 | #ifndef ASM_OUTPUT_LABELREF | |
19283265 | 153 | #define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME)) |
81d77cda RK |
154 | #endif |
155 | ||
8215347e JW |
156 | /* Allow target to print debug info labels specially. This is useful for |
157 | VLIW targets, since debug info labels should go into the middle of | |
158 | instruction bundles instead of breaking them. */ | |
159 | ||
160 | #ifndef ASM_OUTPUT_DEBUG_LABEL | |
161 | #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \ | |
4977bab6 | 162 | (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM) |
8215347e JW |
163 | #endif |
164 | ||
3aa8ab7b | 165 | /* This is how we tell the assembler that a symbol is weak. */ |
20c93f7c RO |
166 | #ifndef ASM_OUTPUT_WEAK_ALIAS |
167 | #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF) | |
3aa8ab7b L |
168 | #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \ |
169 | do \ | |
170 | { \ | |
171 | ASM_WEAKEN_LABEL (STREAM, NAME); \ | |
172 | if (VALUE) \ | |
173 | ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \ | |
174 | } \ | |
175 | while (0) | |
176 | #endif | |
20c93f7c | 177 | #endif |
3aa8ab7b | 178 | |
2be2ac70 ZW |
179 | /* How to emit a .type directive. */ |
180 | #ifndef ASM_OUTPUT_TYPE_DIRECTIVE | |
181 | #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT | |
182 | #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \ | |
183 | do \ | |
184 | { \ | |
185 | fputs (TYPE_ASM_OP, STREAM); \ | |
186 | assemble_name (STREAM, NAME); \ | |
187 | fputs (", ", STREAM); \ | |
188 | fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \ | |
189 | putc ('\n', STREAM); \ | |
190 | } \ | |
191 | while (0) | |
192 | #endif | |
193 | #endif | |
194 | ||
195 | /* How to emit a .size directive. */ | |
196 | #ifndef ASM_OUTPUT_SIZE_DIRECTIVE | |
197 | #ifdef SIZE_ASM_OP | |
198 | #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \ | |
199 | do \ | |
200 | { \ | |
201 | HOST_WIDE_INT size_ = (SIZE); \ | |
202 | fputs (SIZE_ASM_OP, STREAM); \ | |
203 | assemble_name (STREAM, NAME); \ | |
90ff44cf | 204 | fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \ |
2be2ac70 ZW |
205 | } \ |
206 | while (0) | |
207 | ||
99086d59 | 208 | #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \ |
2be2ac70 ZW |
209 | do \ |
210 | { \ | |
211 | fputs (SIZE_ASM_OP, STREAM); \ | |
99086d59 ZW |
212 | assemble_name (STREAM, NAME); \ |
213 | fputs (", .-", STREAM); \ | |
214 | assemble_name (STREAM, NAME); \ | |
2be2ac70 ZW |
215 | putc ('\n', STREAM); \ |
216 | } \ | |
217 | while (0) | |
218 | ||
219 | #endif | |
220 | #endif | |
221 | ||
daefd78b JM |
222 | /* This determines whether or not we support weak symbols. */ |
223 | #ifndef SUPPORTS_WEAK | |
79c4e63f | 224 | #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL) |
daefd78b JM |
225 | #define SUPPORTS_WEAK 1 |
226 | #else | |
227 | #define SUPPORTS_WEAK 0 | |
228 | #endif | |
229 | #endif | |
a6ab3aad | 230 | |
1ca894a0 MM |
231 | /* This determines whether or not we support link-once semantics. */ |
232 | #ifndef SUPPORTS_ONE_ONLY | |
233 | #ifdef MAKE_DECL_ONE_ONLY | |
234 | #define SUPPORTS_ONE_ONLY 1 | |
235 | #else | |
236 | #define SUPPORTS_ONE_ONLY 0 | |
237 | #endif | |
238 | #endif | |
239 | ||
4746cf84 MA |
240 | /* Determines whether explicit template instantiations should |
241 | be given link-once semantics. The C++ ABI requires this | |
242 | macro to be nonzero; see the documentation. */ | |
243 | #ifndef TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY | |
244 | # define TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY 1 | |
245 | #endif | |
246 | ||
247 | /* This determines whether or not we need linkonce unwind information */ | |
248 | #ifndef TARGET_USES_WEAK_UNWIND_INFO | |
249 | #define TARGET_USES_WEAK_UNWIND_INFO 0 | |
250 | #endif | |
251 | ||
d48fd218 ZW |
252 | /* By default, there is no prefix on user-defined symbols. */ |
253 | #ifndef USER_LABEL_PREFIX | |
254 | #define USER_LABEL_PREFIX "" | |
255 | #endif | |
256 | ||
8f08ea1e L |
257 | /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to |
258 | provide a weak attribute. Else define it to nothing. | |
259 | ||
d02af173 | 260 | This would normally belong in ansidecl.h, but SUPPORTS_WEAK is |
8f08ea1e L |
261 | not available at that time. |
262 | ||
263 | Note, this is only for use by target files which we know are to be | |
264 | compiled by GCC. */ | |
265 | #ifndef TARGET_ATTRIBUTE_WEAK | |
266 | # if SUPPORTS_WEAK | |
267 | # define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak)) | |
268 | # else | |
269 | # define TARGET_ATTRIBUTE_WEAK | |
270 | # endif | |
271 | #endif | |
272 | ||
4746cf84 MA |
273 | /* This determines whether this target supports hidden visibility. |
274 | This is a weaker condition than HAVE_GAS_HIDDEN, which probes for | |
275 | specific assembler syntax. */ | |
276 | #ifndef TARGET_SUPPORTS_HIDDEN | |
277 | # ifdef HAVE_GAS_HIDDEN | |
278 | # define TARGET_SUPPORTS_HIDDEN 1 | |
279 | # else | |
280 | # define TARGET_SUPPORTS_HIDDEN 0 | |
281 | # endif | |
282 | #endif | |
283 | ||
284 | /* Determines whether we may use common symbols to represent one-only | |
285 | semantics (a.k.a. "vague linkage"). */ | |
286 | #ifndef USE_COMMON_FOR_ONE_ONLY | |
287 | # define USE_COMMON_FOR_ONE_ONLY 1 | |
288 | #endif | |
289 | ||
290 | ||
ea4f1fce JO |
291 | /* If the target supports init_priority C++ attribute, give |
292 | SUPPORTS_INIT_PRIORITY a nonzero value. */ | |
293 | #ifndef SUPPORTS_INIT_PRIORITY | |
294 | #define SUPPORTS_INIT_PRIORITY 1 | |
295 | #endif /* SUPPORTS_INIT_PRIORITY */ | |
296 | ||
5897739e JO |
297 | /* If duplicate library search directories can be removed from a |
298 | linker command without changing the linker's semantics, give this | |
299 | symbol a nonzero. */ | |
300 | #ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES | |
301 | #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0 | |
302 | #endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */ | |
303 | ||
a6ab3aad JM |
304 | /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that |
305 | the rest of the DWARF 2 frame unwind support is also provided. */ | |
0021b564 JM |
306 | #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX) |
307 | #define DWARF2_UNWIND_INFO 1 | |
a6ab3aad | 308 | #endif |
b366352b | 309 | |
2cc07db4 RH |
310 | /* If we have named sections, and we're using crtstuff to run ctors, |
311 | use them for registering eh frame information. */ | |
bc2a8f08 RH |
312 | #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \ |
313 | && !defined(EH_FRAME_IN_DATA_SECTION) | |
7c262518 RH |
314 | #ifndef EH_FRAME_SECTION_NAME |
315 | #define EH_FRAME_SECTION_NAME ".eh_frame" | |
316 | #endif | |
31cf0144 JM |
317 | #endif |
318 | ||
6351543d AG |
319 | /* If we have named section and we support weak symbols, then use the |
320 | .jcr section for recording java classes which need to be registered | |
321 | at program start-up time. */ | |
322 | #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK | |
323 | #ifndef JCR_SECTION_NAME | |
324 | #define JCR_SECTION_NAME ".jcr" | |
325 | #endif | |
326 | #endif | |
327 | ||
b366352b MM |
328 | /* By default, we generate a label at the beginning and end of the |
329 | text section, and compute the size of the text section by | |
330 | subtracting the two. However, on some platforms that doesn't | |
331 | work, and we use the section itself, rather than a label at the | |
332 | beginning of it, to indicate the start of the section. On such | |
333 | platforms, define this to zero. */ | |
334 | #ifndef DWARF2_GENERATE_TEXT_SECTION_LABEL | |
335 | #define DWARF2_GENERATE_TEXT_SECTION_LABEL 1 | |
336 | #endif | |
246833ac | 337 | |
c478efd1 GDR |
338 | /* Number of hardware registers that go into the DWARF-2 unwind info. |
339 | If not defined, equals FIRST_PSEUDO_REGISTER */ | |
340 | ||
341 | #ifndef DWARF_FRAME_REGISTERS | |
342 | #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER | |
343 | #endif | |
d8ea8f28 | 344 | |
4617e3b5 KG |
345 | /* How to renumber registers for dbx and gdb. If not defined, assume |
346 | no renumbering is necessary. */ | |
347 | ||
348 | #ifndef DBX_REGISTER_NUMBER | |
349 | #define DBX_REGISTER_NUMBER(REGNO) (REGNO) | |
350 | #endif | |
351 | ||
d8ea8f28 ZW |
352 | /* Default sizes for base C types. If the sizes are different for |
353 | your target, you should override these values by defining the | |
354 | appropriate symbols in your tm.h file. */ | |
355 | ||
5c60f03d KG |
356 | #ifndef BITS_PER_UNIT |
357 | #define BITS_PER_UNIT 8 | |
358 | #endif | |
359 | ||
e81dd381 KG |
360 | #ifndef BITS_PER_WORD |
361 | #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD) | |
362 | #endif | |
363 | ||
d8ea8f28 ZW |
364 | #ifndef CHAR_TYPE_SIZE |
365 | #define CHAR_TYPE_SIZE BITS_PER_UNIT | |
366 | #endif | |
367 | ||
609688f3 JM |
368 | #ifndef BOOL_TYPE_SIZE |
369 | /* `bool' has size and alignment `1', on almost all platforms. */ | |
370 | #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE | |
371 | #endif | |
372 | ||
d8ea8f28 ZW |
373 | #ifndef SHORT_TYPE_SIZE |
374 | #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2)) | |
375 | #endif | |
376 | ||
377 | #ifndef INT_TYPE_SIZE | |
378 | #define INT_TYPE_SIZE BITS_PER_WORD | |
379 | #endif | |
380 | ||
381 | #ifndef LONG_TYPE_SIZE | |
382 | #define LONG_TYPE_SIZE BITS_PER_WORD | |
383 | #endif | |
384 | ||
385 | #ifndef LONG_LONG_TYPE_SIZE | |
386 | #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2) | |
387 | #endif | |
388 | ||
389 | #ifndef WCHAR_TYPE_SIZE | |
390 | #define WCHAR_TYPE_SIZE INT_TYPE_SIZE | |
391 | #endif | |
392 | ||
d8ea8f28 ZW |
393 | #ifndef FLOAT_TYPE_SIZE |
394 | #define FLOAT_TYPE_SIZE BITS_PER_WORD | |
395 | #endif | |
396 | ||
397 | #ifndef DOUBLE_TYPE_SIZE | |
398 | #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) | |
399 | #endif | |
400 | ||
401 | #ifndef LONG_DOUBLE_TYPE_SIZE | |
402 | #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) | |
403 | #endif | |
404 | ||
2465bf76 KG |
405 | /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */ |
406 | #ifndef POINTER_SIZE | |
407 | #define POINTER_SIZE BITS_PER_WORD | |
408 | #endif | |
409 | ||
848e0190 JH |
410 | #ifndef PIC_OFFSET_TABLE_REGNUM |
411 | #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM | |
412 | #endif | |
413 | ||
a9374841 MM |
414 | /* By default, the preprocessor should be invoked the same way in C++ |
415 | as in C. */ | |
416 | #ifndef CPLUSPLUS_CPP_SPEC | |
417 | #ifdef CPP_SPEC | |
418 | #define CPLUSPLUS_CPP_SPEC CPP_SPEC | |
419 | #endif | |
420 | #endif | |
421 | ||
bf501a65 RH |
422 | #ifndef ACCUMULATE_OUTGOING_ARGS |
423 | #define ACCUMULATE_OUTGOING_ARGS 0 | |
424 | #endif | |
425 | ||
426 | /* Supply a default definition for PUSH_ARGS. */ | |
427 | #ifndef PUSH_ARGS | |
428 | #ifdef PUSH_ROUNDING | |
429 | #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS | |
430 | #else | |
431 | #define PUSH_ARGS 0 | |
432 | #endif | |
433 | #endif | |
434 | ||
9d6bef95 JM |
435 | /* Decide whether a function's arguments should be processed |
436 | from first to last or from last to first. | |
437 | ||
438 | They should if the stack and args grow in opposite directions, but | |
439 | only if we have push insns. */ | |
440 | ||
441 | #ifdef PUSH_ROUNDING | |
442 | ||
443 | #ifndef PUSH_ARGS_REVERSED | |
444 | #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD) | |
445 | #define PUSH_ARGS_REVERSED PUSH_ARGS | |
446 | #endif | |
447 | #endif | |
448 | ||
449 | #endif | |
450 | ||
451 | #ifndef PUSH_ARGS_REVERSED | |
452 | #define PUSH_ARGS_REVERSED 0 | |
453 | #endif | |
454 | ||
31cdd499 ZW |
455 | /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY. |
456 | STACK_BOUNDARY is required. */ | |
457 | #ifndef PREFERRED_STACK_BOUNDARY | |
458 | #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY | |
459 | #endif | |
460 | ||
67231816 | 461 | /* By default, the C++ compiler will use function addresses in the |
cc2902df | 462 | vtable entries. Setting this nonzero tells the compiler to use |
67231816 RH |
463 | function descriptors instead. The value of this macro says how |
464 | many words wide the descriptor is (normally 2). It is assumed | |
465 | that the address of a function descriptor may be treated as a | |
466 | pointer to a function. */ | |
467 | #ifndef TARGET_VTABLE_USES_DESCRIPTORS | |
468 | #define TARGET_VTABLE_USES_DESCRIPTORS 0 | |
469 | #endif | |
470 | ||
a6f5e048 RH |
471 | /* By default, the vtable entries are void pointers, the so the alignment |
472 | is the same as pointer alignment. The value of this macro specifies | |
473 | the alignment of the vtable entry in bits. It should be defined only | |
4b7e68e7 | 474 | when special alignment is necessary. */ |
a6f5e048 RH |
475 | #ifndef TARGET_VTABLE_ENTRY_ALIGN |
476 | #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE | |
477 | #endif | |
478 | ||
479 | /* There are a few non-descriptor entries in the vtable at offsets below | |
480 | zero. If these entries must be padded (say, to preserve the alignment | |
481 | specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of | |
482 | words in each data entry. */ | |
483 | #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE | |
484 | #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1 | |
485 | #endif | |
486 | ||
2a1ee410 RH |
487 | /* Select a format to encode pointers in exception handling data. We |
488 | prefer those that result in fewer dynamic relocations. Assume no | |
489 | special support here and encode direct references. */ | |
490 | #ifndef ASM_PREFERRED_EH_DATA_FORMAT | |
491 | #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr | |
492 | #endif | |
493 | ||
f3c55c97 AO |
494 | /* By default, the C++ compiler will use the lowest bit of the pointer |
495 | to function to indicate a pointer-to-member-function points to a | |
496 | virtual member function. However, if FUNCTION_BOUNDARY indicates | |
497 | function addresses aren't always even, the lowest bit of the delta | |
498 | field will be used. */ | |
499 | #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION | |
500 | #define TARGET_PTRMEMFUNC_VBIT_LOCATION \ | |
501 | (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \ | |
502 | ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta) | |
503 | #endif | |
504 | ||
5f0e9ea2 GK |
505 | #ifndef DEFAULT_GDB_EXTENSIONS |
506 | #define DEFAULT_GDB_EXTENSIONS 1 | |
507 | #endif | |
508 | ||
509 | /* If more than one debugging type is supported, you must define | |
510 | PREFERRED_DEBUGGING_TYPE to choose a format in a system-dependent way. | |
511 | ||
512 | This is one long line cause VAXC can't handle a \-newline. */ | |
def66b10 | 513 | #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) + defined (VMS_DEBUGGING_INFO)) |
5f0e9ea2 GK |
514 | #ifndef PREFERRED_DEBUGGING_TYPE |
515 | You Lose! You must define PREFERRED_DEBUGGING_TYPE! | |
516 | #endif /* no PREFERRED_DEBUGGING_TYPE */ | |
517 | #else /* Only one debugging format supported. Define PREFERRED_DEBUGGING_TYPE | |
518 | so other code needn't care. */ | |
519 | #ifdef DBX_DEBUGGING_INFO | |
520 | #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG | |
521 | #endif | |
522 | #ifdef SDB_DEBUGGING_INFO | |
523 | #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG | |
524 | #endif | |
525 | #ifdef DWARF_DEBUGGING_INFO | |
526 | #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG | |
527 | #endif | |
528 | #ifdef DWARF2_DEBUGGING_INFO | |
529 | #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG | |
530 | #endif | |
7a0c8d71 DR |
531 | #ifdef VMS_DEBUGGING_INFO |
532 | #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG | |
533 | #endif | |
5f0e9ea2 GK |
534 | #ifdef XCOFF_DEBUGGING_INFO |
535 | #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG | |
536 | #endif | |
537 | #endif /* More than one debugger format enabled. */ | |
538 | ||
539 | /* If still not defined, must have been because no debugging formats | |
540 | are supported. */ | |
541 | #ifndef PREFERRED_DEBUGGING_TYPE | |
542 | #define PREFERRED_DEBUGGING_TYPE NO_DEBUG | |
543 | #endif | |
544 | ||
66d93b5a RH |
545 | /* Define codes for all the float formats that we know of. */ |
546 | #define UNKNOWN_FLOAT_FORMAT 0 | |
547 | #define IEEE_FLOAT_FORMAT 1 | |
548 | #define VAX_FLOAT_FORMAT 2 | |
549 | #define IBM_FLOAT_FORMAT 3 | |
550 | #define C4X_FLOAT_FORMAT 4 | |
551 | ||
552 | /* Default to IEEE float if not specified. Nearly all machines use it. */ | |
553 | #ifndef TARGET_FLOAT_FORMAT | |
554 | #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT | |
555 | #endif | |
556 | ||
3dcc68a4 NC |
557 | /* Determine the register class for registers suitable to be the base |
558 | address register in a MEM. Allow the choice to be dependent upon | |
559 | the mode of the memory access. */ | |
560 | #ifndef MODE_BASE_REG_CLASS | |
561 | #define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS | |
562 | #endif | |
563 | ||
3fcaac1d RS |
564 | #ifndef LARGEST_EXPONENT_IS_NORMAL |
565 | #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0 | |
566 | #endif | |
567 | ||
568 | #ifndef ROUND_TOWARDS_ZERO | |
569 | #define ROUND_TOWARDS_ZERO 0 | |
570 | #endif | |
571 | ||
71925bc0 | 572 | #ifndef MODE_HAS_NANS |
3fcaac1d RS |
573 | #define MODE_HAS_NANS(MODE) \ |
574 | (FLOAT_MODE_P (MODE) \ | |
575 | && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \ | |
576 | && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE))) | |
71925bc0 RS |
577 | #endif |
578 | ||
579 | #ifndef MODE_HAS_INFINITIES | |
3fcaac1d RS |
580 | #define MODE_HAS_INFINITIES(MODE) \ |
581 | (FLOAT_MODE_P (MODE) \ | |
582 | && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \ | |
583 | && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE))) | |
71925bc0 RS |
584 | #endif |
585 | ||
586 | #ifndef MODE_HAS_SIGNED_ZEROS | |
587 | #define MODE_HAS_SIGNED_ZEROS(MODE) \ | |
588 | (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) | |
589 | #endif | |
590 | ||
591 | #ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING | |
3fcaac1d RS |
592 | #define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \ |
593 | (FLOAT_MODE_P (MODE) \ | |
594 | && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \ | |
595 | && !ROUND_TOWARDS_ZERO) | |
71925bc0 RS |
596 | #endif |
597 | ||
c15c90bb ZW |
598 | #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL |
599 | #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false | |
600 | #endif | |
601 | ||
2d295af5 ZW |
602 | /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files, |
603 | then the word-endianness is the same as for integers. */ | |
efdc7e19 RH |
604 | #ifndef FLOAT_WORDS_BIG_ENDIAN |
605 | #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN | |
606 | #endif | |
607 | ||
d57a4b98 RH |
608 | #ifndef TARGET_FLT_EVAL_METHOD |
609 | #define TARGET_FLT_EVAL_METHOD 0 | |
610 | #endif | |
611 | ||
194734e9 JH |
612 | #ifndef HOT_TEXT_SECTION_NAME |
613 | #define HOT_TEXT_SECTION_NAME "text.hot" | |
614 | #endif | |
615 | ||
616 | #ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME | |
617 | #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME "text.unlikely" | |
618 | #endif | |
619 | ||
cb2a532e AH |
620 | #ifndef VECTOR_MODE_SUPPORTED_P |
621 | #define VECTOR_MODE_SUPPORTED_P(MODE) 0 | |
622 | #endif | |
623 | ||
4bafaa6f | 624 | /* Determine whether __cxa_atexit, rather than atexit, is used to |
4b7e68e7 | 625 | register C++ destructors for local statics and global objects. */ |
4bafaa6f L |
626 | #ifndef DEFAULT_USE_CXA_ATEXIT |
627 | #define DEFAULT_USE_CXA_ATEXIT 0 | |
628 | #endif | |
629 | ||
ccfc6cc8 UW |
630 | /* Determine whether extra constraint letter should be handled |
631 | via address reload (like 'o'). */ | |
632 | #ifndef EXTRA_MEMORY_CONSTRAINT | |
97488870 | 633 | #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0 |
ccfc6cc8 UW |
634 | #endif |
635 | ||
636 | /* Determine whether extra constraint letter should be handled | |
637 | as an address (like 'p'). */ | |
638 | #ifndef EXTRA_ADDRESS_CONSTRAINT | |
97488870 R |
639 | #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0 |
640 | #endif | |
641 | ||
642 | /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN | |
643 | for all the characters that it does not want to change, so things like the | |
644 | 'length' of a digit in a matching constraint is an implementation detail, | |
645 | and not part of the interface. */ | |
646 | #define DEFAULT_CONSTRAINT_LEN(C,STR) 1 | |
647 | ||
648 | #ifndef CONSTRAINT_LEN | |
649 | #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR) | |
650 | #endif | |
651 | ||
652 | #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P) | |
653 | #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C) | |
654 | #endif | |
655 | ||
656 | #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P) | |
657 | #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \ | |
658 | CONST_DOUBLE_OK_FOR_LETTER_P (OP, C) | |
659 | #endif | |
660 | ||
3ff5ef1b | 661 | #ifndef REG_CLASS_FROM_CONSTRAINT |
97488870 | 662 | #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C) |
3ff5ef1b | 663 | #endif |
97488870 R |
664 | |
665 | #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR) | |
666 | #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C) | |
ccfc6cc8 UW |
667 | #endif |
668 | ||
37706dd1 HPN |
669 | #ifndef REGISTER_MOVE_COST |
670 | #define REGISTER_MOVE_COST(m, x, y) 2 | |
671 | #endif | |
672 | ||
272f51a3 JH |
673 | /* Determine whether the the entire c99 runtime |
674 | is present in the runtime library. */ | |
675 | #ifndef TARGET_C99_FUNCTIONS | |
676 | #define TARGET_C99_FUNCTIONS 0 | |
677 | #endif | |
678 | ||
7dba8395 RH |
679 | /* Indicate that CLZ and CTZ are undefined at zero. */ |
680 | #ifndef CLZ_DEFINED_VALUE_AT_ZERO | |
681 | #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0 | |
682 | #endif | |
683 | #ifndef CTZ_DEFINED_VALUE_AT_ZERO | |
684 | #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0 | |
685 | #endif | |
686 | ||
06f31100 RS |
687 | /* Provide a default value for STORE_FLAG_VALUE. */ |
688 | #ifndef STORE_FLAG_VALUE | |
689 | #define STORE_FLAG_VALUE 1 | |
690 | #endif | |
691 | ||
436bcda1 GK |
692 | /* This macro is used to determine what the largest unit size that |
693 | move_by_pieces can use is. */ | |
694 | ||
695 | /* MOVE_MAX_PIECES is the number of bytes at a time which we can | |
696 | move efficiently, as opposed to MOVE_MAX which is the maximum | |
697 | number of bytes we can move with a single instruction. */ | |
698 | ||
699 | #ifndef MOVE_MAX_PIECES | |
700 | #define MOVE_MAX_PIECES MOVE_MAX | |
701 | #endif | |
702 | ||
a594a19c GK |
703 | #ifndef STACK_POINTER_OFFSET |
704 | #define STACK_POINTER_OFFSET 0 | |
705 | #endif | |
706 | ||
cca8fb0e KH |
707 | #ifndef LOCAL_REGNO |
708 | #define LOCAL_REGNO(REGNO) 0 | |
709 | #endif | |
710 | ||
9d05bbce KH |
711 | /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, |
712 | the stack pointer does not matter. The value is tested only in | |
713 | functions that have frame pointers. */ | |
714 | #ifndef EXIT_IGNORE_STACK | |
715 | #define EXIT_IGNORE_STACK 0 | |
716 | #endif | |
717 | ||
0ede749d KH |
718 | /* Assume that case vectors are not pc-relative. */ |
719 | #ifndef CASE_VECTOR_PC_RELATIVE | |
720 | #define CASE_VECTOR_PC_RELATIVE 0 | |
721 | #endif | |
722 | ||
d220de0e KH |
723 | /* Register mappings for target machines without register windows. */ |
724 | #ifndef INCOMING_REGNO | |
725 | #define INCOMING_REGNO(N) (N) | |
726 | #endif | |
727 | ||
728 | #ifndef OUTGOING_REGNO | |
729 | #define OUTGOING_REGNO(N) (N) | |
730 | #endif | |
731 | ||
bee07d3f KH |
732 | #ifndef SHIFT_COUNT_TRUNCATED |
733 | #define SHIFT_COUNT_TRUNCATED 0 | |
734 | #endif | |
735 | ||
3e759eda KH |
736 | #ifndef LEGITIMIZE_ADDRESS |
737 | #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) | |
738 | #endif | |
739 | ||
1f8551b2 KH |
740 | #ifndef REVERSIBLE_CC_MODE |
741 | #define REVERSIBLE_CC_MODE(MODE) 0 | |
742 | #endif | |
743 | ||
88657302 | 744 | #endif /* ! GCC_DEFAULTS_H */ |