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