|
|
1.1.1.3 ! root 1: This is Info file gcc.info, produced by Makeinfo-1.47 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.3 ! root 14: that the sections entitled "GNU General Public License" and "Boycott" ! 15: are included exactly as in the original, and provided that the entire ! 16: resulting derived work is distributed under the terms of a permission ! 17: notice identical to this one. 1.1 root 18: 19: Permission is granted to copy and distribute translations of this 20: manual into another language, under the above conditions for modified 1.1.1.3 ! root 21: versions, except that the sections entitled "GNU General Public ! 22: License" and "Boycott", and this permission notice, may be included in ! 23: translations approved by the Free Software Foundation instead of in the ! 24: original English. ! 25: ! 26: ! 27: File: gcc.info, Node: Costs, Next: Sections, Prev: Condition Code, Up: Target Macros ! 28: ! 29: Describing Relative Costs of Operations ! 30: ======================================= ! 31: ! 32: These macros let you describe the relative speed of various ! 33: operations on the target machine. ! 34: ! 35: `CONST_COSTS (X, CODE, OUTER_CODE)' ! 36: A part of a C `switch' statement that describes the relative costs ! 37: of constant RTL expressions. It must contain `case' labels for ! 38: expression codes `const_int', `const', `symbol_ref', `label_ref' ! 39: and `const_double'. Each case must ultimately reach a `return' ! 40: statement to return the relative cost of the use of that kind of ! 41: constant value in an expression. The cost may depend on the ! 42: precise value of the constant, which is available for examination ! 43: in X, and the rtx code of the expression in which it is contained, ! 44: found in OUTER_CODE. ! 45: ! 46: CODE is the expression code--redundant, since it can be obtained ! 47: with `GET_CODE (X)'. ! 48: ! 49: `RTX_COSTS (X, CODE, OUTER_CODE)' ! 50: Like `CONST_COSTS' but applies to nonconstant RTL expressions. ! 51: This can be used, for example, to indicate how costly a multiply ! 52: instruction is. In writing this macro, you can use the construct ! 53: `COSTS_N_INSNS (N)' to specify a cost equal to N fast ! 54: instructions. OUTER_CODE is the code of the expression in which X ! 55: is contained. ! 56: ! 57: This macro is optional; do not define it if the default cost ! 58: assumptions are adequate for the target machine. ! 59: ! 60: `ADDRESS_COST (ADDRESS)' ! 61: An expression giving the cost of an addressing mode that contains ! 62: ADDRESS. If not defined, the cost is computed from the ADDRESS ! 63: expression and the `CONST_COSTS' values. ! 64: ! 65: For most CISC machines, the default cost is a good approximation ! 66: of the true cost of the addressing mode. However, on RISC ! 67: machines, all instructions normally have the same length and ! 68: execution time. Hence all addresses will have equal costs. ! 69: ! 70: In cases where more than one form of an address is known, the form ! 71: with the lowest cost will be used. If multiple forms have the ! 72: same, lowest, cost, the one that is the most complex will be used. ! 73: ! 74: For example, suppose an address that is equal to the sum of a ! 75: register and a constant is used twice in the same basic block. ! 76: When this macro is not defined, the address will be computed in a ! 77: register and memory references will be indirect through that ! 78: register. On machines where the cost of the addressing mode ! 79: containing the sum is no higher than that of a simple indirect ! 80: reference, this will produce an additional instruction and ! 81: possibly require an additional register. Proper specification of ! 82: this macro eliminates this overhead for such machines. ! 83: ! 84: Similar use of this macro is made in strength reduction of loops. ! 85: ! 86: ADDRESS need not be valid as an address. In such a case, the cost ! 87: is not relevant and can be any value; invalid addresses need not be ! 88: assigned a different cost. ! 89: ! 90: On machines where an address involving more than one register is as ! 91: cheap as an address computation involving only one register, ! 92: defining `ADDRESS_COST' to reflect this can cause two registers to ! 93: be live over a region of code where only one would have been if ! 94: `ADDRESS_COST' were not defined in that manner. This effect should ! 95: be considered in the definition of this macro. Equivalent costs ! 96: should probably only be given to addresses with different numbers ! 97: of registers on machines with lots of registers. ! 98: ! 99: This macro will normally either not be defined or be defined as a ! 100: constant. ! 101: ! 102: `REGISTER_MOVE_COST (FROM, TO)' ! 103: A C expression for the cost of moving data from a register in class ! 104: FROM to one in class TO. The classes are expressed using the ! 105: enumeration values such as `GENERAL_REGS'. A value of 2 is the ! 106: default; other values are interpreted relative to that. ! 107: ! 108: It is not required that the cost always equal 2 when FROM is the ! 109: same as TO; on some machines it is expensive to move between ! 110: registers if they are not general registers. ! 111: ! 112: If reload sees an insn consisting of a single `set' between two ! 113: hard registers, and if `REGISTER_MOVE_COST' applied to their ! 114: classes returns a value of 2, reload does not check to ensure that ! 115: the constraints of the insn are met. Setting a cost of other than ! 116: 2 will allow reload to verify that the constraints are met. You ! 117: should do this if the `movM' pattern's constraints do not allow ! 118: such copying. ! 119: ! 120: `MEMORY_MOVE_COST (M)' ! 121: A C expression for the cost of moving data of mode M between a ! 122: register and memory. A value of 2 is the default; this cost is ! 123: relative to those in `REGISTER_MOVE_COST'. ! 124: ! 125: If moving between registers and memory is more expensive than ! 126: between two registers, you should define this macro to express the ! 127: relative cost. ! 128: ! 129: `BRANCH_COST' ! 130: A C expression for the cost of a branch instruction. A value of 1 ! 131: is the default; other values are interpreted relative to that. ! 132: ! 133: Here are additional macros which do not specify precise relative ! 134: costs, but only that certain actions are more expensive than GNU CC ! 135: would ordinarily expect. ! 136: ! 137: `SLOW_BYTE_ACCESS' ! 138: Define this macro as a C expression which is nonzero if accessing ! 139: less than a word of memory (i.e. a `char' or a `short') is no ! 140: faster than accessing a word of memory, i.e., if such access ! 141: require more than one instruction or if there is no difference in ! 142: cost between byte and (aligned) word loads. ! 143: ! 144: When this macro is not defined, the compiler will access a field by ! 145: finding the smallest containing object; when it is defined, a ! 146: fullword load will be used if alignment permits. Unless bytes ! 147: accesses are faster than word accesses, using word accesses is ! 148: preferable since it may eliminate subsequent memory access if ! 149: subsequent accesses occur to other fields in the same word of the ! 150: structure, but to different bytes. ! 151: ! 152: `SLOW_ZERO_EXTEND' ! 153: Define this macro if zero-extension (of a `char' or `short' to an ! 154: `int') can be done faster if the destination is a register that is ! 155: known to be zero. ! 156: ! 157: If you define this macro, you must have instruction patterns that ! 158: recognize RTL structures like this: ! 159: ! 160: (set (strict_low_part (subreg:QI (reg:SI ...) 0)) ...) ! 161: ! 162: and likewise for `HImode'. ! 163: ! 164: `SLOW_UNALIGNED_ACCESS' ! 165: Define this macro to be the value 1 if unaligned accesses have a ! 166: cost many times greater than aligned accesses, for example if they ! 167: are emulated in a trap handler. ! 168: ! 169: When this macro is non-zero, the compiler will act as if ! 170: `STRICT_ALIGNMENT' were non-zero when generating code for block ! 171: moves. This can cause significantly more instructions to be ! 172: produced. Therefore, do not set this macro non-zero if unaligned ! 173: accesses only add a cycle or two to the time for a memory access. ! 174: ! 175: If the value of this macro is always zero, it need not be defined. ! 176: ! 177: `DONT_REDUCE_ADDR' ! 178: Define this macro to inhibit strength reduction of memory ! 179: addresses. (On some machines, such strength reduction seems to do ! 180: harm rather than good.) ! 181: ! 182: `MOVE_RATIO' ! 183: The number of scalar move insns which should be generated instead ! 184: of a string move insn or a library call. Increasing the value ! 185: will always make code faster, but eventually incurs high cost in ! 186: increased code size. ! 187: ! 188: If you don't define this, a reasonable default is used. ! 189: ! 190: `NO_FUNCTION_CSE' ! 191: Define this macro if it is as good or better to call a constant ! 192: function address than to call an address kept in a register. ! 193: ! 194: `NO_RECURSIVE_FUNCTION_CSE' ! 195: Define this macro if it is as good or better for a function to call ! 196: itself with an explicit address than to call an address kept in a ! 197: register. ! 198: ! 199: ! 200: File: gcc.info, Node: Sections, Next: PIC, Prev: Costs, Up: Target Macros ! 201: ! 202: Dividing the Output into Sections (Texts, Data, ...) ! 203: ==================================================== ! 204: ! 205: An object file is divided into sections containing different types of ! 206: data. In the most common case, there are three sections: the "text ! 207: section", which holds instructions and read-only data; the "data ! 208: section", which holds initialized writable data; and the "bss section", ! 209: which holds uninitialized data. Some systems have other kinds of ! 210: sections. ! 211: ! 212: The compiler must tell the assembler when to switch sections. These ! 213: macros control what commands to output to tell the assembler this. You ! 214: can also define additional sections. ! 215: ! 216: `TEXT_SECTION_ASM_OP' ! 217: A C string constant for the assembler operation that should precede ! 218: instructions and read-only data. Normally `".text"' is right. ! 219: ! 220: `DATA_SECTION_ASM_OP' ! 221: A C string constant for the assembler operation to identify the ! 222: following data as writable initialized data. Normally `".data"' ! 223: is right. ! 224: ! 225: `SHARED_SECTION_ASM_OP' ! 226: If defined, a C string constant for the assembler operation to ! 227: identify the following data as shared data. If not defined, ! 228: `DATA_SECTION_ASM_OP' will be used. ! 229: ! 230: `INIT_SECTION_ASM_OP' ! 231: If defined, a C string constant for the assembler operation to ! 232: identify the following data as initialization code. If not ! 233: defined, GNU CC will assume such a section does not exist. ! 234: ! 235: `EXTRA_SECTIONS' ! 236: A list of names for sections other than the standard two, which are ! 237: `in_text' and `in_data'. You need not define this macro on a ! 238: system with no other sections (that GCC needs to use). ! 239: ! 240: `EXTRA_SECTION_FUNCTIONS' ! 241: One or more functions to be defined in `varasm.c'. These ! 242: functions should do jobs analogous to those of `text_section' and ! 243: `data_section', for your additional sections. Do not define this ! 244: macro if you do not define `EXTRA_SECTIONS'. ! 245: ! 246: `READONLY_DATA_SECTION' ! 247: On most machines, read-only variables, constants, and jump tables ! 248: are placed in the text section. If this is not the case on your ! 249: machine, this macro should be defined to be the name of a function ! 250: (either `data_section' or a function defined in `EXTRA_SECTIONS') ! 251: that switches to the section to be used for read-only items. ! 252: ! 253: If these items should be placed in the text section, this macro ! 254: should not be defined. ! 255: ! 256: `SELECT_SECTION (EXP, RELOC)' ! 257: A C statement or statements to switch to the appropriate section ! 258: for output of EXP. You can assume that EXP is either a `VAR_DECL' ! 259: node or a constant of some sort. RELOC indicates whether the ! 260: initial value of EXP requires link-time relocations. Select the ! 261: section by calling `text_section' or one of the alternatives for ! 262: other sections. ! 263: ! 264: Do not define this macro if you put all read-only variables and ! 265: constants in the read-only data section (usually the text section). ! 266: ! 267: `SELECT_RTX_SECTION (MODE, RTX)' ! 268: A C statement or statements to switch to the appropriate section ! 269: for output of RTX in mode MODE. You can assume that RTX is some ! 270: kind of constant in RTL. The argument MODE is redundant except in ! 271: the case of a `const_int' rtx. Select the section by calling ! 272: `text_section' or one of the alternatives for other sections. ! 273: ! 274: Do not define this macro if you put all constants in the read-only ! 275: data section. ! 276: ! 277: `JUMP_TABLES_IN_TEXT_SECTION' ! 278: Define this macro if jump tables (for `tablejump' insns) should be ! 279: output in the text section, along with the assembler instructions. ! 280: Otherwise, the readonly data section is used. ! 281: ! 282: This macro is irrelevant if there is no separate readonly data ! 283: section. ! 284: ! 285: `ENCODE_SECTION_INFO (DECL)' ! 286: Define this macro if references to a symbol must be treated ! 287: differently depending on something about the variable or function ! 288: named by the symbol (such as what section it is in). ! 289: ! 290: The macro definition, if any, is executed immediately after the ! 291: rtl for DECL has been created and stored in `DECL_RTL (DECL)'. The ! 292: value of the rtl will be a `mem' whose address is a `symbol_ref'. ! 293: ! 294: The usual thing for this macro to do is to record a flag in the ! 295: `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified ! 296: name string in the `symbol_ref' (if one bit is not enough ! 297: information). ! 298: ! 299: ! 300: File: gcc.info, Node: PIC, Next: Assembler Format, Prev: Sections, Up: Target Macros ! 301: ! 302: Position Independent Code ! 303: ========================= ! 304: ! 305: This section describes macros that help implement generation of ! 306: position independent code. Simply defining these macros is not enough ! 307: to generate valid PIC; you must also add support to the macros ! 308: `GO_IF_LEGITIMATE_ADDRESS' and `LEGITIMIZE_ADDRESS', and ! 309: `PRINT_OPERAND_ADDRESS' as well. You must modify the definition of ! 310: `movsi' to do something appropriate when the source operand contains a ! 311: symbolic address. You may also need to alter the handling of switch ! 312: statements so that they use relative addresses. ! 313: ! 314: `PIC_OFFSET_TABLE_REGNUM' ! 315: The register number of the register used to address a table of ! 316: static data addresses in memory. In some cases this register is ! 317: defined by a processor's "application binary interface" (ABI). ! 318: When this macro is defined, RTL is generated for this register ! 319: once, as with the stack pointer and frame pointer registers. If ! 320: this macro is not defined, it is up to the machine-dependent files ! 321: to allocate such a register (if necessary). ! 322: ! 323: `FINALIZE_PIC' ! 324: By generating position-independent code, when two different ! 325: programs (A and B) share a common library (libC.a), the text of ! 326: the library can be shared whether or not the library is linked at ! 327: the same address for both programs. In some of these ! 328: environments, position-independent code requires not only the use ! 329: of different addressing modes, but also special code to enable the ! 330: use of these addressing modes. ! 331: ! 332: The `FINALIZE_PIC' macro serves as a hook to emit these special ! 333: codes once the function is being compiled into assembly code, but ! 334: not before. (It is not done before, because in the case of ! 335: compiling an inline function, it would lead to multiple PIC ! 336: prologues being included in functions which used inline functions ! 337: and were compiled to assembly language.) ! 338: ! 339: ! 340: File: gcc.info, Node: Assembler Format, Next: Debugging Info, Prev: PIC, Up: Target Macros ! 341: ! 342: Defining the Output Assembler Language ! 343: ====================================== ! 344: ! 345: This section describes macros whose principal purpose is to describe ! 346: how to write instructions in assembler language--rather than what the ! 347: instructions do. ! 348: ! 349: * Menu: ! 350: ! 351: * File Framework:: Structural information for the assembler file. ! 352: * Data Output:: Output of constants (numbers, strings, addresses). ! 353: * Uninitialized Data:: Output of uninitialized variables. ! 354: * Label Output:: Output and generation of labels. ! 355: * Constructor Output:: Output of initialization and termination routines. ! 356: * Instruction Output:: Output of actual instructions. ! 357: * Dispatch Tables:: Output of jump tables. ! 358: * Alignment Output:: Pseudo ops for alignment and skipping data. ! 359: ! 360: ! 361: File: gcc.info, Node: File Framework, Next: Data Output, Up: Assembler Format ! 362: ! 363: The Overall Framework of an Assembler File ! 364: ------------------------------------------ ! 365: ! 366: `ASM_FILE_START (STREAM)' ! 367: A C expression which outputs to the stdio stream STREAM some ! 368: appropriate text to go at the start of an assembler file. ! 369: ! 370: Normally this macro is defined to output a line containing ! 371: `#NO_APP', which is a comment that has no effect on most ! 372: assemblers but tells the GNU assembler that it can save time by not ! 373: checking for certain assembler constructs. ! 374: ! 375: On systems that use SDB, it is necessary to output certain ! 376: commands; see `attasm.h'. ! 377: ! 378: `ASM_FILE_END (STREAM)' ! 379: A C expression which outputs to the stdio stream STREAM some ! 380: appropriate text to go at the end of an assembler file. ! 381: ! 382: If this macro is not defined, the default is to output nothing ! 383: special at the end of the file. Most systems don't require any ! 384: definition. ! 385: ! 386: On systems that use SDB, it is necessary to output certain ! 387: commands; see `attasm.h'. ! 388: ! 389: `ASM_IDENTIFY_GCC (FILE)' ! 390: A C statement to output assembler commands which will identify the ! 391: object file as having been compiled with GNU CC (or another GNU ! 392: compiler). ! 393: ! 394: If you don't define this macro, the string `gcc_compiled.:' is ! 395: output. This string is calculated to define a symbol which, on ! 396: BSD systems, will never be defined for any other reason. GDB ! 397: checks for the presence of this symbol when reading the symbol ! 398: table of an executable. ! 399: ! 400: On non-BSD systems, you must arrange communication with GDB in ! 401: some other fashion. If GDB is not used on your system, you can ! 402: define this macro with an empty body. ! 403: ! 404: `ASM_COMMENT_START' ! 405: A C string constant describing how to begin a comment in the target ! 406: assembler language. The compiler assumes that the comment will ! 407: end at the end of the line. ! 408: ! 409: `ASM_APP_ON' ! 410: A C string constant for text to be output before each `asm' ! 411: statement or group of consecutive ones. Normally this is ! 412: `"#APP"', which is a comment that has no effect on most assemblers ! 413: but tells the GNU assembler that it must check the lines that ! 414: follow for all valid assembler constructs. ! 415: ! 416: `ASM_APP_OFF' ! 417: A C string constant for text to be output after each `asm' ! 418: statement or group of consecutive ones. Normally this is ! 419: `"#NO_APP"', which tells the GNU assembler to resume making the ! 420: time-saving assumptions that are valid for ordinary compiler ! 421: output. ! 422: ! 423: `ASM_OUTPUT_SOURCE_FILENAME (STREAM, NAME)' ! 424: A C statement to output COFF information or DWARF debugging ! 425: information which indicates that filename NAME is the current ! 426: source file to the stdio stream STREAM. ! 427: ! 428: This macro need not be defined if the standard form of output for ! 429: the file format in use is appropriate. ! 430: ! 431: `ASM_OUTPUT_SOURCE_LINE (STREAM, LINE)' ! 432: A C statement to output DBX or SDB debugging information before ! 433: code for line number LINE of the current source file to the stdio ! 434: stream STREAM. ! 435: ! 436: This macro need not be defined if the standard form of debugging ! 437: information for the debugger in use is appropriate. ! 438: ! 439: `ASM_OUTPUT_IDENT (STREAM, STRING)' ! 440: A C statement to output something to the assembler file to handle a ! 441: `#ident' directive containing the text STRING. If this macro is ! 442: not defined, nothing is output for a `#ident' directive. ! 443: ! 444: `OBJC_PROLOGUE' ! 445: A C statement to output any assembler statements which are ! 446: required to precede any Objective C object definitions or message ! 447: sending. The statement is executed only when compiling an ! 448: Objective C program. ! 449: ! 450: ! 451: File: gcc.info, Node: Data Output, Next: Uninitialized Data, Prev: File Framework, Up: Assembler Format ! 452: ! 453: Output of Data ! 454: -------------- ! 455: ! 456: `ASM_OUTPUT_LONG_DOUBLE (STREAM, VALUE)' ! 457: `ASM_OUTPUT_DOUBLE (STREAM, VALUE)' ! 458: `ASM_OUTPUT_FLOAT (STREAM, VALUE)' ! 459: A C statement to output to the stdio stream STREAM an assembler ! 460: instruction to assemble a floating-point constant of `TFmode', ! 461: `DFmode' or `SFmode', respectively, whose value is VALUE. VALUE ! 462: will be a C expression of type `REAL_VALUE__TYPE', usually ! 463: `double'. ! 464: ! 465: `ASM_OUTPUT_QUADRUPLE_INT (STREAM, EXP)' ! 466: `ASM_OUTPUT_DOUBLE_INT (STREAM, EXP)' ! 467: `ASM_OUTPUT_INT (STREAM, EXP)' ! 468: `ASM_OUTPUT_SHORT (STREAM, EXP)' ! 469: `ASM_OUTPUT_CHAR (STREAM, EXP)' ! 470: A C statement to output to the stdio stream STREAM an assembler ! 471: instruction to assemble an integer of 16, 8, 4, 2 or 1 bytes, ! 472: respectively, whose value is VALUE. The argument EXP will be an ! 473: RTL expression which represents a constant value. Use ! 474: `output_addr_const (STREAM, EXP)' to output this value as an ! 475: assembler expression. ! 476: ! 477: For sizes larger than `UNITS_PER_WORD', if the action of a macro ! 478: would be identical to repeatedly calling the macro corresponding to ! 479: a size of `UNITS_PER_WORD', once for each word, you need not define ! 480: the macro. ! 481: ! 482: `ASM_OUTPUT_BYTE (STREAM, VALUE)' ! 483: A C statement to output to the stdio stream STREAM an assembler ! 484: instruction to assemble a single byte containing the number VALUE. ! 485: ! 486: `ASM_BYTE_OP' ! 487: A C string constant giving the pseudo-op to use for a sequence of ! 488: single-byte constants. If this macro is not defined, the default ! 489: is `"byte"'. ! 490: ! 491: `ASM_OUTPUT_ASCII (STREAM, PTR, LEN)' ! 492: A C statement to output to the stdio stream STREAM an assembler ! 493: instruction to assemble a string constant containing the LEN bytes ! 494: at PTR. PTR will be a C expression of type `char *' and LEN a C ! 495: expression of type `int'. ! 496: ! 497: If the assembler has a `.ascii' pseudo-op as found in the Berkeley ! 498: Unix assembler, do not define the macro `ASM_OUTPUT_ASCII'. ! 499: ! 500: `ASM_OUTPUT_POOL_PROLOGUE (FILE FUNNAME FUNDECL SIZE)' ! 501: A C statement to output assembler commands to define the start of ! 502: the constant pool for a function. FUNNAME is a string giving the ! 503: name of the function. Should the return type of the function be ! 504: required, it can be obtained via FUNDECL. SIZE is the size, in ! 505: bytes, of the constant pool that will be written immediately after ! 506: this call. ! 507: ! 508: If no constant-pool prefix is required, the usual case, this macro ! 509: need not be defined. ! 510: ! 511: `ASM_OUTPUT_SPECIAL_POOL_ENTRY (FILE, X, MODE, ALIGN, LABELNO, JUMPTO)' ! 512: A C statement (with or without semicolon) to output a constant in ! 513: the constant pool, if it needs special treatment. (This macro ! 514: need not do anything for RTL expressions that can be output ! 515: normally.) ! 516: ! 517: The argument FILE is the standard I/O stream to output the ! 518: assembler code on. X is the RTL expression for the constant to ! 519: output, and MODE is the machine mode (in case X is a `const_int'). ! 520: ALIGN is the required alignment for the value X; you should ! 521: output an assembler directive to force this much alignment. ! 522: ! 523: The argument LABELNO is a number to use in an internal label for ! 524: the address of this pool entry. The definition of this macro is ! 525: responsible for outputting the label definition at the proper ! 526: place. Here is how to do this: ! 527: ! 528: ASM_OUTPUT_INTERNAL_LABEL (FILE, "LC", LABELNO); ! 529: ! 530: When you output a pool entry specially, you should end with a ! 531: `goto' to the label JUMPTO. This will prevent the same pool entry ! 532: from being output a second time in the usual manner. ! 533: ! 534: You need not define this macro if it would do nothing. ! 535: ! 536: `ASM_OPEN_PAREN' ! 537: `ASM_CLOSE_PAREN' ! 538: These macros are defined as C string constant, describing the ! 539: syntax in the assembler for grouping arithmetic expressions. The ! 540: following definitions are correct for most assemblers: ! 541: ! 542: #define ASM_OPEN_PAREN "(" ! 543: #define ASM_CLOSE_PAREN ")" ! 544: ! 545: ! 546: File: gcc.info, Node: Uninitialized Data, Next: Label Output, Prev: Data Output, Up: Assembler Format ! 547: ! 548: Output of Uninitialized Variables ! 549: --------------------------------- ! 550: ! 551: Each of the macros in this section is used to do the whole job of ! 552: outputting a single uninitialized variable. ! 553: ! 554: `ASM_OUTPUT_COMMON (STREAM, NAME, SIZE, ROUNDED)' ! 555: A C statement (sans semicolon) to output to the stdio stream ! 556: STREAM the assembler definition of a common-label named NAME whose ! 557: size is SIZE bytes. The variable ROUNDED is the size rounded up ! 558: to whatever alignment the caller wants. ! 559: ! 560: Use the expression `assemble_name (STREAM, NAME)' to output the ! 561: name itself; before and after that, output the additional ! 562: assembler syntax for defining the name, and a newline. ! 563: ! 564: This macro controls how the assembler definitions of uninitialized ! 565: global variables are output. ! 566: ! 567: `ASM_OUTPUT_ALIGNED_COMMON (STREAM, NAME, SIZE, ALIGNMENT)' ! 568: Like `ASM_OUTPUT_COMMON' except takes the required alignment as a ! 569: separate, explicit argument. If you define this macro, it is used ! 570: in place of `ASM_OUTPUT_COMMON', and gives you more flexibility in ! 571: handling the required alignment of the variable. ! 572: ! 573: `ASM_OUTPUT_SHARED_COMMON (STREAM, NAME, SIZE, ROUNDED)' ! 574: If defined, it is similar to `ASM_OUTPUT_COMMON', except that it ! 575: is used when NAME is shared. If not defined, `ASM_OUTPUT_COMMON' ! 576: will be used. ! 577: ! 578: `ASM_OUTPUT_LOCAL (STREAM, NAME, SIZE, ROUNDED)' ! 579: A C statement (sans semicolon) to output to the stdio stream ! 580: STREAM the assembler definition of a local-common-label named NAME ! 581: whose size is SIZE bytes. The variable ROUNDED is the size ! 582: rounded up to whatever alignment the caller wants. ! 583: ! 584: Use the expression `assemble_name (STREAM, NAME)' to output the ! 585: name itself; before and after that, output the additional ! 586: assembler syntax for defining the name, and a newline. ! 587: ! 588: This macro controls how the assembler definitions of uninitialized ! 589: static variables are output. ! 590: ! 591: `ASM_OUTPUT_ALIGNED_LOCAL (STREAM, NAME, SIZE, ALIGNMENT)' ! 592: Like `ASM_OUTPUT_LOCAL' except takes the required alignment as a ! 593: separate, explicit argument. If you define this macro, it is used ! 594: in place of `ASM_OUTPUT_LOCAL', and gives you more flexibility in ! 595: handling the required alignment of the variable. ! 596: ! 597: `ASM_OUTPUT_SHARED_LOCAL (STREAM, NAME, SIZE, ROUNDED)' ! 598: If defined, it is similar to `ASM_OUTPUT_LOCAL', except that it is ! 599: used when NAME is shared. If not defined, `ASM_OUTPUT_LOCAL' will ! 600: be used. ! 601: ! 602: ! 603: File: gcc.info, Node: Label Output, Next: Constructor Output, Prev: Uninitialized Data, Up: Assembler Format ! 604: ! 605: Output and Generation of Labels ! 606: ------------------------------- ! 607: ! 608: `ASM_OUTPUT_LABEL (STREAM, NAME)' ! 609: A C statement (sans semicolon) to output to the stdio stream ! 610: STREAM the assembler definition of a label named NAME. Use the ! 611: expression `assemble_name (STREAM, NAME)' to output the name ! 612: itself; before and after that, output the additional assembler ! 613: syntax for defining the name, and a newline. ! 614: ! 615: `ASM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL)' ! 616: A C statement (sans semicolon) to output to the stdio stream ! 617: STREAM any text necessary for declaring the name NAME of a ! 618: function which is being defined. This macro is responsible for ! 619: outputting the label definition (perhaps using ! 620: `ASM_OUTPUT_LABEL'). The argument DECL is the `FUNCTION_DECL' ! 621: tree node representing the function. ! 622: ! 623: If this macro is not defined, then the function name is defined in ! 624: the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). ! 625: ! 626: `ASM_DECLARE_FUNCTION_SIZE (STREAM, NAME, DECL)' ! 627: A C statement (sans semicolon) to output to the stdio stream ! 628: STREAM any text necessary for declaring the size of a function ! 629: which is being defined. The argument NAME is the name of the ! 630: function. The argument DECL is the `FUNCTION_DECL' tree node ! 631: representing the function. ! 632: ! 633: If this macro is not defined, then the function size is not ! 634: defined. ! 635: ! 636: `ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL)' ! 637: A C statement (sans semicolon) to output to the stdio stream ! 638: STREAM any text necessary for declaring the name NAME of an ! 639: initialized variable which is being defined. This macro must ! 640: output the label definition (perhaps using `ASM_OUTPUT_LABEL'). ! 641: The argument DECL is the `VAR_DECL' tree node representing the ! 642: variable. ! 643: ! 644: If this macro is not defined, then the variable name is defined in ! 645: the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). ! 646: ! 647: `ASM_GLOBALIZE_LABEL (STREAM, NAME)' ! 648: A C statement (sans semicolon) to output to the stdio stream ! 649: STREAM some commands that will make the label NAME global; that ! 650: is, available for reference from other files. Use the expression ! 651: `assemble_name (STREAM, NAME)' to output the name itself; before ! 652: and after that, output the additional assembler syntax for making ! 653: that name global, and a newline. ! 654: ! 655: `ASM_OUTPUT_EXTERNAL (STREAM, DECL, NAME)' ! 656: A C statement (sans semicolon) to output to the stdio stream ! 657: STREAM any text necessary for declaring the name of an external ! 658: symbol named NAME which is referenced in this compilation but not ! 659: defined. The value of DECL is the tree node for the declaration. ! 660: ! 661: This macro need not be defined if it does not need to output ! 662: anything. The GNU assembler and most Unix assemblers don't require ! 663: anything. ! 664: ! 665: `ASM_OUTPUT_EXTERNAL_LIBCALL (STREAM, SYMREF)' ! 666: A C statement (sans semicolon) to output on STREAM an assembler ! 667: pseudo-op to declare a library function name external. The name ! 668: of the library function is given by SYMREF, which has type `rtx' ! 669: and is a `symbol_ref'. ! 670: ! 671: This macro need not be defined if it does not need to output ! 672: anything. The GNU assembler and most Unix assemblers don't require ! 673: anything. ! 674: ! 675: `ASM_OUTPUT_LABELREF (STREAM, NAME)' ! 676: A C statement (sans semicolon) to output to the stdio stream ! 677: STREAM a reference in assembler syntax to a label named NAME. ! 678: This should add `_' to the front of the name, if that is customary ! 679: on your operating system, as it is in most Berkeley Unix systems. ! 680: This macro is used in `assemble_name'. ! 681: ! 682: `ASM_OUTPUT_LABELREF_AS_INT (FILE, LABEL)' ! 683: Define this macro for systems that use the program `collect2'. The ! 684: definition should be a C statement to output a word containing a ! 685: reference to the label LABEL. ! 686: ! 687: `ASM_OUTPUT_INTERNAL_LABEL (STREAM, PREFIX, NUM)' ! 688: A C statement to output to the stdio stream STREAM a label whose ! 689: name is made from the string PREFIX and the number NUM. ! 690: ! 691: It is absolutely essential that these labels be distinct from the ! 692: labels used for user-level functions and variables. Otherwise, ! 693: certain programs will have name conflicts with internal labels. ! 694: ! 695: It is desirable to exclude internal labels from the symbol table ! 696: of the object file. Most assemblers have a naming convention for ! 697: labels that should be excluded; on many systems, the letter `L' at ! 698: the beginning of a label has this effect. You should find out what ! 699: convention your system uses, and follow it. ! 700: ! 701: The usual definition of this macro is as follows: ! 702: ! 703: fprintf (STREAM, "L%s%d:\n", PREFIX, NUM) ! 704: ! 705: `ASM_GENERATE_INTERNAL_LABEL (STRING, PREFIX, NUM)' ! 706: A C statement to store into the string STRING a label whose name ! 707: is made from the string PREFIX and the number NUM. ! 708: ! 709: This string, when output subsequently by `assemble_name', should ! 710: produce the same output that `ASM_OUTPUT_INTERNAL_LABEL' would ! 711: produce with the same PREFIX and NUM. ! 712: ! 713: If the string begins with `*', then `assemble_name' will output ! 714: the rest of the string unchanged. It is often convenient for ! 715: `ASM_GENERATE_INTERNAL_LABEL' to use `*' in this way. If the ! 716: string doesn't start with `*', then `ASM_OUTPUT_LABELREF' gets to ! 717: output the string, and may change it. (Of course, ! 718: `ASM_OUTPUT_LABELREF' is also part of your machine description, so ! 719: you should know what it does on your machine.) ! 720: ! 721: `ASM_FORMAT_PRIVATE_NAME (OUTVAR, NAME, NUMBER)' ! 722: A C expression to assign to OUTVAR (which is a variable of type ! 723: `char *') a newly allocated string made from the string NAME and ! 724: the number NUMBER, with some suitable punctuation added. Use ! 725: `alloca' to get space for the string. ! 726: ! 727: This string will be used as the argument to `ASM_OUTPUT_LABELREF' ! 728: to produce an assembler label for an internal static variable whose ! 729: name is NAME. Therefore, the string must be such as to result in ! 730: valid assembler code. The argument NUMBER is different each time ! 731: this macro is executed; it prevents conflicts between ! 732: similarly-named internal static variables in different scopes. ! 733: ! 734: Ideally this string should not be a valid C identifier, to prevent ! 735: any conflict with the user's own symbols. Most assemblers allow ! 736: periods or percent signs in assembler symbols; putting at least ! 737: one of these between the name and the number will suffice. ! 738: ! 739: `OBJC_GEN_METHOD_LABEL (BUF, IS_INST, CLASS_NAME, CAT_NAME, SEL_NAME)' ! 740: Define this macro to override the default assembler names used for ! 741: Objective C methods. ! 742: ! 743: The default name is a unique method number followed by the name of ! 744: the class (e.g. `_1_Foo'). For methods in categories, the name of ! 745: the category is also included in the assembler name (e.g. ! 746: `_1_Foo_Bar'). ! 747: ! 748: These names are safe on most systems, but make debugging difficult ! 749: since the method's selector is not present in the name. ! 750: Therefore, particular systems define other ways of computing names. ! 751: ! 752: BUF is an expression of type `char *' which gives you a buffer in ! 753: which to store the name; its length is as long as CLASS_NAME, ! 754: CAT_NAME and SEL_NAME put together, plus 50 characters extra. ! 755: ! 756: The argument IS_INST specifies whether the method is an instance ! 757: method or a class method; CLASS_NAME is the name of the class; ! 758: CAT_NAME is the name of the category (or NULL if the method is not ! 759: in a category); and SEL_NAME is the name of the selector. ! 760: ! 761: On systems where the assembler can handle quoted names, you can ! 762: use this macro to provide more human-readable names. ! 763: ! 764: ! 765: File: gcc.info, Node: Constructor Output, Next: Instruction Output, Prev: Label Output, Up: Assembler Format ! 766: ! 767: Output of Initialization Routines ! 768: --------------------------------- ! 769: ! 770: The compiled code for certain languages includes "constructors" ! 771: (also called "initialization routines")--functions to initialize data ! 772: in the program when the program is started. These functions need to be ! 773: called before the program is "started"--that is to say, before `main' ! 774: is called. ! 775: ! 776: Compiling some languages generates "destructors" (also called ! 777: "termination routines") that should be called when the program ! 778: terminates. ! 779: ! 780: To make the initialization and termination functions work, the ! 781: compiler must output something in the assembler code to cause those ! 782: functions to be called at the appropriate time. When you port the ! 783: compiler to a new system, you need to specify what assembler code is ! 784: needed to do this. ! 785: ! 786: Here are the two macros you should define if necessary: ! 787: ! 788: `ASM_OUTPUT_CONSTRUCTOR (STREAM, NAME)' ! 789: Define this macro as a C statement to output on the stream STREAM ! 790: the assembler code to arrange to call the function named NAME at ! 791: initialization time. ! 792: ! 793: Assume that NAME is the name of a C function generated ! 794: automatically by the compiler. This function takes no arguments. ! 795: Use the function `assemble_name' to output the name NAME; this ! 796: performs any system-specific syntactic transformations such as ! 797: adding an underscore. ! 798: ! 799: If you don't define this macro, nothing special is output to ! 800: arrange to call the function. This is correct when the function ! 801: will be called in some other manner--for example, by means of the ! 802: `collect' program, which looks through the symbol table to find ! 803: these functions by their names. If you want to use `collect', ! 804: then you need to arrange for it to be built and installed and used ! 805: on your system. ! 806: ! 807: `ASM_OUTPUT_DESTRUCTOR (STREAM, NAME)' ! 808: This is like `ASM_OUTPUT_CONSTRUCTOR' but used for termination ! 809: functions rather than initialization functions. ! 810: ! 811: If your system uses `collect2' as the means of processing ! 812: constructors, then that program normally uses `nm' to scan an object ! 813: file for constructor functions to be called. On certain kinds of ! 814: systems, you can define these macros to make `collect2' work faster ! 815: (and, in some cases, make it work at all): ! 816: ! 817: `OBJECT_FORMAT_COFF' ! 818: Define this macro if the system uses COFF (Common Object File ! 819: Format) object files, so that `collect2' can assume this format ! 820: and scan object files directly for dynamic constructor/destructor ! 821: functions. ! 822: ! 823: `OBJECT_FORMAT_ROSE' ! 824: Define this macro if the system uses ROSE format object files, so ! 825: that `collect2' can assume this format and scan object files ! 826: directly for dynamic constructor/destructor functions. ! 827: ! 828: These macros are effective only in a native compiler; `collect2' as ! 829: part of a cross compiler always uses `nm'. ! 830: ! 831: `REAL_NM_FILE_NAME' ! 832: Define this macro as a C string constant containing the file name ! 833: to use to execute `nm'. The default is to search the path ! 834: normally for `nm'. ! 835: ! 836: ! 837: File: gcc.info, Node: Instruction Output, Next: Dispatch Tables, Prev: Constructor Output, Up: Assembler Format ! 838: ! 839: Output of Assembler Instructions ! 840: -------------------------------- ! 841: ! 842: `REGISTER_NAMES' ! 843: A C initializer containing the assembler's names for the machine ! 844: registers, each one as a C string constant. This is what ! 845: translates register numbers in the compiler into assembler ! 846: language. ! 847: ! 848: `ADDITIONAL_REGISTER_NAMES' ! 849: If defined, a C initializer for an array of structures containing ! 850: a name and a register number. This macro defines additional names ! 851: for hard registers, thus allowing the `asm' option in declarations ! 852: to refer to registers using alternate names. ! 853: ! 854: `ASM_OUTPUT_OPCODE (STREAM, PTR)' ! 855: Define this macro if you are using an unusual assembler that ! 856: requires different names for the machine instructions. ! 857: ! 858: The definition is a C statement or statements which output an ! 859: assembler instruction opcode to the stdio stream STREAM. The ! 860: macro-operand PTR is a variable of type `char *' which points to ! 861: the opcode name in its "internal" form--the form that is written ! 862: in the machine description. The definition should output the ! 863: opcode name to STREAM, performing any translation you desire, and ! 864: increment the variable PTR to point at the end of the opcode so ! 865: that it will not be output twice. ! 866: ! 867: In fact, your macro definition may process less than the entire ! 868: opcode name, or more than the opcode name; but if you want to ! 869: process text that includes `%'-sequences to substitute operands, ! 870: you must take care of the substitution yourself. Just be sure to ! 871: increment PTR over whatever text should not be output normally. ! 872: ! 873: If you need to look at the operand values, they can be found as the ! 874: elements of `recog_operand'. ! 875: ! 876: If the macro definition does nothing, the instruction is output in ! 877: the usual way. ! 878: ! 879: `FINAL_PRESCAN_INSN (INSN, OPVEC, NOPERANDS)' ! 880: If defined, a C statement to be executed just prior to the output ! 881: of assembler code for INSN, to modify the extracted operands so ! 882: they will be output differently. ! 883: ! 884: Here the argument OPVEC is the vector containing the operands ! 885: extracted from INSN, and NOPERANDS is the number of elements of ! 886: the vector which contain meaningful data for this insn. The ! 887: contents of this vector are what will be used to convert the insn ! 888: template into assembler code, so you can change the assembler ! 889: output by changing the contents of the vector. ! 890: ! 891: This macro is useful when various assembler syntaxes share a single ! 892: file of instruction patterns; by defining this macro differently, ! 893: you can cause a large class of instructions to be output ! 894: differently (such as with rearranged operands). Naturally, ! 895: variations in assembler syntax affecting individual insn patterns ! 896: ought to be handled by writing conditional output routines in ! 897: those patterns. ! 898: ! 899: If this macro is not defined, it is equivalent to a null statement. ! 900: ! 901: `PRINT_OPERAND (STREAM, X, CODE)' ! 902: A C compound statement to output to stdio stream STREAM the ! 903: assembler syntax for an instruction operand X. X is an RTL ! 904: expression. ! 905: ! 906: CODE is a value that can be used to specify one of several ways of ! 907: printing the operand. It is used when identical operands must be ! 908: printed differently depending on the context. CODE comes from the ! 909: `%' specification that was used to request printing of the ! 910: operand. If the specification was just `%DIGIT' then CODE is 0; ! 911: if the specification was `%LTR DIGIT' then CODE is the ASCII code ! 912: for LTR. ! 913: ! 914: If X is a register, this macro should print the register's name. ! 915: The names can be found in an array `reg_names' whose type is `char ! 916: *[]'. `reg_names' is initialized from `REGISTER_NAMES'. ! 917: ! 918: When the machine description has a specification `%PUNCT' (a `%' ! 919: followed by a punctuation character), this macro is called with a ! 920: null pointer for X and the punctuation character for CODE. ! 921: ! 922: `PRINT_OPERAND_PUNCT_VALID_P (CODE)' ! 923: A C expression which evaluates to true if CODE is a valid ! 924: punctuation character for use in the `PRINT_OPERAND' macro. If ! 925: `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no ! 926: punctuation characters (except for the standard one, `%') are used ! 927: in this way. ! 928: ! 929: `PRINT_OPERAND_ADDRESS (STREAM, X)' ! 930: A C compound statement to output to stdio stream STREAM the ! 931: assembler syntax for an instruction operand that is a memory ! 932: reference whose address is X. X is an RTL expression. ! 933: ! 934: On some machines, the syntax for a symbolic address depends on the ! 935: section that the address refers to. On these machines, define the ! 936: macro `ENCODE_SECTION_INFO' to store the information into the ! 937: `symbol_ref', and then check for it here. *Note Assembler ! 938: Format::. ! 939: ! 940: `DBR_OUTPUT_SEQEND(FILE)' ! 941: A C statement, to be executed after all slot-filler instructions ! 942: have been output. If necessary, call `dbr_sequence_length' to ! 943: determine the number of slots filled in a sequence (zero if not ! 944: currently outputting a sequence), to decide how many no-ops to ! 945: output, or whatever. ! 946: ! 947: Don't define this macro if it has nothing to do, but it is helpful ! 948: in reading assembly output if the extent of the delay sequence is ! 949: made explicit (e.g. with white space). ! 950: ! 951: Note that output routines for instructions with delay slots must be ! 952: prepared to deal with not being output as part of a sequence (i.e. ! 953: when the scheduling pass is not run, or when no slot fillers could ! 954: be found.) The variable `final_sequence' is null when not ! 955: processing a sequence, otherwise it contains the `sequence' rtx ! 956: being output. ! 957: ! 958: `REGISTER_PREFIX' ! 959: `LOCAL_LABEL_PREFIX' ! 960: `USER_LABEL_PREFIX' ! 961: `IMMEDIATE_PREFIX' ! 962: If defined, C string expressions to be used for the `%R', `%L', ! 963: `%U', and `%I' options of `asm_fprintf' (see `final.c'). These ! 964: are useful when a single `md' file must support multiple assembler ! 965: formats. In that case, the various `tm.h' files can define these ! 966: macros differently. ! 967: ! 968: `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)' ! 969: A C expression to output to STREAM some assembler code which will ! 970: push hard register number REGNO onto the stack. The code need not ! 971: be optimal, since this macro is used only when profiling. ! 972: ! 973: `ASM_OUTPUT_REG_POP (STREAM, REGNO)' ! 974: A C expression to output to STREAM some assembler code which will ! 975: pop hard register number REGNO off of the stack. The code need not ! 976: be optimal, since this macro is used only when profiling. ! 977: ! 978: ! 979: File: gcc.info, Node: Dispatch Tables, Next: Alignment Output, Prev: Instruction Output, Up: Assembler Format ! 980: ! 981: Output of Dispatch Tables ! 982: ------------------------- ! 983: ! 984: `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, VALUE, REL)' ! 985: This macro should be provided on machines where the addresses in a ! 986: dispatch table are relative to the table's own address. ! 987: ! 988: The definition should be a C statement to output to the stdio ! 989: stream STREAM an assembler pseudo-instruction to generate a ! 990: difference between two labels. VALUE and REL are the numbers of ! 991: two internal labels. The definitions of these labels are output ! 992: using `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the ! 993: same way here. For example, ! 994: ! 995: fprintf (STREAM, "\t.word L%d-L%d\n", ! 996: VALUE, REL) ! 997: ! 998: `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)' ! 999: This macro should be provided on machines where the addresses in a ! 1000: dispatch table are absolute. ! 1001: ! 1002: The definition should be a C statement to output to the stdio ! 1003: stream STREAM an assembler pseudo-instruction to generate a ! 1004: reference to a label. VALUE is the number of an internal label ! 1005: whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'. For ! 1006: example, ! 1007: ! 1008: fprintf (STREAM, "\t.word L%d\n", VALUE) ! 1009: ! 1010: `ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)' ! 1011: Define this if the label before a jump-table needs to be output ! 1012: specially. The first three arguments are the same as for ! 1013: `ASM_OUTPUT_INTERNAL_LABEL'; the fourth argument is the jump-table ! 1014: which follows (a `jump_insn' containing an `addr_vec' or ! 1015: `addr_diff_vec'). ! 1016: ! 1017: This feature is used on system V to output a `swbeg' statement for ! 1018: the table. ! 1019: ! 1020: If this macro is not defined, these labels are output with ! 1021: `ASM_OUTPUT_INTERNAL_LABEL'. ! 1022: ! 1023: `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)' ! 1024: Define this if something special must be output at the end of a ! 1025: jump-table. The definition should be a C statement to be executed ! 1026: after the assembler code for the table is written. It should write ! 1027: the appropriate code to stdio stream STREAM. The argument TABLE ! 1028: is the jump-table insn, and NUM is the label-number of the ! 1029: preceding label. ! 1030: ! 1031: If this macro is not defined, nothing special is output at the end ! 1032: of the jump-table. ! 1033: ! 1034: ! 1035: File: gcc.info, Node: Alignment Output, Prev: Dispatch Tables, Up: Assembler Format ! 1036: ! 1037: Assembler Commands for Alignment ! 1038: -------------------------------- ! 1039: ! 1040: `ASM_OUTPUT_ALIGN_CODE (FILE)' ! 1041: A C expression to output text to align the location counter in the ! 1042: way that is desirable at a point in the code that is reached only ! 1043: by jumping. ! 1044: ! 1045: This macro need not be defined if you don't want any special ! 1046: alignment to be done at such a time. Most machine descriptions do ! 1047: not currently define the macro. ! 1048: ! 1049: `ASM_OUTPUT_LOOP_ALIGN (FILE)' ! 1050: A C expression to output text to align the location counter in the ! 1051: way that is desirable at the beginning of a loop. ! 1052: ! 1053: This macro need not be defined if you don't want any special ! 1054: alignment to be done at such a time. Most machine descriptions do ! 1055: not currently define the macro. ! 1056: ! 1057: `ASM_OUTPUT_SKIP (STREAM, NBYTES)' ! 1058: A C statement to output to the stdio stream STREAM an assembler ! 1059: instruction to advance the location counter by NBYTES bytes. Those ! 1060: bytes should be zero when loaded. NBYTES will be a C expression ! 1061: of type `int'. ! 1062: ! 1063: `ASM_NO_SKIP_IN_TEXT' ! 1064: Define this macro if `ASM_OUTPUT_SKIP' should not be used in the ! 1065: text section because it fails put zeros in the bytes that are ! 1066: skipped. This is true on many Unix systems, where the pseudo--op ! 1067: to skip bytes produces no-op instructions rather than zeros when ! 1068: used in the text section. ! 1069: ! 1070: `ASM_OUTPUT_ALIGN (STREAM, POWER)' ! 1071: A C statement to output to the stdio stream STREAM an assembler ! 1072: command to advance the location counter to a multiple of 2 to the ! 1073: POWER bytes. POWER will be a C expression of type `int'. 1.1 root 1074: 1075: 1.1.1.2 root 1076: File: gcc.info, Node: Debugging Info, Next: Cross-compilation, Prev: Assembler Format, Up: Target Macros 1077: 1078: Controlling Debugging Information Format 1079: ======================================== 1080: 1.1.1.3 ! root 1081: * Menu: ! 1082: ! 1083: * All Debuggers:: Macros that affect all debugging formats uniformly. ! 1084: * DBX Options:: Macros enabling specific options in DBX format. ! 1085: * DBX Hooks:: Hook macros for varying DBX format. ! 1086: * File Names and DBX:: Macros controlling output of file names in DBX format. ! 1087: * SDB and DWARF:: Macros for SDB (COFF) and DWARF formats. ! 1088: ! 1089: ! 1090: File: gcc.info, Node: All Debuggers, Next: DBX Options, Up: Debugging Info ! 1091: ! 1092: Macros Affecting All Debugging Formats ! 1093: -------------------------------------- ! 1094: 1.1.1.2 root 1095: `DBX_REGISTER_NUMBER (REGNO)' 1096: A C expression that returns the DBX register number for the 1.1.1.3 ! root 1097: compiler register number REGNO. In simple cases, the value of this ! 1098: expression may be REGNO itself. But sometimes there are some 1.1.1.2 root 1099: registers that the compiler knows about and DBX does not, or vice 1.1.1.3 ! root 1100: versa. In such cases, some register may need to have one number in ! 1101: the compiler and another for DBX. 1.1.1.2 root 1102: 1103: If two registers have consecutive numbers inside GNU CC, and they 1104: can be used as a pair to hold a multiword value, then they *must* 1105: have consecutive numbers after renumbering with 1.1.1.3 ! root 1106: `DBX_REGISTER_NUMBER'. Otherwise, debuggers will be unable to 1.1.1.2 root 1107: access such a pair, because they expect register pairs to be 1108: consecutive in their own numbering scheme. 1109: 1110: If you find yourself defining `DBX_REGISTER_NUMBER' in way that 1111: does not preserve register pairs, then what you must do instead is 1112: redefine the actual register numbering scheme. 1113: 1114: `DEBUGGER_AUTO_OFFSET (X)' 1115: A C expression that returns the integer offset value for an 1116: automatic variable having address X (an RTL expression). The 1117: default computation assumes that X is based on the frame-pointer 1.1.1.3 ! root 1118: and gives the offset from the frame-pointer. This is required for ! 1119: targets that produce debugging output for DBX or COFF-style 1.1.1.2 root 1120: debugging output for SDB and allow the frame-pointer to be 1121: eliminated when the `-g' options is used. 1122: 1123: `DEBUGGER_ARG_OFFSET (OFFSET, X)' 1124: A C expression that returns the integer offset value for an 1.1.1.3 ! root 1125: argument having address X (an RTL expression). The nominal offset ! 1126: is OFFSET. 1.1 root 1127: 1128:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.