|
|
1.1.1.4 ! root 1: This is Info file gcc.info, produced by Makeinfo-1.49 from the input 1.1 root 2: file gcc.texi. 3: 4: This file documents the use and the internals of the GNU compiler. 5: 6: Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc. 7: 1.1.1.3 root 8: Permission is granted to make and distribute verbatim copies of this 9: manual provided the copyright notice and this permission notice are 10: preserved on all copies. 1.1 root 11: 12: Permission is granted to copy and distribute modified versions of 13: this manual under the conditions for verbatim copying, provided also 1.1.1.4 ! root 14: that the sections entitled "GNU General Public License" and "Protect ! 15: Your Freedom--Fight `Look And Feel'" are included exactly as in the ! 16: original, and provided that the entire resulting derived work is ! 17: distributed under the terms of a permission notice identical to this ! 18: one. 1.1 root 19: 20: Permission is granted to copy and distribute translations of this 21: manual into another language, under the above conditions for modified 1.1.1.3 root 22: versions, except that the sections entitled "GNU General Public 1.1.1.4 ! root 23: License" and "Protect Your Freedom--Fight `Look And Feel'", and this ! 24: permission notice, may be included in translations approved by the Free ! 25: Software Foundation instead of in the original English. 1.1 root 26: 27: 1.1.1.4 ! root 28: File: gcc.info, Node: Driver, Next: Run-time Target, Up: Target Macros 1.1.1.2 root 29: 1.1.1.4 ! root 30: Controlling the Compilation Driver, `gcc' ! 31: ========================================= 1.1.1.3 root 32: 1.1.1.4 ! root 33: `SWITCH_TAKES_ARG (CHAR)' ! 34: A C expression which determines whether the option `-CHAR' takes ! 35: arguments. The value should be the number of arguments that ! 36: option takes--zero, for many options. 1.1.1.3 root 37: 1.1.1.4 ! root 38: By default, this macro is defined to handle the standard options ! 39: properly. You need not define it unless you wish to add additional ! 40: options which take arguments. 1.1.1.3 root 41: 1.1.1.4 ! root 42: `WORD_SWITCH_TAKES_ARG (NAME)' ! 43: A C expression which determines whether the option `-NAME' takes ! 44: arguments. The value should be the number of arguments that ! 45: option takes--zero, for many options. This macro rather than ! 46: `SWITCH_TAKES_ARG' is used for multi-character option names. 1.1.1.2 root 47: 1.1.1.4 ! root 48: By default, this macro is defined to handle the standard options ! 49: properly. You need not define it unless you wish to add additional ! 50: options which take arguments. 1.1.1.2 root 51: 1.1.1.4 ! root 52: `SWITCHES_NEED_SPACES' ! 53: A string-valued C expression which is nonempty if the linker needs ! 54: a space between the `-L' or `-o' option and its argument. 1.1.1.3 root 55: 1.1.1.4 ! root 56: If this macro is not defined, the default value is 0. 1.1.1.3 root 57: 1.1.1.4 ! root 58: `CPP_SPEC' ! 59: A C string constant that tells the GNU CC driver program options to ! 60: pass to CPP. It can also specify how to translate options you ! 61: give to GNU CC into options for GNU CC to pass to the CPP. 1.1.1.3 root 62: 1.1.1.4 ! root 63: Do not define this macro if it does not need to do anything. ! 64: ! 65: `SIGNED_CHAR_SPEC' ! 66: A C string constant that tells the GNU CC driver program options to ! 67: pass to CPP. By default, this macro is defined to pass the option ! 68: `-D__CHAR_UNSIGNED__' to CPP if `char' will be treated as ! 69: `unsigned char' by `cc1'. ! 70: ! 71: Do not define this macro unless you need to override the default ! 72: definition. ! 73: ! 74: `CC1_SPEC' ! 75: A C string constant that tells the GNU CC driver program options to ! 76: pass to `cc1'. It can also specify how to translate options you ! 77: give to GNU CC into options for GNU CC to pass to the `cc1'. ! 78: ! 79: Do not define this macro if it does not need to do anything. ! 80: ! 81: `CC1PLUS_SPEC' ! 82: A C string constant that tells the GNU CC driver program options to ! 83: pass to `cc1plus'. It can also specify how to translate options ! 84: you give to GNU CC into options for GNU CC to pass to the ! 85: `cc1plus'. ! 86: ! 87: Do not define this macro if it does not need to do anything. ! 88: ! 89: `ASM_SPEC' ! 90: A C string constant that tells the GNU CC driver program options to ! 91: pass to the assembler. It can also specify how to translate ! 92: options you give to GNU CC into options for GNU CC to pass to the ! 93: assembler. See the file `sun3.h' for an example of this. ! 94: ! 95: Do not define this macro if it does not need to do anything. ! 96: ! 97: `ASM_FINAL_SPEC' ! 98: A C string constant that tells the GNU CC driver program how to ! 99: run any programs which cleanup after the normal assembler. ! 100: Normally, this is not needed. See the file `mips.h' for an ! 101: example of this. ! 102: ! 103: Do not define this macro if it does not need to do anything. ! 104: ! 105: `LINK_SPEC' ! 106: A C string constant that tells the GNU CC driver program options to ! 107: pass to the linker. It can also specify how to translate options ! 108: you give to GNU CC into options for GNU CC to pass to the linker. ! 109: ! 110: Do not define this macro if it does not need to do anything. ! 111: ! 112: `LIB_SPEC' ! 113: Another C string constant used much like `LINK_SPEC'. The ! 114: difference between the two is that `LIB_SPEC' is used at the end ! 115: of the command given to the linker. ! 116: ! 117: If this macro is not defined, a default is provided that loads the ! 118: standard C library from the usual place. See `gcc.c'. ! 119: ! 120: `STARTFILE_SPEC' ! 121: Another C string constant used much like `LINK_SPEC'. The ! 122: difference between the two is that `STARTFILE_SPEC' is used at the ! 123: very beginning of the command given to the linker. ! 124: ! 125: If this macro is not defined, a default is provided that loads the ! 126: standard C startup file from the usual place. See `gcc.c'. ! 127: ! 128: `ENDFILE_SPEC' ! 129: Another C string constant used much like `LINK_SPEC'. The ! 130: difference between the two is that `ENDFILE_SPEC' is used at the ! 131: very end of the command given to the linker. ! 132: ! 133: Do not define this macro if it does not need to do anything. ! 134: ! 135: `LINK_LIBGCC_SPECIAL' ! 136: Define this macro meaning that `gcc' should find the library ! 137: `libgcc.a' by hand, rather than passing the argument `-lgcc' to ! 138: tell the linker to do the search. ! 139: ! 140: `RELATIVE_PREFIX_NOT_LINKDIR' ! 141: Define this macro to tell `gcc' that it should only translate a ! 142: `-B' prefix into a `-L' linker option if the prefix indicates an ! 143: absolute file name. ! 144: ! 145: `STANDARD_EXEC_PREFIX' ! 146: Define this macro as a C string constant if you wish to override ! 147: the standard choice of `/usr/local/lib/gcc-lib/' as the default ! 148: prefix to try when searching for the executable files of the ! 149: compiler. ! 150: ! 151: `MD_EXEC_PREFIX' ! 152: If defined, this macro is an additional prefix to try after ! 153: `STANDARD_EXEC_PREFIX'. `MD_EXEC_PREFIX' is not searched when the ! 154: `-b' option is used, or the compiler is built as a cross compiler. ! 155: ! 156: `STANDARD_STARTFILE_PREFIX' ! 157: Define this macro as a C string constant if you wish to override ! 158: the standard choice of `/usr/local/lib/' as the default prefix to ! 159: try when searching for startup files such as `crt0.o'. ! 160: ! 161: `MD_STARTFILE_PREFIX' ! 162: If defined, this macro supplies an additional prefix to try after ! 163: the standard prefixes. `MD_EXEC_PREFIX' is not searched when the ! 164: `-b' option is used, or when the compiler is built as a cross ! 165: compiler. ! 166: ! 167: `MD_STARTFILE_PREFIX_1' ! 168: If defined, this macro supplies yet another prefix to try after the ! 169: standard prefixes. It is not searched when the `-b' option is ! 170: used, or when the compiler is built as a cross compiler. ! 171: ! 172: `LOCAL_INCLUDE_DIR' ! 173: Define this macro as a C string constant if you wish to override ! 174: the standard choice of `/usr/local/include' as the default prefix ! 175: to try when searching for local header files. `LOCAL_INCLUDE_DIR' ! 176: comes before `SYSTEM_INCLUDE_DIR' in the search order. ! 177: ! 178: Cross compilers do not use this macro and do not search either ! 179: `/usr/local/include' or its replacement. ! 180: ! 181: `SYSTEM_INCLUDE_DIR' ! 182: Define this macro as a C string constant if you wish to specify a ! 183: system-specific directory to search for header files before the ! 184: standard directory. `SYSTEM_INCLUDE_DIR' comes before ! 185: `STANDARD_INCLUDE_DIR' in the search order. ! 186: ! 187: Cross compilers do not use this macro and do not search the ! 188: directory specified. ! 189: ! 190: `STANDARD_INCLUDE_DIR' ! 191: Define this macro as a C string constant if you wish to override ! 192: the standard choice of `/usr/include' as the default prefix to try ! 193: when searching for header files. ! 194: ! 195: Cross compilers do not use this macro and do not search either ! 196: `/usr/include' or its replacement. ! 197: ! 198: `INCLUDE_DEFAULTS' ! 199: Define this macro if you wish to override the entire default ! 200: search path for include files. The default search path includes ! 201: `GPLUSPLUS_INCLUDE_DIR', `GCC_INCLUDE_DIR', `LOCAL_INCLUDE_DIR', ! 202: `SYSTEM_INCLUDE_DIR', and `STANDARD_INCLUDE_DIR'. In addition, ! 203: the macros `GPLUSPLUS_INCLUDE_DIR' and `GCC_INCLUDE_DIR' are ! 204: defined automatically by `Makefile', and specify private search ! 205: areas for GCC. The directory `GPLUSPLUS_INCLUDE_DIR' is used only ! 206: for C++ programs. ! 207: ! 208: The definition should be an initializer for an array of structures. ! 209: Each array element should have two elements: the directory name (a ! 210: string constant) and a flag for C++-only directories. Mark the ! 211: end of the array with a null element. For example, here is the ! 212: definition used for VMS: ! 213: ! 214: #define INCLUDE_DEFAULTS \ ! 215: { \ ! 216: { "GNU_GXX_INCLUDE:", 1}, \ ! 217: { "GNU_CC_INCLUDE:", 0}, \ ! 218: { "SYS$SYSROOT:[SYSLIB.]", 0}, \ ! 219: { ".", 0}, \ ! 220: { 0, 0} \ ! 221: } ! 222: ! 223: Here is the order of prefixes tried for exec files: ! 224: ! 225: 1. Any prefixes specified by the user with `-B'. ! 226: ! 227: 2. The environment variable `GCC_EXEC_PREFIX', if any. 1.1.1.2 root 228: 1.1.1.4 ! root 229: 3. The directories specified by the environment variable ! 230: `COMPILER_PATH'. 1.1.1.2 root 231: 1.1.1.4 ! root 232: 4. The macro `STANDARD_EXEC_PREFIX'. ! 233: ! 234: 5. `/usr/lib/gcc/'. ! 235: ! 236: 6. The macro `MD_EXEC_PREFIX', if any. ! 237: ! 238: Here is the order of prefixes tried for startfiles: ! 239: ! 240: 1. Any prefixes specified by the user with `-B'. ! 241: ! 242: 2. The environment variable `GCC_EXEC_PREFIX', if any. ! 243: ! 244: 3. The directories specified by the environment variable ! 245: `LIBRARY_PATH'. ! 246: ! 247: 4. The macro `STANDARD_EXEC_PREFIX'. ! 248: ! 249: 5. `/usr/lib/gcc/'. ! 250: ! 251: 6. The macro `MD_EXEC_PREFIX', if any. ! 252: ! 253: 7. The macro `MD_STARTFILE_PREFIX', if any. ! 254: ! 255: 8. The macro `STANDARD_STARTFILE_PREFIX'. ! 256: ! 257: 9. `/lib/'. ! 258: ! 259: 10. `/usr/lib/'. 1.1.1.2 root 260: 261: 1.1.1.4 ! root 262: File: gcc.info, Node: Run-time Target, Next: Storage Layout, Prev: Driver, Up: Target Macros ! 263: ! 264: Run-time Target Specification ! 265: ============================= ! 266: ! 267: `CPP_PREDEFINES' ! 268: Define this to be a string constant containing `-D' options to ! 269: define the predefined macros that identify this machine and system. ! 270: These macros will be predefined unless the `-ansi' option is ! 271: specified. 1.1.1.2 root 272: 1.1.1.4 ! root 273: In addition, a parallel set of macros are predefined, whose names ! 274: are made by appending `__' at the beginning and at the end. These ! 275: `__' macros are permitted by the ANSI standard, so they are ! 276: predefined regardless of whether `-ansi' is specified. ! 277: ! 278: For example, on the Sun, one can use the following value: ! 279: ! 280: "-Dmc68000 -Dsun -Dunix" ! 281: ! 282: The result is to define the macros `__mc68000__', `__sun__' and ! 283: `__unix__' unconditionally, and the macros `mc68000', `sun' and ! 284: `unix' provided `-ansi' is not specified. ! 285: ! 286: `STDC_VALUE' ! 287: Define the value to be assigned to the built-in macro `__STDC__'. ! 288: The default is the value `1'. ! 289: ! 290: `extern int target_flags;' ! 291: This declaration should be present. ! 292: ! 293: `TARGET_...' ! 294: This series of macros is to allow compiler command arguments to ! 295: enable or disable the use of optional features of the target ! 296: machine. For example, one machine description serves both the ! 297: 68000 and the 68020; a command argument tells the compiler whether ! 298: it should use 68020-only instructions or not. This command ! 299: argument works by means of a macro `TARGET_68020' that tests a bit ! 300: in `target_flags'. ! 301: ! 302: Define a macro `TARGET_FEATURENAME' for each such option. Its ! 303: definition should test a bit in `target_flags'; for example: ! 304: ! 305: #define TARGET_68020 (target_flags & 1) ! 306: ! 307: One place where these macros are used is in the ! 308: condition-expressions of instruction patterns. Note how ! 309: `TARGET_68020' appears frequently in the 68000 machine description ! 310: file, `m68k.md'. Another place they are used is in the definitions ! 311: of the other macros in the `MACHINE.h' file. ! 312: ! 313: `TARGET_SWITCHES' ! 314: This macro defines names of command options to set and clear bits ! 315: in `target_flags'. Its definition is an initializer with a ! 316: subgrouping for each command option. ! 317: ! 318: Each subgrouping contains a string constant, that defines the ! 319: option name, and a number, which contains the bits to set in ! 320: `target_flags'. A negative number says to clear bits instead; the ! 321: negative of the number is which bits to clear. The actual option ! 322: name is made by appending `-m' to the specified name. ! 323: ! 324: One of the subgroupings should have a null string. The number in ! 325: this grouping is the default value for `target_flags'. Any target ! 326: options act starting with that value. ! 327: ! 328: Here is an example which defines `-m68000' and `-m68020' with ! 329: opposite meanings, and picks the latter as the default: ! 330: ! 331: #define TARGET_SWITCHES \ ! 332: { { "68020", 1}, \ ! 333: { "68000", -1}, \ ! 334: { "", 1}} ! 335: ! 336: `TARGET_OPTIONS' ! 337: This macro is similar to `TARGET_SWITCHES' but defines names of ! 338: command options that have values. Its definition is an ! 339: initializer with a subgrouping for each command option. ! 340: ! 341: Each subgrouping contains a string constant, that defines the ! 342: fixed part of the option name, and the address of a variable. The ! 343: variable, type `char *', is set to the variable part of the given ! 344: option if the fixed part matches. The actual option name is made ! 345: by appending `-m' to the specified name. ! 346: ! 347: Here is an example which defines `-mshort-data-NUMBER'. If the ! 348: given option is `-mshort-data-512', the variable `m88k_short_data' ! 349: will be set to the string `"512"'. ! 350: ! 351: extern char *m88k_short_data; ! 352: #define TARGET_OPTIONS { { "short-data-", &m88k_short_data } } ! 353: ! 354: `TARGET_VERSION' ! 355: This macro is a C statement to print on `stderr' a string ! 356: describing the particular machine description choice. Every ! 357: machine description should define `TARGET_VERSION'. For example: ! 358: ! 359: #ifdef MOTOROLA ! 360: #define TARGET_VERSION fprintf (stderr, " (68k, Motorola syntax)"); ! 361: #else ! 362: #define TARGET_VERSION fprintf (stderr, " (68k, MIT syntax)"); ! 363: #endif ! 364: ! 365: `OVERRIDE_OPTIONS' ! 366: Sometimes certain combinations of command options do not make ! 367: sense on a particular target machine. You can define a macro ! 368: `OVERRIDE_OPTIONS' to take account of this. This macro, if ! 369: defined, is executed once just after all the command options have ! 370: been parsed. ! 371: ! 372: Don't use this macro to turn on various extra optimizations for ! 373: `-O'. That is what `OPTIMIZATION_OPTIONS' is for. ! 374: ! 375: `OPTIMIZATION_OPTIONS (LEVEL)' ! 376: Some machines may desire to change what optimizations are ! 377: performed for various optimization levels. This macro, if ! 378: defined, is executed once just after the optimization level is ! 379: determined and before the remainder of the command options have ! 380: been parsed. Values set in this macro are used as the default ! 381: values for the other command line options. 1.1.1.3 root 382: 1.1.1.4 ! root 383: LEVEL is the optimization level specified; 2 if -O2 is specified, ! 384: 1 if -O is specified, and 0 if neither is specified. 1.1.1.2 root 385: 1.1.1.4 ! root 386: *Do not examine `write_symbols' in this macro!* The debugging ! 387: options are not supposed to alter the generated code. 1.1.1.2 root 388: 389: 1.1.1.4 ! root 390: File: gcc.info, Node: Storage Layout, Next: Type Layout, Prev: Run-time Target, Up: Target Macros 1.1.1.2 root 391: 1.1.1.4 ! root 392: Storage Layout ! 393: ============== 1.1.1.2 root 394: 1.1.1.4 ! root 395: Note that the definitions of the macros in this table which are ! 396: sizes or alignments measured in bits do not need to be constant. They ! 397: can be C expressions that refer to static variables, such as the ! 398: `target_flags'. *Note Run-time Target::. ! 399: ! 400: `BITS_BIG_ENDIAN' ! 401: Define this macro to be the value 1 if the most significant bit in ! 402: a byte has the lowest number; otherwise define it to be the value ! 403: zero. This means that bit-field instructions count from the most ! 404: significant bit. If the machine has no bit-field instructions, ! 405: this macro is irrelevant. ! 406: ! 407: This macro does not affect the way structure fields are packed into ! 408: bytes or words; that is controlled by `BYTES_BIG_ENDIAN'. ! 409: ! 410: `BYTES_BIG_ENDIAN' ! 411: Define this macro to be 1 if the most significant byte in a word ! 412: has the lowest number. ! 413: ! 414: `WORDS_BIG_ENDIAN' ! 415: Define this macro to be 1 if, in a multiword object, the most ! 416: significant word has the lowest number. This applies to both ! 417: memory locations and registers; GNU CC fundamentally assumes that ! 418: the order of words in memory is the same as the order in registers. ! 419: ! 420: `BITS_PER_UNIT' ! 421: Number of bits in an addressable storage unit (byte); normally 8. ! 422: ! 423: `BITS_PER_WORD' ! 424: Number of bits in a word; normally 32. ! 425: ! 426: `MAX_BITS_PER_WORD' ! 427: Maximum number of bits in a word. If this is undefined, the ! 428: default is `BITS_PER_WORD'. Otherwise, it is the constant value ! 429: that is the largest value that `BITS_PER_WORD' can have at ! 430: run-time. ! 431: ! 432: `UNITS_PER_WORD' ! 433: Number of storage units in a word; normally 4. ! 434: ! 435: `POINTER_SIZE' ! 436: Width of a pointer, in bits. ! 437: ! 438: `PROMOTE_MODE (M, UNSIGNEDP, TYPE)' ! 439: A macro to update M and UNSIGNEDP when an object whose type is ! 440: TYPE and which has the specified mode and signedness is to be ! 441: stored in a register. This macro is only called when TYPE is a ! 442: scalar type. ! 443: ! 444: On most RISC machines, which only have operations that operate on ! 445: a full register, define this macro to set M to `word_mode' if M is ! 446: an integer mode narrower than `BITS_PER_WORD'. In most cases, ! 447: only integer modes should be widened because wider-precision ! 448: floating-point operations are usually more expensive than their ! 449: narrower counterparts. ! 450: ! 451: For most machines, the macro definition does not change UNSIGNEDP. ! 452: However, some machines, have instructions that preferentially ! 453: handle either signed or unsigned quanities of certain modes. For ! 454: example, on the DEC Alpha, 32-bit loads from memory and 32-bit add ! 455: instructions sign-extend the result to 64 bits. On such machines, ! 456: set UNSIGNEDP according to which kind of extension is more ! 457: efficient. ! 458: ! 459: Do not define this macro if it would never modify M. ! 460: ! 461: `PROMOTE_FUNCTION_ARGS' ! 462: Define this macro if the promotion described by `PROMOTE_MODE' ! 463: should also be done for outgoing function arguments. ! 464: ! 465: `PROMOTE_FUNCTION_RETURN' ! 466: Define this macro if the promotion described by `PROMOTE_MODE' ! 467: should also be done for the return value of functions. ! 468: ! 469: If this macro is defined, `FUNCTION_VALUE' must perform the same ! 470: promotions done by `PROMOTE_MODE'. ! 471: ! 472: `PARM_BOUNDARY' ! 473: Normal alignment required for function parameters on the stack, in ! 474: bits. All stack parameters receive at least this much alignment ! 475: regardless of data type. On most machines, this is the same as the ! 476: size of an integer. ! 477: ! 478: `STACK_BOUNDARY' ! 479: Define this macro if you wish to preserve a certain alignment for ! 480: the stack pointer. The definition is a C expression for the ! 481: desired alignment (measured in bits). ! 482: ! 483: If `PUSH_ROUNDING' is not defined, the stack will always be aligned ! 484: to the specified boundary. If `PUSH_ROUNDING' is defined and ! 485: specifies a less strict alignment than `STACK_BOUNDARY', the stack ! 486: may be momentarily unaligned while pushing arguments. ! 487: ! 488: `FUNCTION_BOUNDARY' ! 489: Alignment required for a function entry point, in bits. ! 490: ! 491: `BIGGEST_ALIGNMENT' ! 492: Biggest alignment that any data type can require on this machine, ! 493: in bits. ! 494: ! 495: `BIGGEST_FIELD_ALIGNMENT' ! 496: Biggest alignment that any structure field can require on this ! 497: machine, in bits. If defined, this overrides `BIGGEST_ALIGNMENT' ! 498: for structure fields only. ! 499: ! 500: `MAX_OFILE_ALIGNMENT' ! 501: Biggest alignment supported by the object file format of this ! 502: machine. Use this macro to limit the alignment which can be ! 503: specified using the `__attribute__ ((aligned (N)))' construct. If ! 504: not defined, the default value is `BIGGEST_ALIGNMENT'. ! 505: ! 506: `DATA_ALIGNMENT (TYPE, BASIC-ALIGN)' ! 507: If defined, a C expression to compute the alignment for a static ! 508: variable. TYPE is the data type, and BASIC-ALIGN is the alignment ! 509: that the object would ordinarily have. The value of this macro is ! 510: used instead of that alignment to align the object. ! 511: ! 512: If this macro is not defined, then BASIC-ALIGN is used. ! 513: ! 514: One use of this macro is to increase alignment of medium-size data ! 515: to make it all fit in fewer cache lines. Another is to cause ! 516: character arrays to be word-aligned so that `strcpy' calls that ! 517: copy constants to character arrays can be done inline. ! 518: ! 519: `CONSTANT_ALIGNMENT (CONSTANT, BASIC-ALIGN)' ! 520: If defined, a C expression to compute the alignment given to a ! 521: constant that is being placed in memory. CONSTANT is the constant ! 522: and BASIC-ALIGN is the alignment that the object would ordinarily ! 523: have. The value of this macro is used instead of that alignment to ! 524: align the object. ! 525: ! 526: If this macro is not defined, then BASIC-ALIGN is used. ! 527: ! 528: The typical use of this macro is to increase alignment for string ! 529: constants to be word aligned so that `strcpy' calls that copy ! 530: constants can be done inline. ! 531: ! 532: `EMPTY_FIELD_BOUNDARY' ! 533: Alignment in bits to be given to a structure bit field that ! 534: follows an empty field such as `int : 0;'. ! 535: ! 536: Note that `PCC_BITFIELD_TYPE_MATTERS' also affects the alignment ! 537: that results from an empty field. ! 538: ! 539: `STRUCTURE_SIZE_BOUNDARY' ! 540: Number of bits which any structure or union's size must be a ! 541: multiple of. Each structure or union's size is rounded up to a ! 542: multiple of this. ! 543: ! 544: If you do not define this macro, the default is the same as ! 545: `BITS_PER_UNIT'. ! 546: ! 547: `STRICT_ALIGNMENT' ! 548: Define this macro to be the value 1 if instructions will fail to ! 549: work if given data not on the nominal alignment. If instructions ! 550: will merely go slower in that case, define this macro as 0. ! 551: ! 552: `PCC_BITFIELD_TYPE_MATTERS' ! 553: Define this if you wish to imitate the way many other C compilers ! 554: handle alignment of bitfields and the structures that contain them. ! 555: ! 556: The behavior is that the type written for a bitfield (`int', ! 557: `short', or other integer type) imposes an alignment for the ! 558: entire structure, as if the structure really did contain an ! 559: ordinary field of that type. In addition, the bitfield is placed ! 560: within the structure so that it would fit within such a field, not ! 561: crossing a boundary for it. ! 562: ! 563: Thus, on most machines, a bitfield whose type is written as `int' ! 564: would not cross a four-byte boundary, and would force four-byte ! 565: alignment for the whole structure. (The alignment used may not be ! 566: four bytes; it is controlled by the other alignment parameters.) ! 567: ! 568: If the macro is defined, its definition should be a C expression; ! 569: a nonzero value for the expression enables this behavior. ! 570: ! 571: Note that if this macro is not defined, or its value is zero, some ! 572: bitfields may cross more than one alignment boundary. The ! 573: compiler can support such references if there are `insv', `extv', ! 574: and `extzv' insns that can directly reference memory. ! 575: ! 576: The other known way of making bitfields work is to define ! 577: `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'. Then ! 578: every structure can be accessed with fullwords. ! 579: ! 580: Unless the machine has bitfield instructions or you define ! 581: `STRUCTURE_SIZE_BOUNDARY' that way, you must define ! 582: `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value. ! 583: ! 584: If your aim is to make GNU CC use the same conventions for laying ! 585: out bitfields as are used by another compiler, here is how to ! 586: investigate what the other compiler does. Compile and run this ! 587: program: ! 588: ! 589: struct foo1 ! 590: { ! 591: char x; ! 592: char :0; ! 593: char y; ! 594: }; ! 595: ! 596: struct foo2 ! 597: { ! 598: char x; ! 599: int :0; ! 600: char y; ! 601: }; ! 602: ! 603: main () ! 604: { ! 605: printf ("Size of foo1 is %d\n", sizeof (struct foo1)); ! 606: printf ("Size of foo2 is %d\n", sizeof (struct foo2)); ! 607: exit (0); ! 608: } ! 609: ! 610: If this prints 2 and 5, then the compiler's behavior is what you ! 611: would get from `PCC_BITFIELD_TYPE_MATTERS'. ! 612: ! 613: `BITFIELD_NBYTES_LIMITED' ! 614: Like PCC_BITFIELD_TYPE_MATTERS except that its effect is limited to ! 615: aligning a bitfield within the structure. ! 616: ! 617: `ROUND_TYPE_SIZE (STRUCT, SIZE, ALIGN)' ! 618: Define this macro as an expression for the overall size of a ! 619: structure (given by STRUCT as a tree node) when the size computed ! 620: from the fields is SIZE and the alignment is ALIGN. ! 621: ! 622: The default is to round SIZE up to a multiple of ALIGN. ! 623: ! 624: `ROUND_TYPE_ALIGN (STRUCT, COMPUTED, SPECIFIED)' ! 625: Define this macro as an expression for the alignment of a structure ! 626: (given by STRUCT as a tree node) if the alignment computed in the ! 627: usual way is COMPUTED and the alignment explicitly specified was ! 628: SPECIFIED. ! 629: ! 630: The default is to use SPECIFIED if it is larger; otherwise, use ! 631: the smaller of COMPUTED and `BIGGEST_ALIGNMENT' ! 632: ! 633: `MAX_FIXED_MODE_SIZE' ! 634: An integer expression for the size in bits of the largest integer ! 635: machine mode that should actually be used. All integer machine ! 636: modes of this size or smaller can be used for structures and ! 637: unions with the appropriate sizes. If this macro is undefined, ! 638: `GET_MODE_BITSIZE (DImode)' is assumed. ! 639: ! 640: `CHECK_FLOAT_VALUE (MODE, VALUE)' ! 641: A C statement to validate the value VALUE (of type `double') for ! 642: mode MODE. This means that you check whether VALUE fits within ! 643: the possible range of values for mode MODE on this target machine. ! 644: The mode MODE is always `SFmode' or `DFmode'. ! 645: ! 646: If VALUE is not valid, you should call `error' to print an error ! 647: message and then assign some valid value to VALUE. Allowing an ! 648: invalid value to go through the compiler can produce incorrect ! 649: assembler code which may even cause Unix assemblers to crash. ! 650: ! 651: This macro need not be defined if there is no work for it to do. ! 652: ! 653: `TARGET_FLOAT_FORMAT' ! 654: A code distinguishing the floating point format of the target ! 655: machine. There are three defined values: ! 656: ! 657: `IEEE_FLOAT_FORMAT' ! 658: This code indicates IEEE floating point. It is the default; ! 659: there is no need to define this macro when the format is IEEE. ! 660: ! 661: `VAX_FLOAT_FORMAT' ! 662: This code indicates the peculiar format used on the Vax. ! 663: ! 664: `UNKNOWN_FLOAT_FORMAT' ! 665: This code indicates any other format. ! 666: ! 667: The value of this macro is compared with `HOST_FLOAT_FORMAT' ! 668: (*note Config::.) to determine whether the target machine has the ! 669: same format as the host machine. If any other formats are ! 670: actually in use on supported machines, new codes should be defined ! 671: for them. ! 672: ! 673: ! 674: File: gcc.info, Node: Type Layout, Next: Registers, Prev: Storage Layout, Up: Target Macros ! 675: ! 676: Layout of Source Language Data Types ! 677: ==================================== ! 678: ! 679: These macros define the sizes and other characteristics of the ! 680: standard basic data types used in programs being compiled. Unlike the ! 681: macros in the previous section, these apply to specific features of C ! 682: and related languages, rather than to fundamental aspects of storage ! 683: layout. ! 684: ! 685: `INT_TYPE_SIZE' ! 686: A C expression for the size in bits of the type `int' on the ! 687: target machine. If you don't define this, the default is one word. ! 688: ! 689: `SHORT_TYPE_SIZE' ! 690: A C expression for the size in bits of the type `short' on the ! 691: target machine. If you don't define this, the default is half a ! 692: word. (If this would be less than one storage unit, it is rounded ! 693: up to one unit.) ! 694: ! 695: `LONG_TYPE_SIZE' ! 696: A C expression for the size in bits of the type `long' on the ! 697: target machine. If you don't define this, the default is one word. ! 698: ! 699: `LONG_LONG_TYPE_SIZE' ! 700: A C expression for the size in bits of the type `long long' on the ! 701: target machine. If you don't define this, the default is two ! 702: words. ! 703: ! 704: `CHAR_TYPE_SIZE' ! 705: A C expression for the size in bits of the type `char' on the ! 706: target machine. If you don't define this, the default is one ! 707: quarter of a word. (If this would be less than one storage unit, ! 708: it is rounded up to one unit.) ! 709: ! 710: `FLOAT_TYPE_SIZE' ! 711: A C expression for the size in bits of the type `float' on the ! 712: target machine. If you don't define this, the default is one word. ! 713: ! 714: `DOUBLE_TYPE_SIZE' ! 715: A C expression for the size in bits of the type `double' on the ! 716: target machine. If you don't define this, the default is two ! 717: words. ! 718: ! 719: `LONG_DOUBLE_TYPE_SIZE' ! 720: A C expression for the size in bits of the type `long double' on ! 721: the target machine. If you don't define this, the default is two ! 722: words. ! 723: ! 724: `DEFAULT_SIGNED_CHAR' ! 725: An expression whose value is 1 or 0, according to whether the type ! 726: `char' should be signed or unsigned by default. The user can ! 727: always override this default with the options `-fsigned-char' and ! 728: `-funsigned-char'. ! 729: ! 730: `DEFAULT_SHORT_ENUMS' ! 731: A C expression to determine whether to give an `enum' type only as ! 732: many bytes as it takes to represent the range of possible values ! 733: of that type. A nonzero value means to do that; a zero value ! 734: means all `enum' types should be allocated like `int'. ! 735: ! 736: If you don't define the macro, the default is 0. ! 737: ! 738: `SIZE_TYPE' ! 739: A C expression for a string describing the name of the data type ! 740: to use for size values. The typedef name `size_t' is defined ! 741: using the contents of the string. ! 742: ! 743: The string can contain more than one keyword. If so, separate ! 744: them with spaces, and write first any length keyword, then ! 745: `unsigned' if appropriate, and finally `int'. The string must ! 746: exactly match one of the data type names defined in the function ! 747: `init_decl_processing' in the file `c-decl.c'. You may not omit ! 748: `int' or change the order--that would cause the compiler to crash ! 749: on startup. ! 750: ! 751: If you don't define this macro, the default is `"long unsigned ! 752: int"'. ! 753: ! 754: `PTRDIFF_TYPE' ! 755: A C expression for a string describing the name of the data type ! 756: to use for the result of subtracting two pointers. The typedef ! 757: name `ptrdiff_t' is defined using the contents of the string. See ! 758: `SIZE_TYPE' above for more information. ! 759: ! 760: If you don't define this macro, the default is `"long int"'. ! 761: ! 762: `WCHAR_TYPE' ! 763: A C expression for a string describing the name of the data type ! 764: to use for wide characters. The typedef name `wchar_t' is defined ! 765: using the contents of the string. See `SIZE_TYPE' above for more 1.1.1.3 root 766: information. 767: 1.1.1.4 ! root 768: If you don't define this macro, the default is `"int"'. 1.1.1.3 root 769: 1.1.1.4 ! root 770: `WCHAR_TYPE_SIZE' ! 771: A C expression for the size in bits of the data type for wide ! 772: characters. This is used in `cpp', which cannot make use of ! 773: `WCHAR_TYPE'. ! 774: ! 775: `OBJC_INT_SELECTORS' ! 776: Define this macro if the type of Objective C selectors should be ! 777: `int'. ! 778: ! 779: If this macro is not defined, then selectors should have the type ! 780: `struct objc_selector *'. ! 781: ! 782: `OBJC_SELECTORS_WITHOUT_LABELS' ! 783: Define this macro if the compiler can group all the selectors ! 784: together into a vector and use just one label at the beginning of ! 785: the vector. Otherwise, the compiler must give each selector its ! 786: own assembler label. ! 787: ! 788: On certain machines, it is important to have a separate label for ! 789: each selector because this enables the linker to eliminate ! 790: duplicate selectors. ! 791: ! 792: `TARGET_BELL' ! 793: A C constant expression for the integer value for escape sequence ! 794: `\a'. ! 795: ! 796: `TARGET_BS' ! 797: `TARGET_TAB' ! 798: `TARGET_NEWLINE' ! 799: C constant expressions for the integer values for escape sequences ! 800: `\b', `\t' and `\n'. ! 801: ! 802: `TARGET_VT' ! 803: `TARGET_FF' ! 804: `TARGET_CR' ! 805: C constant expressions for the integer values for escape sequences ! 806: `\v', `\f' and `\r'. 1.1.1.2 root 807: 1.1.1.3 root 808: 1.1.1.4 ! root 809: File: gcc.info, Node: Registers, Next: Register Classes, Prev: Type Layout, Up: Target Macros 1.1.1.3 root 810: 1.1.1.4 ! root 811: Register Usage ! 812: ============== 1.1.1.2 root 813: 1.1.1.4 ! root 814: This section explains how to describe what registers the target ! 815: machine has, and how (in general) they can be used. 1.1.1.3 root 816: 1.1.1.4 ! root 817: The description of which registers a specific instruction can use is ! 818: done with register classes; see *Note Register Classes::. For ! 819: information on using registers to access a stack frame, see *Note Frame ! 820: Registers::. For passing values in registers, see *Note Register ! 821: Arguments::. For returning values in registers, see *Note Scalar ! 822: Return::. ! 823: ! 824: * Menu: ! 825: ! 826: * Register Basics:: Number and kinds of registers. ! 827: * Allocation Order:: Order in which registers are allocated. ! 828: * Values in Registers:: What kinds of values each reg can hold. ! 829: * Leaf Functions:: Renumbering registers for leaf functions. ! 830: * Stack Registers:: Handling a register stack such as 80387. ! 831: * Obsolete Register Macros:: Macros formerly used for the 80387. 1.1.1.2 root 832: 833: 1.1.1.4 ! root 834: File: gcc.info, Node: Register Basics, Next: Allocation Order, Up: Registers 1.1.1.3 root 835: 1.1.1.4 ! root 836: Basic Characteristics of Registers ! 837: ---------------------------------- 1.1 root 838: 1.1.1.4 ! root 839: `FIRST_PSEUDO_REGISTER' ! 840: Number of hardware registers known to the compiler. They receive ! 841: numbers 0 through `FIRST_PSEUDO_REGISTER-1'; thus, the first ! 842: pseudo register's number really is assigned the number ! 843: `FIRST_PSEUDO_REGISTER'. ! 844: ! 845: `FIXED_REGISTERS' ! 846: An initializer that says which registers are used for fixed ! 847: purposes all throughout the compiled code and are therefore not ! 848: available for general allocation. These would include the stack ! 849: pointer, the frame pointer (except on machines where that can be ! 850: used as a general register when no frame pointer is needed), the ! 851: program counter on machines where that is considered one of the ! 852: addressable registers, and any other numbered register with a ! 853: standard use. ! 854: ! 855: This information is expressed as a sequence of numbers, separated ! 856: by commas and surrounded by braces. The Nth number is 1 if ! 857: register N is fixed, 0 otherwise. ! 858: ! 859: The table initialized from this macro, and the table initialized by ! 860: the following one, may be overridden at run time either ! 861: automatically, by the actions of the macro ! 862: `CONDITIONAL_REGISTER_USAGE', or by the user with the command ! 863: options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. ! 864: ! 865: `CALL_USED_REGISTERS' ! 866: Like `FIXED_REGISTERS' but has 1 for each register that is ! 867: clobbered (in general) by function calls as well as for fixed ! 868: registers. This macro therefore identifies the registers that are ! 869: not available for general allocation of values that must live ! 870: across function calls. ! 871: ! 872: If a register has 0 in `CALL_USED_REGISTERS', the compiler ! 873: automatically saves it on function entry and restores it on ! 874: function exit, if the register is used within the function. ! 875: ! 876: `CONDITIONAL_REGISTER_USAGE' ! 877: Zero or more C statements that may conditionally modify two ! 878: variables `fixed_regs' and `call_used_regs' (both of type `char ! 879: []') after they have been initialized from the two preceding ! 880: macros. ! 881: ! 882: This is necessary in case the fixed or call-clobbered registers ! 883: depend on target flags. ! 884: ! 885: You need not define this macro if it has no work to do. ! 886: ! 887: If the usage of an entire class of registers depends on the target ! 888: flags, you may indicate this to GCC by using this macro to modify ! 889: `fixed_regs' and `call_used_regs' to 1 for each of the registers ! 890: in the classes which should not be used by GCC. Also define the ! 891: macro `REG_CLASS_FROM_LETTER' to return `NO_REGS' if it is called ! 892: with a letter for a class that shouldn't be used. ! 893: ! 894: (However, if this class is not included in `GENERAL_REGS' and all ! 895: of the insn patterns whose constraints permit this class are ! 896: controlled by target switches, then GCC will automatically avoid ! 897: using these registers when the target switches are opposed to ! 898: them.) ! 899: ! 900: `NON_SAVING_SETJMP' ! 901: If this macro is defined and has a nonzero value, it means that ! 902: `setjmp' and related functions fail to save the registers, or that ! 903: `longjmp' fails to restore them. To compensate, the compiler ! 904: avoids putting variables in registers in functions that use ! 905: `setjmp'. 1.1 root 906: 907: 1.1.1.4 ! root 908: File: gcc.info, Node: Allocation Order, Next: Values in Registers, Prev: Register Basics, Up: Registers ! 909: ! 910: Order of Allocation of Registers ! 911: -------------------------------- 1.1 root 912: 1.1.1.4 ! root 913: `REG_ALLOC_ORDER' ! 914: If defined, an initializer for a vector of integers, containing the ! 915: numbers of hard registers in the order in which GNU CC should ! 916: prefer to use them (from most preferred to least). ! 917: ! 918: If this macro is not defined, registers are used lowest numbered ! 919: first (all else being equal). ! 920: ! 921: One use of this macro is on machines where the highest numbered ! 922: registers must always be saved and the save-multiple-registers ! 923: instruction supports only sequences of consecutive registers. On ! 924: such machines, define `REG_ALLOC_ORDER' to be an initializer that ! 925: lists the highest numbered allocatable register first. ! 926: ! 927: `ORDER_REGS_FOR_LOCAL_ALLOC' ! 928: A C statement (sans semicolon) to choose the order in which to ! 929: allocate hard registers for pseudo-registers local to a basic ! 930: block. ! 931: ! 932: Store the desired order of registers in the array ! 933: `reg_alloc_order'. Element 0 should be the register to allocate ! 934: first; element 1, the next register; and so on. 1.1 root 935: 1.1.1.4 ! root 936: The macro body should not assume anything about the contents of ! 937: `reg_alloc_order' before execution of the macro. 1.1 root 938: 1.1.1.4 ! root 939: On most machines, it is not necessary to define this macro. 1.1 root 940: 941: 1.1.1.4 ! root 942: File: gcc.info, Node: Values in Registers, Next: Leaf Functions, Prev: Allocation Order, Up: Registers 1.1 root 943: 1.1.1.4 ! root 944: How Values Fit in Registers ! 945: --------------------------- 1.1 root 946: 1.1.1.4 ! root 947: This section discusses the macros that describe which kinds of values ! 948: (specifically, which machine modes) each register can hold, and how many ! 949: consecutive registers are needed for a given mode. ! 950: ! 951: `HARD_REGNO_NREGS (REGNO, MODE)' ! 952: A C expression for the number of consecutive hard registers, ! 953: starting at register number REGNO, required to hold a value of mode ! 954: MODE. ! 955: ! 956: On a machine where all registers are exactly one word, a suitable ! 957: definition of this macro is ! 958: ! 959: #define HARD_REGNO_NREGS(REGNO, MODE) \ ! 960: ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ ! 961: / UNITS_PER_WORD)) ! 962: ! 963: `HARD_REGNO_MODE_OK (REGNO, MODE)' ! 964: A C expression that is nonzero if it is permissible to store a ! 965: value of mode MODE in hard register number REGNO (or in several ! 966: registers starting with that one). For a machine where all ! 967: registers are equivalent, a suitable definition is ! 968: ! 969: #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 ! 970: ! 971: It is not necessary for this macro to check for the numbers of ! 972: fixed registers, because the allocation mechanism considers them ! 973: to be always occupied. ! 974: ! 975: On some machines, double-precision values must be kept in even/odd ! 976: register pairs. The way to implement that is to define this macro ! 977: to reject odd register numbers for such modes. ! 978: ! 979: The minimum requirement for a mode to be OK in a register is that ! 980: the `movMODE' instruction pattern support moves between the ! 981: register and any other hard register for which the mode is OK; and ! 982: that moving a value into the register and back out not alter it. ! 983: ! 984: Since the same instruction used to move `SImode' will work for all ! 985: narrower integer modes, it is not necessary on any machine for ! 986: `HARD_REGNO_MODE_OK' to distinguish between these modes, provided ! 987: you define patterns `movhi', etc., to take advantage of this. This ! 988: is useful because of the interaction between `HARD_REGNO_MODE_OK' ! 989: and `MODES_TIEABLE_P'; it is very desirable for all integer modes ! 990: to be tieable. ! 991: ! 992: Many machines have special registers for floating point arithmetic. ! 993: Often people assume that floating point machine modes are allowed ! 994: only in floating point registers. This is not true. Any ! 995: registers that can hold integers can safely *hold* a floating ! 996: point machine mode, whether or not floating arithmetic can be done ! 997: on it in those registers. Integer move instructions can be used ! 998: to move the values. ! 999: ! 1000: On some machines, though, the converse is true: fixed-point machine ! 1001: modes may not go in floating registers. This is true if the ! 1002: floating registers normalize any value stored in them, because ! 1003: storing a non-floating value there would garble it. In this case, ! 1004: `HARD_REGNO_MODE_OK' should reject fixed-point machine modes in ! 1005: floating registers. But if the floating registers do not ! 1006: automatically normalize, if you can store any bit pattern in one ! 1007: and retrieve it unchanged without a trap, then any machine mode ! 1008: may go in a floating register, so you can define this macro to say ! 1009: so. ! 1010: ! 1011: On some machines, such as the Sparc and the Mips, we get better ! 1012: code by defining `HARD_REGNO_MODE_OK' to forbid integers in ! 1013: floating registers, even though the hardware is capable of ! 1014: handling them. This is because transferring values between ! 1015: floating registers and general registers is so slow that it is ! 1016: better to keep the integer in memory. ! 1017: ! 1018: The primary significance of special floating registers is rather ! 1019: that they are the registers acceptable in floating point arithmetic ! 1020: instructions. However, this is of no concern to ! 1021: `HARD_REGNO_MODE_OK'. You handle it by writing the proper ! 1022: constraints for those instructions. ! 1023: ! 1024: On some machines, the floating registers are especially slow to ! 1025: access, so that it is better to store a value in a stack frame ! 1026: than in such a register if floating point arithmetic is not being ! 1027: done. As long as the floating registers are not in class ! 1028: `GENERAL_REGS', they will not be used unless some pattern's ! 1029: constraint asks for one. ! 1030: ! 1031: `MODES_TIEABLE_P (MODE1, MODE2)' ! 1032: A C expression that is nonzero if it is desirable to choose ! 1033: register allocation so as to avoid move instructions between a ! 1034: value of mode MODE1 and a value of mode MODE2. ! 1035: ! 1036: If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, ! 1037: MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1, ! 1038: MODE2)' must be zero. ! 1039: ! 1040: ! 1041: File: gcc.info, Node: Leaf Functions, Next: Stack Registers, Prev: Values in Registers, Up: Registers ! 1042: ! 1043: Handling Leaf Functions ! 1044: ----------------------- ! 1045: ! 1046: On some machines, a leaf function (i.e., one which makes no calls) ! 1047: can run more efficiently if it does not make its own register window. ! 1048: Often this means it is required to receive its arguments in the ! 1049: registers where they are passed by the caller, instead of the registers ! 1050: where they would normally arrive. ! 1051: ! 1052: The special treatment for leaf functions generally applies only when ! 1053: other conditions are met; for example, often they may use only those ! 1054: registers for its own variables and temporaries. We use the term "leaf ! 1055: function" to mean a function that is suitable for this special ! 1056: handling, so that functions with no calls are not necessarily "leaf ! 1057: functions". ! 1058: ! 1059: GNU CC assigns register numbers before it knows whether the function ! 1060: is suitable for leaf function treatment. So it needs to renumber the ! 1061: registers in order to output a leaf function. The following macros ! 1062: accomplish this. ! 1063: ! 1064: `LEAF_REGISTERS' ! 1065: A C initializer for a vector, indexed by hard register number, ! 1066: which contains 1 for a register that is allowable in a candidate ! 1067: for leaf function treatment. ! 1068: ! 1069: If leaf function treatment involves renumbering the registers, ! 1070: then the registers marked here should be the ones before ! 1071: renumbering--those that GNU CC would ordinarily allocate. The ! 1072: registers which will actually be used in the assembler code, after ! 1073: renumbering, should not be marked with 1 in this vector. ! 1074: ! 1075: Define this macro only if the target machine offers a way to ! 1076: optimize the treatment of leaf functions. ! 1077: ! 1078: `LEAF_REG_REMAP (REGNO)' ! 1079: A C expression whose value is the register number to which REGNO ! 1080: should be renumbered, when a function is treated as a leaf ! 1081: function. 1.1 root 1082: 1.1.1.4 ! root 1083: If REGNO is a register number which should not appear in a leaf ! 1084: function before renumbering, then the expression should yield -1, ! 1085: which will cause the compiler to abort. ! 1086: ! 1087: Define this macro only if the target machine offers a way to ! 1088: optimize the treatment of leaf functions, and registers need to be ! 1089: renumbered to do this. ! 1090: ! 1091: `REG_LEAF_ALLOC_ORDER' ! 1092: If defined, an initializer for a vector of integers, containing the ! 1093: numbers of hard registers in the order in which the GNU CC should ! 1094: prefer to use them (from most preferred to least) in a leaf ! 1095: function. If this macro is not defined, REG_ALLOC_ORDER is used ! 1096: for both non-leaf and leaf-functions. ! 1097: ! 1098: Normally, it is necessary for `FUNCTION_PROLOGUE' and ! 1099: `FUNCTION_EPILOGUE' to treat leaf functions specially. It can test the ! 1100: C variable `leaf_function' which is nonzero for leaf functions. (The ! 1101: variable `leaf_function' is defined only if `LEAF_REGISTERS' is ! 1102: defined.) 1.1 root 1103: 1104: 1.1.1.4 ! root 1105: File: gcc.info, Node: Stack Registers, Next: Obsolete Register Macros, Prev: Leaf Functions, Up: Registers 1.1 root 1106: 1.1.1.4 ! root 1107: Registers That Form a Stack ! 1108: --------------------------- ! 1109: ! 1110: There are special features to handle computers where some of the ! 1111: "registers" form a stack, as in the 80387 coprocessor for the 80386. ! 1112: Stack registers are normally written by pushing onto the stack, and are ! 1113: numbered relative to the top of the stack. ! 1114: ! 1115: Currently, GNU CC can only handle one group of stack-like registers, ! 1116: and they must be consecutively numbered. ! 1117: ! 1118: `STACK_REGS' ! 1119: Define this if the machine has any stack-like registers. ! 1120: ! 1121: `FIRST_STACK_REG' ! 1122: The number of the first stack-like register. This one is the top ! 1123: of the stack. ! 1124: ! 1125: `LAST_STACK_REG' ! 1126: The number of the last stack-like register. This one is the ! 1127: bottom of the stack. ! 1128: ! 1129: ! 1130: File: gcc.info, Node: Obsolete Register Macros, Prev: Stack Registers, Up: Registers ! 1131: ! 1132: Obsolete Macros for Controlling Register Usage ! 1133: ---------------------------------------------- 1.1 root 1134: 1.1.1.4 ! root 1135: These features do not work very well. They exist because they used ! 1136: to be required to generate correct code for the 80387 coprocessor of the ! 1137: 80386. They are no longer used by that machine description and may be ! 1138: removed in a later version of the compiler. Don't use them! ! 1139: ! 1140: `OVERLAPPING_REGNO_P (REGNO)' ! 1141: If defined, this is a C expression whose value is nonzero if hard ! 1142: register number REGNO is an overlapping register. This means a ! 1143: hard register which overlaps a hard register with a different ! 1144: number. (Such overlap is undesirable, but occasionally it allows a ! 1145: machine to be supported which otherwise could not be.) This macro ! 1146: must return nonzero for *all* the registers which overlap each ! 1147: other. GNU CC can use an overlapping register only in certain ! 1148: limited ways. It can be used for allocation within a basic block, ! 1149: and may be spilled for reloading; that is all. ! 1150: ! 1151: If this macro is not defined, it means that none of the hard ! 1152: registers overlap each other. This is the usual situation. ! 1153: ! 1154: `INSN_CLOBBERS_REGNO_P (INSN, REGNO)' ! 1155: If defined, this is a C expression whose value should be nonzero if ! 1156: the insn INSN has the effect of mysteriously clobbering the ! 1157: contents of hard register number REGNO. By "mysterious" we mean ! 1158: that the insn's RTL expression doesn't describe such an effect. ! 1159: ! 1160: If this macro is not defined, it means that no insn clobbers ! 1161: registers mysteriously. This is the usual situation; all else ! 1162: being equal, it is best for the RTL expression to show all the ! 1163: activity. ! 1164: ! 1165: `PRESERVE_DEATH_INFO_REGNO_P (REGNO)' ! 1166: If defined, this is a C expression whose value is nonzero if ! 1167: accurate `REG_DEAD' notes are needed for hard register number REGNO ! 1168: at the time of outputting the assembler code. When this is so, a ! 1169: few optimizations that take place after register allocation and ! 1170: could invalidate the death notes are not done when this register is ! 1171: involved. ! 1172: ! 1173: You would arrange to preserve death info for a register when some ! 1174: of the code in the machine description which is executed to write ! 1175: the assembler code looks at the death notes. This is necessary ! 1176: only when the actual hardware feature which GNU CC thinks of as a ! 1177: register is not actually a register of the usual sort. (It might, ! 1178: for example, be a hardware stack.) 1.1 root 1179: 1.1.1.4 ! root 1180: If this macro is not defined, it means that no death notes need to ! 1181: be preserved. This is the usual situation. 1.1 root 1182: 1183:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.