1 /* Definitions of various defaults for tm.h macros. 2 Copyright (C) 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 2005, 2007, 2008, 2009, 2010 4 Free Software Foundation, Inc. 5 Contributed by Ron Guilmette (rfg (at) monkeys.com) 6 7 This file is part of GCC. 8 9 GCC is free software; you can redistribute it and/or modify it under 10 the terms of the GNU General Public License as published by the Free 11 Software Foundation; either version 3, or (at your option) any later 12 version. 13 14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 15 WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17 for more details. 18 19 Under Section 7 of GPL version 3, you are granted additional 20 permissions described in the GCC Runtime Library Exception, version 21 3.1, as published by the Free Software Foundation. 22 23 You should have received a copy of the GNU General Public License and 24 a copy of the GCC Runtime Library Exception along with this program; 25 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 26 <http://www.gnu.org/licenses/>. */ 27 28 #ifndef GCC_DEFAULTS_H 29 #define GCC_DEFAULTS_H 30 31 /* Store in OUTPUT a string (made with alloca) containing an 32 assembler-name for a local static variable or function named NAME. 33 LABELNO is an integer which is different for each call. */ 34 35 #ifndef ASM_PN_FORMAT 36 # ifndef NO_DOT_IN_LABEL 37 # define ASM_PN_FORMAT "%s.%lu" 38 # else 39 # ifndef NO_DOLLAR_IN_LABEL 40 # define ASM_PN_FORMAT "%s$%lu" 41 # else 42 # define ASM_PN_FORMAT "__%s_%lu" 43 # endif 44 # endif 45 #endif /* ! ASM_PN_FORMAT */ 46 47 #ifndef ASM_FORMAT_PRIVATE_NAME 48 # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ 49 do { const char *const name_ = (NAME); \ 50 char *const output_ = (OUTPUT) = \ 51 (char *) alloca (strlen (name_) + 32); \ 52 sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \ 53 } while (0) 54 #endif 55 56 /* Choose a reasonable default for ASM_OUTPUT_ASCII. */ 57 58 #ifndef ASM_OUTPUT_ASCII 59 #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ 60 do { \ 61 FILE *_hide_asm_out_file = (MYFILE); \ 62 const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \ 63 int _hide_thissize = (MYLENGTH); \ 64 { \ 65 FILE *asm_out_file = _hide_asm_out_file; \ 66 const unsigned char *p = _hide_p; \ 67 int thissize = _hide_thissize; \ 68 int i; \ 69 fprintf (asm_out_file, "\t.ascii \""); \ 70 \ 71 for (i = 0; i < thissize; i++) \ 72 { \ 73 int c = p[i]; \ 74 if (c == '\"' || c == '\\') \ 75 putc ('\\', asm_out_file); \ 76 if (ISPRINT(c)) \ 77 putc (c, asm_out_file); \ 78 else \ 79 { \ 80 fprintf (asm_out_file, "\\%o", c); \ 81 /* After an octal-escape, if a digit follows, \ 82 terminate one string constant and start another. \ 83 The VAX assembler fails to stop reading the escape \ 84 after three digits, so this is the only way we \ 85 can get it to parse the data properly. */ \ 86 if (i < thissize - 1 && ISDIGIT(p[i + 1])) \ 87 fprintf (asm_out_file, "\"\n\t.ascii \""); \ 88 } \ 89 } \ 90 fprintf (asm_out_file, "\"\n"); \ 91 } \ 92 } \ 93 while (0) 94 #endif 95 96 /* This is how we tell the assembler to equate two values. */ 97 #ifdef SET_ASM_OP 98 #ifndef ASM_OUTPUT_DEF 99 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ 100 do { fprintf ((FILE), "%s", SET_ASM_OP); \ 101 assemble_name (FILE, LABEL1); \ 102 fprintf (FILE, ","); \ 103 assemble_name (FILE, LABEL2); \ 104 fprintf (FILE, "\n"); \ 105 } while (0) 106 #endif 107 #endif 108 109 #ifndef IFUNC_ASM_TYPE 110 #define IFUNC_ASM_TYPE "gnu_indirect_function" 111 #endif 112 113 #ifndef TLS_COMMON_ASM_OP 114 #define TLS_COMMON_ASM_OP ".tls_common" 115 #endif 116 117 #if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON) 118 #define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \ 119 do \ 120 { \ 121 fprintf ((FILE), "\t%s\t", TLS_COMMON_ASM_OP); \ 122 assemble_name ((FILE), (NAME)); \ 123 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ 124 (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \ 125 } \ 126 while (0) 127 #endif 128 129 /* Decide whether to defer emitting the assembler output for an equate 130 of two values. The default is to not defer output. */ 131 #ifndef TARGET_DEFERRED_OUTPUT_DEFS 132 #define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false 133 #endif 134 135 /* This is how to output the definition of a user-level label named 136 NAME, such as the label on variable NAME. */ 137 138 #ifndef ASM_OUTPUT_LABEL 139 #define ASM_OUTPUT_LABEL(FILE,NAME) \ 140 do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0) 141 #endif 142 143 /* This is how to output the definition of a user-level label named 144 NAME, such as the label on a function. */ 145 146 #ifndef ASM_OUTPUT_FUNCTION_LABEL 147 #define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \ 148 ASM_OUTPUT_LABEL ((FILE), (NAME)) 149 #endif 150 151 /* Output the definition of a compiler-generated label named NAME. */ 152 #ifndef ASM_OUTPUT_INTERNAL_LABEL 153 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \ 154 do { \ 155 assemble_name_raw ((FILE), (NAME)); \ 156 fputs (":\n", (FILE)); \ 157 } while (0) 158 #endif 159 160 /* This is how to output a reference to a user-level label named NAME. */ 161 162 #ifndef ASM_OUTPUT_LABELREF 163 #define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME)) 164 #endif 165 166 /* Allow target to print debug info labels specially. This is useful for 167 VLIW targets, since debug info labels should go into the middle of 168 instruction bundles instead of breaking them. */ 169 170 #ifndef ASM_OUTPUT_DEBUG_LABEL 171 #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \ 172 (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM) 173 #endif 174 175 /* This is how we tell the assembler that a symbol is weak. */ 176 #ifndef ASM_OUTPUT_WEAK_ALIAS 177 #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF) 178 #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \ 179 do \ 180 { \ 181 ASM_WEAKEN_LABEL (STREAM, NAME); \ 182 if (VALUE) \ 183 ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \ 184 } \ 185 while (0) 186 #endif 187 #endif 188 189 /* This is how we tell the assembler that a symbol is a weak alias to 190 another symbol that doesn't require the other symbol to be defined. 191 Uses of the former will turn into weak uses of the latter, i.e., 192 uses that, in case the latter is undefined, will not cause errors, 193 and will add it to the symbol table as weak undefined. However, if 194 the latter is referenced directly, a strong reference prevails. */ 195 #ifndef ASM_OUTPUT_WEAKREF 196 #if defined HAVE_GAS_WEAKREF 197 #define ASM_OUTPUT_WEAKREF(FILE, DECL, NAME, VALUE) \ 198 do \ 199 { \ 200 fprintf ((FILE), "\t.weakref\t"); \ 201 assemble_name ((FILE), (NAME)); \ 202 fprintf ((FILE), ","); \ 203 assemble_name ((FILE), (VALUE)); \ 204 fprintf ((FILE), "\n"); \ 205 } \ 206 while (0) 207 #endif 208 #endif 209 210 /* How to emit a .type directive. */ 211 #ifndef ASM_OUTPUT_TYPE_DIRECTIVE 212 #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT 213 #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \ 214 do \ 215 { \ 216 fputs (TYPE_ASM_OP, STREAM); \ 217 assemble_name (STREAM, NAME); \ 218 fputs (", ", STREAM); \ 219 fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \ 220 putc ('\n', STREAM); \ 221 } \ 222 while (0) 223 #endif 224 #endif 225 226 /* How to emit a .size directive. */ 227 #ifndef ASM_OUTPUT_SIZE_DIRECTIVE 228 #ifdef SIZE_ASM_OP 229 #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \ 230 do \ 231 { \ 232 HOST_WIDE_INT size_ = (SIZE); \ 233 fputs (SIZE_ASM_OP, STREAM); \ 234 assemble_name (STREAM, NAME); \ 235 fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \ 236 } \ 237 while (0) 238 239 #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \ 240 do \ 241 { \ 242 fputs (SIZE_ASM_OP, STREAM); \ 243 assemble_name (STREAM, NAME); \ 244 fputs (", .-", STREAM); \ 245 assemble_name (STREAM, NAME); \ 246 putc ('\n', STREAM); \ 247 } \ 248 while (0) 249 250 #endif 251 #endif 252 253 /* This determines whether or not we support weak symbols. SUPPORTS_WEAK 254 must be a preprocessor constant. */ 255 #ifndef SUPPORTS_WEAK 256 #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL) 257 #define SUPPORTS_WEAK 1 258 #else 259 #define SUPPORTS_WEAK 0 260 #endif 261 #endif 262 263 /* This determines whether or not we support weak symbols during target 264 code generation. TARGET_SUPPORTS_WEAK can be any valid C expression. */ 265 #ifndef TARGET_SUPPORTS_WEAK 266 #define TARGET_SUPPORTS_WEAK (SUPPORTS_WEAK) 267 #endif 268 269 /* This determines whether or not we support the discriminator 270 attribute in the .loc directive. */ 271 #ifndef SUPPORTS_DISCRIMINATOR 272 #ifdef HAVE_GAS_DISCRIMINATOR 273 #define SUPPORTS_DISCRIMINATOR 1 274 #else 275 #define SUPPORTS_DISCRIMINATOR 0 276 #endif 277 #endif 278 279 /* This determines whether or not we support link-once semantics. */ 280 #ifndef SUPPORTS_ONE_ONLY 281 #ifdef MAKE_DECL_ONE_ONLY 282 #define SUPPORTS_ONE_ONLY 1 283 #else 284 #define SUPPORTS_ONE_ONLY 0 285 #endif 286 #endif 287 288 /* This determines whether weak symbols must be left out of a static 289 archive's table of contents. Defining this macro to be nonzero has 290 the consequence that certain symbols will not be made weak that 291 otherwise would be. The C++ ABI requires this macro to be zero; 292 see the documentation. */ 293 #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC 294 #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0 295 #endif 296 297 /* This determines whether or not we need linkonce unwind information. */ 298 #ifndef TARGET_USES_WEAK_UNWIND_INFO 299 #define TARGET_USES_WEAK_UNWIND_INFO 0 300 #endif 301 302 /* By default, there is no prefix on user-defined symbols. */ 303 #ifndef USER_LABEL_PREFIX 304 #define USER_LABEL_PREFIX "" 305 #endif 306 307 /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to 308 provide a weak attribute. Else define it to nothing. 309 310 This would normally belong in ansidecl.h, but SUPPORTS_WEAK is 311 not available at that time. 312 313 Note, this is only for use by target files which we know are to be 314 compiled by GCC. */ 315 #ifndef TARGET_ATTRIBUTE_WEAK 316 # if SUPPORTS_WEAK 317 # define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak)) 318 # else 319 # define TARGET_ATTRIBUTE_WEAK 320 # endif 321 #endif 322 323 /* Determines whether we may use common symbols to represent one-only 324 semantics (a.k.a. "vague linkage"). */ 325 #ifndef USE_COMMON_FOR_ONE_ONLY 326 # define USE_COMMON_FOR_ONE_ONLY 1 327 #endif 328 329 /* By default we can assume that all global symbols are in one namespace, 330 across all shared libraries. */ 331 #ifndef MULTIPLE_SYMBOL_SPACES 332 # define MULTIPLE_SYMBOL_SPACES 0 333 #endif 334 335 /* If the target supports init_priority C++ attribute, give 336 SUPPORTS_INIT_PRIORITY a nonzero value. */ 337 #ifndef SUPPORTS_INIT_PRIORITY 338 #define SUPPORTS_INIT_PRIORITY 1 339 #endif /* SUPPORTS_INIT_PRIORITY */ 340 341 /* If duplicate library search directories can be removed from a 342 linker command without changing the linker's semantics, give this 343 symbol a nonzero. */ 344 #ifndef LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 345 #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0 346 #endif /* LINK_ELIMINATE_DUPLICATE_LDIRECTORIES */ 347 348 /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that 349 the rest of the DWARF 2 frame unwind support is also provided. */ 350 #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX) 351 #define DWARF2_UNWIND_INFO 1 352 #endif 353 354 /* If we have named sections, and we're using crtstuff to run ctors, 355 use them for registering eh frame information. */ 356 #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \ 357 && !defined(EH_FRAME_IN_DATA_SECTION) 358 #ifndef EH_FRAME_SECTION_NAME 359 #define EH_FRAME_SECTION_NAME ".eh_frame" 360 #endif 361 #endif 362 363 /* On many systems, different EH table encodings are used under 364 difference circumstances. Some will require runtime relocations; 365 some will not. For those that do not require runtime relocations, 366 we would like to make the table read-only. However, since the 367 read-only tables may need to be combined with read-write tables 368 that do require runtime relocation, it is not safe to make the 369 tables read-only unless the linker will merge read-only and 370 read-write sections into a single read-write section. If your 371 linker does not have this ability, but your system is such that no 372 encoding used with non-PIC code will ever require a runtime 373 relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in 374 your target configuration file. */ 375 #ifndef EH_TABLES_CAN_BE_READ_ONLY 376 #ifdef HAVE_LD_RO_RW_SECTION_MIXING 377 #define EH_TABLES_CAN_BE_READ_ONLY 1 378 #else 379 #define EH_TABLES_CAN_BE_READ_ONLY 0 380 #endif 381 #endif 382 383 /* If we have named section and we support weak symbols, then use the 384 .jcr section for recording java classes which need to be registered 385 at program start-up time. */ 386 #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK 387 #ifndef JCR_SECTION_NAME 388 #define JCR_SECTION_NAME ".jcr" 389 #endif 390 #endif 391 392 /* This decision to use a .jcr section can be overridden by defining 393 USE_JCR_SECTION to 0 in target file. This is necessary if target 394 can define JCR_SECTION_NAME but does not have crtstuff or 395 linker support for .jcr section. */ 396 #ifndef TARGET_USE_JCR_SECTION 397 #ifdef JCR_SECTION_NAME 398 #define TARGET_USE_JCR_SECTION 1 399 #else 400 #define TARGET_USE_JCR_SECTION 0 401 #endif 402 #endif 403 404 /* Number of hardware registers that go into the DWARF-2 unwind info. 405 If not defined, equals FIRST_PSEUDO_REGISTER */ 406 407 #ifndef DWARF_FRAME_REGISTERS 408 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER 409 #endif 410 411 /* How to renumber registers for dbx and gdb. If not defined, assume 412 no renumbering is necessary. */ 413 414 #ifndef DBX_REGISTER_NUMBER 415 #define DBX_REGISTER_NUMBER(REGNO) (REGNO) 416 #endif 417 418 /* Default sizes for base C types. If the sizes are different for 419 your target, you should override these values by defining the 420 appropriate symbols in your tm.h file. */ 421 422 #ifndef BITS_PER_UNIT 423 #define BITS_PER_UNIT 8 424 #endif 425 426 #ifndef BITS_PER_WORD 427 #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD) 428 #endif 429 430 #ifndef CHAR_TYPE_SIZE 431 #define CHAR_TYPE_SIZE BITS_PER_UNIT 432 #endif 433 434 #ifndef BOOL_TYPE_SIZE 435 /* `bool' has size and alignment `1', on almost all platforms. */ 436 #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE 437 #endif 438 439 #ifndef SHORT_TYPE_SIZE 440 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2)) 441 #endif 442 443 #ifndef INT_TYPE_SIZE 444 #define INT_TYPE_SIZE BITS_PER_WORD 445 #endif 446 447 #ifndef LONG_TYPE_SIZE 448 #define LONG_TYPE_SIZE BITS_PER_WORD 449 #endif 450 451 #ifndef LONG_LONG_TYPE_SIZE 452 #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2) 453 #endif 454 455 #ifndef WCHAR_TYPE_SIZE 456 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE 457 #endif 458 459 #ifndef FLOAT_TYPE_SIZE 460 #define FLOAT_TYPE_SIZE BITS_PER_WORD 461 #endif 462 463 #ifndef DOUBLE_TYPE_SIZE 464 #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) 465 #endif 466 467 #ifndef LONG_DOUBLE_TYPE_SIZE 468 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) 469 #endif 470 471 #ifndef DECIMAL32_TYPE_SIZE 472 #define DECIMAL32_TYPE_SIZE 32 473 #endif 474 475 #ifndef DECIMAL64_TYPE_SIZE 476 #define DECIMAL64_TYPE_SIZE 64 477 #endif 478 479 #ifndef DECIMAL128_TYPE_SIZE 480 #define DECIMAL128_TYPE_SIZE 128 481 #endif 482 483 #ifndef SHORT_FRACT_TYPE_SIZE 484 #define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT 485 #endif 486 487 #ifndef FRACT_TYPE_SIZE 488 #define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2) 489 #endif 490 491 #ifndef LONG_FRACT_TYPE_SIZE 492 #define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4) 493 #endif 494 495 #ifndef LONG_LONG_FRACT_TYPE_SIZE 496 #define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8) 497 #endif 498 499 #ifndef SHORT_ACCUM_TYPE_SIZE 500 #define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2) 501 #endif 502 503 #ifndef ACCUM_TYPE_SIZE 504 #define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2) 505 #endif 506 507 #ifndef LONG_ACCUM_TYPE_SIZE 508 #define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2) 509 #endif 510 511 #ifndef LONG_LONG_ACCUM_TYPE_SIZE 512 #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2) 513 #endif 514 515 /* We let tm.h override the types used here, to handle trivial differences 516 such as the choice of unsigned int or long unsigned int for size_t. 517 When machines start needing nontrivial differences in the size type, 518 it would be best to do something here to figure out automatically 519 from other information what type to use. */ 520 521 #ifndef SIZE_TYPE 522 #define SIZE_TYPE "long unsigned int" 523 #endif 524 525 #ifndef PID_TYPE 526 #define PID_TYPE "int" 527 #endif 528 529 /* If GCC knows the exact uint_least16_t and uint_least32_t types from 530 <stdint.h>, use them for char16_t and char32_t. Otherwise, use 531 these guesses; getting the wrong type of a given width will not 532 affect C++ name mangling because in C++ these are distinct types 533 not typedefs. */ 534 535 #ifdef UINT_LEAST16_TYPE 536 #define CHAR16_TYPE UINT_LEAST16_TYPE 537 #else 538 #define CHAR16_TYPE "short unsigned int" 539 #endif 540 541 #ifdef UINT_LEAST32_TYPE 542 #define CHAR32_TYPE UINT_LEAST32_TYPE 543 #else 544 #define CHAR32_TYPE "unsigned int" 545 #endif 546 547 #ifndef WCHAR_TYPE 548 #define WCHAR_TYPE "int" 549 #endif 550 551 /* WCHAR_TYPE gets overridden by -fshort-wchar. */ 552 #define MODIFIED_WCHAR_TYPE \ 553 (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE) 554 555 #ifndef PTRDIFF_TYPE 556 #define PTRDIFF_TYPE "long int" 557 #endif 558 559 #ifndef WINT_TYPE 560 #define WINT_TYPE "unsigned int" 561 #endif 562 563 #ifndef INTMAX_TYPE 564 #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ 565 ? "int" \ 566 : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ 567 ? "long int" \ 568 : "long long int")) 569 #endif 570 571 #ifndef UINTMAX_TYPE 572 #define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ 573 ? "unsigned int" \ 574 : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ 575 ? "long unsigned int" \ 576 : "long long unsigned int")) 577 #endif 578 579 580 /* There are no default definitions of these <stdint.h> types. */ 581 582 #ifndef SIG_ATOMIC_TYPE 583 #define SIG_ATOMIC_TYPE ((const char *) NULL) 584 #endif 585 586 #ifndef INT8_TYPE 587 #define INT8_TYPE ((const char *) NULL) 588 #endif 589 590 #ifndef INT16_TYPE 591 #define INT16_TYPE ((const char *) NULL) 592 #endif 593 594 #ifndef INT32_TYPE 595 #define INT32_TYPE ((const char *) NULL) 596 #endif 597 598 #ifndef INT64_TYPE 599 #define INT64_TYPE ((const char *) NULL) 600 #endif 601 602 #ifndef UINT8_TYPE 603 #define UINT8_TYPE ((const char *) NULL) 604 #endif 605 606 #ifndef UINT16_TYPE 607 #define UINT16_TYPE ((const char *) NULL) 608 #endif 609 610 #ifndef UINT32_TYPE 611 #define UINT32_TYPE ((const char *) NULL) 612 #endif 613 614 #ifndef UINT64_TYPE 615 #define UINT64_TYPE ((const char *) NULL) 616 #endif 617 618 #ifndef INT_LEAST8_TYPE 619 #define INT_LEAST8_TYPE ((const char *) NULL) 620 #endif 621 622 #ifndef INT_LEAST16_TYPE 623 #define INT_LEAST16_TYPE ((const char *) NULL) 624 #endif 625 626 #ifndef INT_LEAST32_TYPE 627 #define INT_LEAST32_TYPE ((const char *) NULL) 628 #endif 629 630 #ifndef INT_LEAST64_TYPE 631 #define INT_LEAST64_TYPE ((const char *) NULL) 632 #endif 633 634 #ifndef UINT_LEAST8_TYPE 635 #define UINT_LEAST8_TYPE ((const char *) NULL) 636 #endif 637 638 #ifndef UINT_LEAST16_TYPE 639 #define UINT_LEAST16_TYPE ((const char *) NULL) 640 #endif 641 642 #ifndef UINT_LEAST32_TYPE 643 #define UINT_LEAST32_TYPE ((const char *) NULL) 644 #endif 645 646 #ifndef UINT_LEAST64_TYPE 647 #define UINT_LEAST64_TYPE ((const char *) NULL) 648 #endif 649 650 #ifndef INT_FAST8_TYPE 651 #define INT_FAST8_TYPE ((const char *) NULL) 652 #endif 653 654 #ifndef INT_FAST16_TYPE 655 #define INT_FAST16_TYPE ((const char *) NULL) 656 #endif 657 658 #ifndef INT_FAST32_TYPE 659 #define INT_FAST32_TYPE ((const char *) NULL) 660 #endif 661 662 #ifndef INT_FAST64_TYPE 663 #define INT_FAST64_TYPE ((const char *) NULL) 664 #endif 665 666 #ifndef UINT_FAST8_TYPE 667 #define UINT_FAST8_TYPE ((const char *) NULL) 668 #endif 669 670 #ifndef UINT_FAST16_TYPE 671 #define UINT_FAST16_TYPE ((const char *) NULL) 672 #endif 673 674 #ifndef UINT_FAST32_TYPE 675 #define UINT_FAST32_TYPE ((const char *) NULL) 676 #endif 677 678 #ifndef UINT_FAST64_TYPE 679 #define UINT_FAST64_TYPE ((const char *) NULL) 680 #endif 681 682 #ifndef INTPTR_TYPE 683 #define INTPTR_TYPE ((const char *) NULL) 684 #endif 685 686 #ifndef UINTPTR_TYPE 687 #define UINTPTR_TYPE ((const char *) NULL) 688 #endif 689 690 /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */ 691 #ifndef POINTER_SIZE 692 #define POINTER_SIZE BITS_PER_WORD 693 #endif 694 695 #ifndef PIC_OFFSET_TABLE_REGNUM 696 #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM 697 #endif 698 699 #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 700 #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0 701 #endif 702 703 #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES 704 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0 705 #endif 706 707 #ifndef TARGET_DECLSPEC 708 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES 709 /* If the target supports the "dllimport" attribute, users are 710 probably used to the "__declspec" syntax. */ 711 #define TARGET_DECLSPEC 1 712 #else 713 #define TARGET_DECLSPEC 0 714 #endif 715 #endif 716 717 /* By default, the preprocessor should be invoked the same way in C++ 718 as in C. */ 719 #ifndef CPLUSPLUS_CPP_SPEC 720 #ifdef CPP_SPEC 721 #define CPLUSPLUS_CPP_SPEC CPP_SPEC 722 #endif 723 #endif 724 725 #ifndef ACCUMULATE_OUTGOING_ARGS 726 #define ACCUMULATE_OUTGOING_ARGS 0 727 #endif 728 729 /* Supply a default definition for PUSH_ARGS. */ 730 #ifndef PUSH_ARGS 731 #ifdef PUSH_ROUNDING 732 #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS 733 #else 734 #define PUSH_ARGS 0 735 #endif 736 #endif 737 738 /* Decide whether a function's arguments should be processed 739 from first to last or from last to first. 740 741 They should if the stack and args grow in opposite directions, but 742 only if we have push insns. */ 743 744 #ifdef PUSH_ROUNDING 745 746 #ifndef PUSH_ARGS_REVERSED 747 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD) 748 #define PUSH_ARGS_REVERSED PUSH_ARGS 749 #endif 750 #endif 751 752 #endif 753 754 #ifndef PUSH_ARGS_REVERSED 755 #define PUSH_ARGS_REVERSED 0 756 #endif 757 758 /* Default value for the alignment (in bits) a C conformant malloc has to 759 provide. This default is intended to be safe and always correct. */ 760 #ifndef MALLOC_ABI_ALIGNMENT 761 #define MALLOC_ABI_ALIGNMENT BITS_PER_WORD 762 #endif 763 764 /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY. 765 STACK_BOUNDARY is required. */ 766 #ifndef PREFERRED_STACK_BOUNDARY 767 #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY 768 #endif 769 770 /* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not 771 defined. */ 772 #ifndef INCOMING_STACK_BOUNDARY 773 #define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY 774 #endif 775 776 #ifndef TARGET_DEFAULT_PACK_STRUCT 777 #define TARGET_DEFAULT_PACK_STRUCT 0 778 #endif 779 780 /* By default, the vtable entries are void pointers, the so the alignment 781 is the same as pointer alignment. The value of this macro specifies 782 the alignment of the vtable entry in bits. It should be defined only 783 when special alignment is necessary. */ 784 #ifndef TARGET_VTABLE_ENTRY_ALIGN 785 #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE 786 #endif 787 788 /* There are a few non-descriptor entries in the vtable at offsets below 789 zero. If these entries must be padded (say, to preserve the alignment 790 specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of 791 words in each data entry. */ 792 #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE 793 #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1 794 #endif 795 796 /* Decide whether it is safe to use a local alias for a virtual function 797 when constructing thunks. */ 798 #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P 799 #ifdef ASM_OUTPUT_DEF 800 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1 801 #else 802 #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0 803 #endif 804 #endif 805 806 /* Select a format to encode pointers in exception handling data. We 807 prefer those that result in fewer dynamic relocations. Assume no 808 special support here and encode direct references. */ 809 #ifndef ASM_PREFERRED_EH_DATA_FORMAT 810 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr 811 #endif 812 813 /* By default, the C++ compiler will use the lowest bit of the pointer 814 to function to indicate a pointer-to-member-function points to a 815 virtual member function. However, if FUNCTION_BOUNDARY indicates 816 function addresses aren't always even, the lowest bit of the delta 817 field will be used. */ 818 #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION 819 #define TARGET_PTRMEMFUNC_VBIT_LOCATION \ 820 (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \ 821 ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta) 822 #endif 823 824 #ifndef DEFAULT_GDB_EXTENSIONS 825 #define DEFAULT_GDB_EXTENSIONS 1 826 #endif 827 828 /* If more than one debugging type is supported, you must define 829 PREFERRED_DEBUGGING_TYPE to choose the default. */ 830 831 #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \ 832 + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \ 833 + defined (VMS_DEBUGGING_INFO)) 834 #ifndef PREFERRED_DEBUGGING_TYPE 835 #error You must define PREFERRED_DEBUGGING_TYPE 836 #endif /* no PREFERRED_DEBUGGING_TYPE */ 837 838 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE 839 here so other code needn't care. */ 840 #elif defined DBX_DEBUGGING_INFO 841 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG 842 843 #elif defined SDB_DEBUGGING_INFO 844 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG 845 846 #elif defined DWARF2_DEBUGGING_INFO 847 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG 848 849 #elif defined VMS_DEBUGGING_INFO 850 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG 851 852 #elif defined XCOFF_DEBUGGING_INFO 853 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG 854 855 #else 856 /* No debugging format is supported by this target. */ 857 #define PREFERRED_DEBUGGING_TYPE NO_DEBUG 858 #endif 859 860 #ifndef LARGEST_EXPONENT_IS_NORMAL 861 #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0 862 #endif 863 864 #ifndef ROUND_TOWARDS_ZERO 865 #define ROUND_TOWARDS_ZERO 0 866 #endif 867 868 #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL 869 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false 870 #endif 871 872 /* True if the targets integer-comparison functions return { 0, 1, 2 873 } to indicate { <, ==, > }. False if { -1, 0, 1 } is used 874 instead. The libgcc routines are biased. */ 875 #ifndef TARGET_LIB_INT_CMP_BIASED 876 #define TARGET_LIB_INT_CMP_BIASED (true) 877 #endif 878 879 /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files, 880 then the word-endianness is the same as for integers. */ 881 #ifndef FLOAT_WORDS_BIG_ENDIAN 882 #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN 883 #endif 884 885 #ifdef TARGET_FLT_EVAL_METHOD 886 #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 1 887 #else 888 #define TARGET_FLT_EVAL_METHOD 0 889 #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 0 890 #endif 891 892 #ifndef TARGET_DEC_EVAL_METHOD 893 #define TARGET_DEC_EVAL_METHOD 2 894 #endif 895 896 #ifndef HAS_LONG_COND_BRANCH 897 #define HAS_LONG_COND_BRANCH 0 898 #endif 899 900 #ifndef HAS_LONG_UNCOND_BRANCH 901 #define HAS_LONG_UNCOND_BRANCH 0 902 #endif 903 904 /* Determine whether __cxa_atexit, rather than atexit, is used to 905 register C++ destructors for local statics and global objects. */ 906 #ifndef DEFAULT_USE_CXA_ATEXIT 907 #define DEFAULT_USE_CXA_ATEXIT 0 908 #endif 909 910 /* If none of these macros are defined, the port must use the new 911 technique of defining constraints in the machine description. 912 tm_p.h will define those macros that machine-independent code 913 still uses. */ 914 #if !defined CONSTRAINT_LEN \ 915 && !defined REG_CLASS_FROM_LETTER \ 916 && !defined REG_CLASS_FROM_CONSTRAINT \ 917 && !defined CONST_OK_FOR_LETTER_P \ 918 && !defined CONST_OK_FOR_CONSTRAINT_P \ 919 && !defined CONST_DOUBLE_OK_FOR_LETTER_P \ 920 && !defined CONST_DOUBLE_OK_FOR_CONSTRAINT_P \ 921 && !defined EXTRA_CONSTRAINT \ 922 && !defined EXTRA_CONSTRAINT_STR \ 923 && !defined EXTRA_MEMORY_CONSTRAINT \ 924 && !defined EXTRA_ADDRESS_CONSTRAINT 925 926 #define USE_MD_CONSTRAINTS 927 928 #if GCC_VERSION >= 3000 && defined IN_GCC 929 /* These old constraint macros shouldn't appear anywhere in a 930 configuration using MD constraint definitions. */ 931 #pragma GCC poison REG_CLASS_FROM_LETTER CONST_OK_FOR_LETTER_P \ 932 CONST_DOUBLE_OK_FOR_LETTER_P EXTRA_CONSTRAINT 933 #endif 934 935 #else /* old constraint mechanism in use */ 936 937 /* Determine whether extra constraint letter should be handled 938 via address reload (like 'o'). */ 939 #ifndef EXTRA_MEMORY_CONSTRAINT 940 #define EXTRA_MEMORY_CONSTRAINT(C,STR) 0 941 #endif 942 943 /* Determine whether extra constraint letter should be handled 944 as an address (like 'p'). */ 945 #ifndef EXTRA_ADDRESS_CONSTRAINT 946 #define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0 947 #endif 948 949 /* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN 950 for all the characters that it does not want to change, so things like the 951 'length' of a digit in a matching constraint is an implementation detail, 952 and not part of the interface. */ 953 #define DEFAULT_CONSTRAINT_LEN(C,STR) 1 954 955 #ifndef CONSTRAINT_LEN 956 #define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR) 957 #endif 958 959 #if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P) 960 #define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C) 961 #endif 962 963 #if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P) 964 #define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \ 965 CONST_DOUBLE_OK_FOR_LETTER_P (OP, C) 966 #endif 967 968 #ifndef REG_CLASS_FROM_CONSTRAINT 969 #define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C) 970 #endif 971 972 #if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR) 973 #define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C) 974 #endif 975 976 #endif /* old constraint mechanism in use */ 977 978 /* Determine whether the entire c99 runtime 979 is present in the runtime library. */ 980 #ifndef TARGET_C99_FUNCTIONS 981 #define TARGET_C99_FUNCTIONS 0 982 #endif 983 984 /* Determine whether the target runtime library has 985 a sincos implementation following the GNU extension. */ 986 #ifndef TARGET_HAS_SINCOS 987 #define TARGET_HAS_SINCOS 0 988 #endif 989 990 /* Indicate that CLZ and CTZ are undefined at zero. */ 991 #ifndef CLZ_DEFINED_VALUE_AT_ZERO 992 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0 993 #endif 994 #ifndef CTZ_DEFINED_VALUE_AT_ZERO 995 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0 996 #endif 997 998 /* Provide a default value for STORE_FLAG_VALUE. */ 999 #ifndef STORE_FLAG_VALUE 1000 #define STORE_FLAG_VALUE 1 1001 #endif 1002 1003 /* This macro is used to determine what the largest unit size that 1004 move_by_pieces can use is. */ 1005 1006 /* MOVE_MAX_PIECES is the number of bytes at a time which we can 1007 move efficiently, as opposed to MOVE_MAX which is the maximum 1008 number of bytes we can move with a single instruction. */ 1009 1010 #ifndef MOVE_MAX_PIECES 1011 #define MOVE_MAX_PIECES MOVE_MAX 1012 #endif 1013 1014 #ifndef MAX_MOVE_MAX 1015 #define MAX_MOVE_MAX MOVE_MAX 1016 #endif 1017 1018 #ifndef MIN_UNITS_PER_WORD 1019 #define MIN_UNITS_PER_WORD UNITS_PER_WORD 1020 #endif 1021 1022 #ifndef MAX_BITS_PER_WORD 1023 #define MAX_BITS_PER_WORD BITS_PER_WORD 1024 #endif 1025 1026 #ifndef STACK_POINTER_OFFSET 1027 #define STACK_POINTER_OFFSET 0 1028 #endif 1029 1030 #ifndef LOCAL_REGNO 1031 #define LOCAL_REGNO(REGNO) 0 1032 #endif 1033 1034 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, 1035 the stack pointer does not matter. The value is tested only in 1036 functions that have frame pointers. */ 1037 #ifndef EXIT_IGNORE_STACK 1038 #define EXIT_IGNORE_STACK 0 1039 #endif 1040 1041 /* Assume that case vectors are not pc-relative. */ 1042 #ifndef CASE_VECTOR_PC_RELATIVE 1043 #define CASE_VECTOR_PC_RELATIVE 0 1044 #endif 1045 1046 /* Assume that trampolines need function alignment. */ 1047 #ifndef TRAMPOLINE_ALIGNMENT 1048 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY 1049 #endif 1050 1051 /* Register mappings for target machines without register windows. */ 1052 #ifndef INCOMING_REGNO 1053 #define INCOMING_REGNO(N) (N) 1054 #endif 1055 1056 #ifndef OUTGOING_REGNO 1057 #define OUTGOING_REGNO(N) (N) 1058 #endif 1059 1060 #ifndef SHIFT_COUNT_TRUNCATED 1061 #define SHIFT_COUNT_TRUNCATED 0 1062 #endif 1063 1064 #ifndef LEGITIMATE_PIC_OPERAND_P 1065 #define LEGITIMATE_PIC_OPERAND_P(X) 1 1066 #endif 1067 1068 #ifndef TARGET_MEM_CONSTRAINT 1069 #define TARGET_MEM_CONSTRAINT 'm' 1070 #endif 1071 1072 #ifndef REVERSIBLE_CC_MODE 1073 #define REVERSIBLE_CC_MODE(MODE) 0 1074 #endif 1075 1076 /* Biggest alignment supported by the object file format of this machine. */ 1077 #ifndef MAX_OFILE_ALIGNMENT 1078 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT 1079 #endif 1080 1081 #ifndef FRAME_GROWS_DOWNWARD 1082 #define FRAME_GROWS_DOWNWARD 0 1083 #endif 1084 1085 /* On most machines, the CFA coincides with the first incoming parm. */ 1086 #ifndef ARG_POINTER_CFA_OFFSET 1087 #define ARG_POINTER_CFA_OFFSET(FNDECL) \ 1088 (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size) 1089 #endif 1090 1091 /* On most machines, we use the CFA as DW_AT_frame_base. */ 1092 #ifndef CFA_FRAME_BASE_OFFSET 1093 #define CFA_FRAME_BASE_OFFSET(FNDECL) 0 1094 #endif 1095 1096 /* The offset from the incoming value of %sp to the top of the stack frame 1097 for the current function. */ 1098 #ifndef INCOMING_FRAME_SP_OFFSET 1099 #define INCOMING_FRAME_SP_OFFSET 0 1100 #endif 1101 1102 #ifndef HARD_REGNO_NREGS_HAS_PADDING 1103 #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0 1104 #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1 1105 #endif 1106 1107 #ifndef OUTGOING_REG_PARM_STACK_SPACE 1108 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0 1109 #endif 1110 1111 /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by 1112 the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best 1113 effort stack alignment supported by the backend. If the backend 1114 supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and 1115 MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack 1116 boundary will limit the maximum guaranteed stack alignment. */ 1117 #ifdef MAX_STACK_ALIGNMENT 1118 #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT 1119 #else 1120 #define MAX_STACK_ALIGNMENT STACK_BOUNDARY 1121 #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY 1122 #endif 1123 1124 #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY) 1125 1126 #ifndef LOCAL_ALIGNMENT 1127 #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT 1128 #endif 1129 1130 #ifndef STACK_SLOT_ALIGNMENT 1131 #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \ 1132 ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN)) 1133 #endif 1134 1135 #ifndef LOCAL_DECL_ALIGNMENT 1136 #define LOCAL_DECL_ALIGNMENT(DECL) \ 1137 LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL)) 1138 #endif 1139 1140 #ifndef MINIMUM_ALIGNMENT 1141 #define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN) 1142 #endif 1143 1144 /* Alignment value for attribute ((aligned)). */ 1145 #ifndef ATTRIBUTE_ALIGNED_VALUE 1146 #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT 1147 #endif 1148 1149 /* Many ports have no mode-dependent addresses (except possibly autoincrement 1150 and autodecrement addresses, which are handled by target-independent code 1151 in recog.c). */ 1152 #ifndef GO_IF_MODE_DEPENDENT_ADDRESS 1153 #define GO_IF_MODE_DEPENDENT_ADDRESS(X, WIN) 1154 #endif 1155 1156 /* For most ports anything that evaluates to a constant symbolic 1157 or integer value is acceptable as a constant address. */ 1158 #ifndef CONSTANT_ADDRESS_P 1159 #define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE) 1160 #endif 1161 1162 #ifndef MAX_FIXED_MODE_SIZE 1163 #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode) 1164 #endif 1165 1166 /* Nonzero if structures and unions should be returned in memory. 1167 1168 This should only be defined if compatibility with another compiler or 1169 with an ABI is needed, because it results in slower code. */ 1170 1171 #ifndef DEFAULT_PCC_STRUCT_RETURN 1172 #define DEFAULT_PCC_STRUCT_RETURN 1 1173 #endif 1174 1175 #ifdef GCC_INSN_FLAGS_H 1176 /* Dependent default target macro definitions 1177 1178 This section of defaults.h defines target macros that depend on generated 1179 headers. This is a bit awkward: We want to put all default definitions 1180 for target macros in defaults.h, but some of the defaults depend on the 1181 HAVE_* flags defines of insn-flags.h. But insn-flags.h is not always 1182 included by files that do include defaults.h. 1183 1184 Fortunately, the default macro definitions that depend on the HAVE_* 1185 macros are also the ones that will only be used inside GCC itself, i.e. 1186 not in the gen* programs or in target objects like libgcc. 1187 1188 Obviously, it would be best to keep this section of defaults.h as small 1189 as possible, by converting the macros defined below to target hooks or 1190 functions. 1191 */ 1192 1193 /* The default branch cost is 1. */ 1194 #ifndef BRANCH_COST 1195 #define BRANCH_COST(speed_p, predictable_p) 1 1196 #endif 1197 1198 /* If a memory-to-memory move would take MOVE_RATIO or more simple 1199 move-instruction sequences, we will do a movmem or libcall instead. */ 1200 1201 #ifndef MOVE_RATIO 1202 #if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti) 1203 #define MOVE_RATIO(speed) 2 1204 #else 1205 /* If we are optimizing for space (-Os), cut down the default move ratio. */ 1206 #define MOVE_RATIO(speed) ((speed) ? 15 : 3) 1207 #endif 1208 #endif 1209 1210 /* If a clear memory operation would take CLEAR_RATIO or more simple 1211 move-instruction sequences, we will do a setmem or libcall instead. */ 1212 1213 #ifndef CLEAR_RATIO 1214 #if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti) 1215 #define CLEAR_RATIO(speed) 2 1216 #else 1217 /* If we are optimizing for space, cut down the default clear ratio. */ 1218 #define CLEAR_RATIO(speed) ((speed) ? 15 :3) 1219 #endif 1220 #endif 1221 1222 /* If a memory set (to value other than zero) operation would take 1223 SET_RATIO or more simple move-instruction sequences, we will do a movmem 1224 or libcall instead. */ 1225 #ifndef SET_RATIO 1226 #define SET_RATIO(speed) MOVE_RATIO(speed) 1227 #endif 1228 1229 /* Supply a default definition for FUNCTION_ARG_PADDING: 1230 usually pad upward, but pad short args downward on 1231 big-endian machines. */ 1232 1233 #define DEFAULT_FUNCTION_ARG_PADDING(MODE, TYPE) \ 1234 (! BYTES_BIG_ENDIAN \ 1235 ? upward \ 1236 : (((MODE) == BLKmode \ 1237 ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ 1238 && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \ 1239 : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ 1240 ? downward : upward)) 1241 1242 #ifndef FUNCTION_ARG_PADDING 1243 #define FUNCTION_ARG_PADDING(MODE, TYPE) \ 1244 DEFAULT_FUNCTION_ARG_PADDING ((MODE), (TYPE)) 1245 #endif 1246 1247 /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save. 1248 Normally move_insn, so Pmode stack pointer. */ 1249 1250 #ifndef STACK_SAVEAREA_MODE 1251 #define STACK_SAVEAREA_MODE(LEVEL) Pmode 1252 #endif 1253 1254 /* Supply a default definition of STACK_SIZE_MODE for 1255 allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */ 1256 1257 #ifndef STACK_SIZE_MODE 1258 #define STACK_SIZE_MODE word_mode 1259 #endif 1260 1261 /* Provide default values for the macros controlling stack checking. */ 1262 1263 /* The default is neither full builtin stack checking... */ 1264 #ifndef STACK_CHECK_BUILTIN 1265 #define STACK_CHECK_BUILTIN 0 1266 #endif 1267 1268 /* ...nor static builtin stack checking. */ 1269 #ifndef STACK_CHECK_STATIC_BUILTIN 1270 #define STACK_CHECK_STATIC_BUILTIN 0 1271 #endif 1272 1273 /* The default interval is one page (4096 bytes). */ 1274 #ifndef STACK_CHECK_PROBE_INTERVAL_EXP 1275 #define STACK_CHECK_PROBE_INTERVAL_EXP 12 1276 #endif 1277 1278 /* The default is not to move the stack pointer. */ 1279 #ifndef STACK_CHECK_MOVING_SP 1280 #define STACK_CHECK_MOVING_SP 0 1281 #endif 1282 1283 /* This is a kludge to try to capture the discrepancy between the old 1284 mechanism (generic stack checking) and the new mechanism (static 1285 builtin stack checking). STACK_CHECK_PROTECT needs to be bumped 1286 for the latter because part of the protection area is effectively 1287 included in STACK_CHECK_MAX_FRAME_SIZE for the former. */ 1288 #ifdef STACK_CHECK_PROTECT 1289 #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT 1290 #else 1291 #define STACK_OLD_CHECK_PROTECT \ 1292 (targetm.except_unwind_info (&global_options) == UI_SJLJ \ 1293 ? 75 * UNITS_PER_WORD \ 1294 : 8 * 1024) 1295 #endif 1296 1297 /* Minimum amount of stack required to recover from an anticipated stack 1298 overflow detection. The default value conveys an estimate of the amount 1299 of stack required to propagate an exception. */ 1300 #ifndef STACK_CHECK_PROTECT 1301 #define STACK_CHECK_PROTECT \ 1302 (targetm.except_unwind_info (&global_options) == UI_SJLJ \ 1303 ? 75 * UNITS_PER_WORD \ 1304 : 12 * 1024) 1305 #endif 1306 1307 /* Make the maximum frame size be the largest we can and still only need 1308 one probe per function. */ 1309 #ifndef STACK_CHECK_MAX_FRAME_SIZE 1310 #define STACK_CHECK_MAX_FRAME_SIZE \ 1311 ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD) 1312 #endif 1313 1314 /* This is arbitrary, but should be large enough everywhere. */ 1315 #ifndef STACK_CHECK_FIXED_FRAME_SIZE 1316 #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD) 1317 #endif 1318 1319 /* Provide a reasonable default for the maximum size of an object to 1320 allocate in the fixed frame. We may need to be able to make this 1321 controllable by the user at some point. */ 1322 #ifndef STACK_CHECK_MAX_VAR_SIZE 1323 #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100) 1324 #endif 1325 1326 /* By default, the C++ compiler will use function addresses in the 1327 vtable entries. Setting this nonzero tells the compiler to use 1328 function descriptors instead. The value of this macro says how 1329 many words wide the descriptor is (normally 2). It is assumed 1330 that the address of a function descriptor may be treated as a 1331 pointer to a function. */ 1332 #ifndef TARGET_VTABLE_USES_DESCRIPTORS 1333 #define TARGET_VTABLE_USES_DESCRIPTORS 0 1334 #endif 1335 1336 #ifndef SWITCHABLE_TARGET 1337 #define SWITCHABLE_TARGET 0 1338 #endif 1339 1340 #endif /* GCC_INSN_FLAGS_H */ 1341 1342 #endif /* ! GCC_DEFAULTS_H */ 1343