|
|
1.1.1.5 ! root 1: This is Info file gcc.info, produced by Makeinfo-1.47 from the input 1.1 root 2: file gcc.texinfo. 3: 1.1.1.4 root 4: This file documents the use and the internals of the GNU compiler. 1.1 root 5: 1.1.1.4 root 6: Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. 1.1 root 7: 1.1.1.5 ! 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: 1.1.1.4 root 12: Permission is granted to copy and distribute modified versions of 1.1 root 13: this manual under the conditions for verbatim copying, provided also 1.1.1.2 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: 1.1.1.4 root 20: Permission is granted to copy and distribute translations of this 1.1 root 21: manual into another language, under the above conditions for modified 1.1.1.2 root 22: versions, except that the sections entitled "GNU General Public 23: License" and "Protect Your Freedom--Fight `Look And Feel'" and this 1.1.1.5 ! root 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: 1.1.1.4 root 27: 28: File: gcc.info, Node: Addressing Modes, Next: Delayed Branch, Prev: Library Calls, Up: Machine Macros 29: 30: Addressing Modes 31: ================ 32: 33: `HAVE_POST_INCREMENT' 34: Define this macro if the machine supports post-increment 35: addressing. 36: 37: `HAVE_PRE_INCREMENT' 38: `HAVE_POST_DECREMENT' 39: `HAVE_PRE_DECREMENT' 40: Similar for other kinds of addressing. 41: 42: `CONSTANT_ADDRESS_P (X)' 1.1.1.5 ! root 43: A C expression that is 1 if the RTX X is a constant whose value is ! 44: an integer. This includes integers whose values are not explicitly ! 45: known, such as `symbol_ref' and `label_ref' expressions and ! 46: `const' arithmetic expressions. 1.1.1.4 root 47: 48: On most machines, this can be defined as `CONSTANT_P (X)', but a 1.1.1.5 ! root 49: few machines are more restrictive in which constant addresses are ! 50: supported. 1.1.1.4 root 51: 52: `MAX_REGS_PER_ADDRESS' 53: A number, the maximum number of registers that can appear in a 54: valid memory address. Note that it is up to you to specify a 1.1.1.5 ! root 55: value equal to the maximum number that `go_if_legitimate_address' ! 56: would ever accept. 1.1.1.4 root 57: 58: `GO_IF_LEGITIMATE_ADDRESS (MODE, X, LABEL)' 59: A C compound statement with a conditional `goto LABEL;' executed 1.1.1.5 ! root 60: if X (an RTX) is a legitimate memory address on the target machine ! 61: for a memory operand of mode MODE. 1.1.1.4 root 62: 63: It usually pays to define several simpler macros to serve as 1.1.1.5 ! root 64: subroutines for this one. Otherwise it may be too complicated to ! 65: understand. 1.1.1.4 root 66: 67: This macro must exist in two variants: a strict variant and a 1.1.1.5 ! root 68: non-strict one. The strict variant is used in the reload pass. It ! 69: must be defined so that any pseudo-register that has not been 1.1.1.4 root 70: allocated a hard register is considered a memory reference. In 1.1.1.5 ! root 71: contexts where some kind of register is required, a pseudo-register ! 72: with no hard register must be rejected. 1.1.1.4 root 73: 74: The non-strict variant is used in other passes. It must be 1.1.1.5 ! root 75: defined to accept all pseudo-registers in every context where some ! 76: kind of register is required. 1.1.1.4 root 77: 1.1.1.5 ! root 78: Compiler source files that want to use the strict variant of this ! 79: macro define the macro `REG_OK_STRICT'. You should use an `#ifdef ! 80: REG_OK_STRICT' conditional to define the strict variant in that ! 81: case and the non-strict variant otherwise. 1.1.1.4 root 82: 83: Typically among the subroutines used to define 1.1.1.5 ! root 84: `GO_IF_LEGITIMATE_ADDRESS' are subroutines to check for acceptable ! 85: registers for various purposes (one for base registers, one for ! 86: index registers, and so on). Then only these subroutine macros ! 87: need have two variants; the higher levels of macros may be the same ! 88: whether strict or not. 1.1.1.4 root 89: 90: Normally, constant addresses which are the sum of a `symbol_ref' 91: and an integer are stored inside a `const' RTX to mark them as 92: constant. Therefore, there is no need to recognize such sums as 93: legitimate addresses. 94: 1.1.1.5 ! root 95: Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant ! 96: sums that are not marked with `const'. It assumes that a naked ! 97: `plus' indicates indexing. If so, then you *must* reject such ! 98: naked constant sums as illegitimate addresses, so that none of ! 99: them will be given to `PRINT_OPERAND_ADDRESS'. 1.1.1.4 root 100: 101: `REG_OK_FOR_BASE_P (X)' 1.1.1.5 ! root 102: A C expression that is nonzero if X (assumed to be a `reg' RTX) is ! 103: valid for use as a base register. For hard registers, it should ! 104: always accept those which the hardware permits and reject the ! 105: others. Whether the macro accepts or rejects pseudo registers ! 106: must be controlled by `REG_OK_STRICT' as described above. This ! 107: usually requires two variant definitions, of which `REG_OK_STRICT' ! 108: controls the one actually used. 1.1.1.4 root 109: 110: `REG_OK_FOR_INDEX_P (X)' 1.1.1.5 ! root 111: A C expression that is nonzero if X (assumed to be a `reg' RTX) is ! 112: valid for use as an index register. 1.1.1.4 root 113: 114: The difference between an index register and a base register is 1.1.1.5 ! root 115: that the index register may be scaled. If an address involves the ! 116: sum of two registers, neither one of them scaled, then either one ! 117: may be labeled the "base" and the other the "index"; but whichever ! 118: labeling is used must fit the machine's constraints of which ! 119: registers may serve in each capacity. The compiler will try both ! 120: labelings, looking for one that is valid, and will reload one or ! 121: both registers only if neither labeling works. 1.1.1.4 root 122: 123: `LEGITIMIZE_ADDRESS (X, OLDX, MODE, WIN)' 124: A C compound statement that attempts to replace X with a valid 125: memory address for an operand of mode MODE. WIN will be a C 1.1.1.5 ! root 126: statement label elsewhere in the code; the macro definition may use 1.1.1.4 root 127: 128: GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); 129: 130: to avoid further processing if the address has become legitimate. 131: 1.1.1.5 ! root 132: X will always be the result of a call to `break_out_memory_refs', ! 133: and OLDX will be the operand that was given to that function to ! 134: produce X. ! 135: ! 136: The code generated by this macro should not alter the substructure ! 137: of X. If it transforms X into a more legitimate form, it should ! 138: assign X (which will always be a C variable) a new value. 1.1.1.4 root 139: 140: It is not necessary for this macro to come up with a legitimate 1.1.1.5 ! root 141: address. The compiler has standard ways of doing so in all cases. ! 142: In fact, it is safe for this macro to do nothing. But often a ! 143: machine-dependent strategy can generate better code. 1.1.1.4 root 144: 145: `GO_IF_MODE_DEPENDENT_ADDRESS (ADDR, LABEL)' 146: A C statement or compound statement with a conditional `goto 147: LABEL;' executed if memory address X (an RTX) can have different 1.1.1.5 ! root 148: meanings depending on the machine mode of the memory reference it ! 149: is used for. 1.1.1.4 root 150: 151: Autoincrement and autodecrement addresses typically have 152: mode-dependent effects because the amount of the increment or 153: decrement is the size of the operand being addressed. Some 1.1.1.5 ! root 154: machines have other mode-dependent addresses. Many RISC machines ! 155: have no mode-dependent addresses. 1.1.1.4 root 156: 157: You may assume that ADDR is a valid address for the machine. 158: 159: `LEGITIMATE_CONSTANT_P (X)' 160: A C expression that is nonzero if X is a legitimate constant for 161: an immediate operand on the target machine. You can assume that 1.1.1.5 ! root 162: either X is a `const_double' or it satisfies `CONSTANT_P', so you ! 163: need not check these things. In fact, `1' is a suitable ! 164: definition for this macro on machines where any `const_double' is ! 165: valid and anything `CONSTANT_P' is valid. 1.1.1.4 root 166: 167: 168: File: gcc.info, Node: Delayed Branch, Next: Condition Code, Prev: Addressing Modes, Up: Machine Macros 169: 170: Parameters for Delayed Branch Optimization 171: ========================================== 172: 173: `HAVE_DELAYED_BRANCH' 1.1.1.5 ! root 174: Define this macro if the target machine has delayed branches, that ! 175: is, a branch does not take effect immediately, and the actual ! 176: branch instruction may be followed by one or more instructions ! 177: that will be issued before the PC is actually changed. ! 178: ! 179: If defined, this allows a special scheduling pass to be run after ! 180: the second jump optimization to attempt to reorder instructions to ! 181: exploit this. Defining this macro also requires the definition of ! 182: certain other macros described below. 1.1.1.4 root 183: 184: `DBR_SLOTS_AFTER (INSN)' 1.1.1.5 ! root 185: This macro must be defined if `HAVE_DELAYED_BRANCH' is defined. 1.1.1.4 root 186: Its definition should be a C expression returning the number of 187: available delay slots following the instruction(s) output by the 1.1.1.5 ! root 188: pattern for INSN. The definition of "slot" is machine-dependent, ! 189: and may denote instructions, bytes, or whatever. 1.1.1.4 root 190: 191: `DBR_INSN_SLOTS (INSN)' 1.1.1.5 ! root 192: This macro must be defined if `HAVE_DELAYED_BRANCH' is defined. It ! 193: should be a C expression returning the number of slots (typically ! 194: the number of machine instructions) consumed by INSN. 1.1.1.4 root 195: 196: You may assume that INSN is truly an insn, not a note, label, 197: barrier, dispatch table, `use', or `clobber'. 198: 199: `DBR_INSN_ELIGIBLE_P (INSN, DINSN)' 1.1.1.5 ! root 200: A C expression whose value is non-zero if it is legitimate to put ! 201: INSN in the delay slot following DINSN. 1.1.1.4 root 202: 1.1.1.5 ! root 203: You do not need to take account of data flow considerations in the ! 204: definition of this macro, because the delayed branch optimizer ! 205: always does that. This macro is needed only when certain insns ! 206: may not be placed in certain delay slots for reasons not evident ! 207: from the RTL expressions themselves. If there are no such ! 208: problems, you don't need to define this macro. 1.1.1.4 root 209: 210: You may assume that INSN is truly an insn, not a note, label, 1.1.1.5 ! root 211: barrier, dispatch table, `use', or `clobber'. You may assume that ! 212: DINSN is a jump insn with a delay slot. 1.1.1.4 root 213: 214: `DBR_OUTPUT_SEQEND(FILE)' 215: A C statement, to be executed after all slot-filler instructions 216: have been output. If necessary, call `dbr_sequence_length' to 217: determine the number of slots filled in a sequence (zero if not 218: currently outputting a sequence), to decide how many no-ops to 219: output, or whatever. 220: 1.1.1.5 ! root 221: Don't define this macro if it has nothing to do, but it is helpful ! 222: in reading assembly output if the extent of the delay sequence is ! 223: made explicit (e.g. with white space). ! 224: ! 225: Note that output routines for instructions with delay slots must be ! 226: prepared to deal with not being output as part of a sequence (i.e. ! 227: when the scheduling pass is not run, or when no slot fillers could ! 228: be found.) The variable `final_sequence' is null when not ! 229: processing a sequence, otherwise it contains the `sequence' rtx ! 230: being output. 1.1.1.4 root 231: 232: 233: File: gcc.info, Node: Condition Code, Next: Cross-compilation, Prev: Delayed Branch, Up: Machine Macros 234: 235: Condition Code Information 236: ========================== 237: 238: The file `conditions.h' defines a variable `cc_status' to describe 1.1.1.5 ! root 239: how the condition code was computed (in case the interpretation of the ! 240: condition code depends on the instruction that it was set by). This ! 241: variable contains the RTL expressions on which the condition code is ! 242: currently based, and several standard flags. 1.1.1.4 root 243: 244: Sometimes additional machine-specific flags must be defined in the 245: machine description header file. It can also add additional 246: machine-specific information by defining `CC_STATUS_MDEP'. 247: 248: `CC_STATUS_MDEP' 249: C code for a data type which is used for declaring the `mdep' 250: component of `cc_status'. It defaults to `int'. 251: 252: `CC_STATUS_MDEP_INIT' 1.1.1.5 ! root 253: A C expression to initialize the `mdep' field to "empty". The ! 254: default definition does nothing, since most machines don't use the ! 255: field anyway. If you want to use the field, you should probably ! 256: define this macro to initialize it. 1.1.1.4 root 257: 258: `NOTICE_UPDATE_CC (EXP, INSN)' 259: A C compound statement to set the components of `cc_status' 260: appropriately for an insn INSN whose body is EXP. It is this 261: macro's responsibility to recognize insns that set the condition 262: code as a byproduct of other activity as well as those that 263: explicitly set `(cc0)'. 264: 1.1.1.5 ! root 265: If there are insn that do not set the condition code but do alter ! 266: other machine registers, this macro must check to see whether they ! 267: invalidate the expressions that the condition code is recorded as ! 268: reflecting. For example, on the 68000, insns that store in address ! 269: registers do not set the condition code, which means that usually ! 270: `NOTICE_UPDATE_CC' can leave `cc_status' unaltered for such insns. ! 271: But suppose that the previous insn set the condition code based ! 272: on location `a4@(102)' and the current insn stores a new value in ! 273: `a4'. Although the condition code is not changed by this, it will ! 274: no longer be true that it reflects the contents of `a4@(102)'. ! 275: Therefore, `NOTICE_UPDATE_CC' must alter `cc_status' in this case ! 276: to say that nothing is known about the condition code value. ! 277: ! 278: The definition of `NOTICE_UPDATE_CC' must be prepared to deal with ! 279: the results of peephole optimization: insns whose patterns are ! 280: `parallel' RTXs containing various `reg', `mem' or constants which ! 281: are just the operands. The RTL structure of these insns is not ! 282: sufficient to indicate what the insns actually do. What 1.1.1.4 root 283: `NOTICE_UPDATE_CC' should do when it sees one is just to run 284: `CC_STATUS_INIT'. 1.1 root 285: 286: 1.1.1.3 root 287: File: gcc.info, Node: Cross-compilation, Next: Misc, Prev: Condition Code, Up: Machine Macros 288: 289: Cross Compilation and Floating-Point Format 290: =========================================== 291: 1.1.1.4 root 292: While all modern machines use 2's complement representation for 1.1.1.3 root 293: integers, there are a variety of representations for floating point 294: numbers. This means that in a cross-compiler the representation of 295: floating point numbers in the compiled program may be different from 296: that used in the machine doing the compilation. 297: 1.1.1.5 ! root 298: Because different representation systems may offer different amounts ! 299: of range and precision, the cross compiler cannot safely use the host ! 300: machine's floating point arithmetic. Therefore, floating point ! 301: constants must be represented in the target machine's format. This ! 302: means that the cross compiler cannot use `atof' to parse a floating ! 303: point constant; it must have its own special routine to use instead. ! 304: Also, constant folding must emulate the target machine's arithmetic (or ! 305: must not be done at all). 1.1.1.3 root 306: 1.1.1.5 ! root 307: The macros in the following table should be defined only if you are ! 308: cross compiling between different floating point formats. 1.1.1.3 root 309: 1.1.1.4 root 310: Otherwise, don't define them. Then default definitions will be set 311: up which use `double' as the data type, `==' to test for equality, etc. 1.1.1.3 root 312: 1.1.1.4 root 313: You don't need to worry about how many times you use an operand of 1.1.1.5 ! root 314: any of these macros. The compiler never uses operands which have side ! 315: effects. 1.1.1.3 root 316: 317: `REAL_VALUE_TYPE' 318: A macro for the C data type to be used to hold a floating point 319: value in the target machine's format. Typically this would be a 320: `struct' containing an array of `int'. 321: 322: `REAL_VALUES_EQUAL (X, Y)' 323: A macro for a C expression which compares for equality the two 324: values, X and Y, both of type `REAL_VALUE_TYPE'. 325: 326: `REAL_VALUES_LESS (X, Y)' 327: A macro for a C expression which tests whether X is less than Y, 328: both values being of type `REAL_VALUE_TYPE' and interpreted as 329: floating point numbers in the target machine's representation. 330: 331: `REAL_VALUE_LDEXP (X, SCALE)' 332: A macro for a C expression which performs the standard library 333: function `ldexp', but using the target machine's floating point 1.1.1.5 ! root 334: representation. Both X and the value of the expression have type ! 335: `REAL_VALUE_TYPE'. The second argument, SCALE, is an integer. 1.1.1.3 root 336: 337: `REAL_VALUE_ATOF (STRING)' 1.1.1.5 ! root 338: A macro for a C expression which converts STRING, an expression of ! 339: type `char *', into a floating point number in the target 1.1.1.3 root 340: machine's representation. The value has type `REAL_VALUE_TYPE'. 341: 1.1.1.5 ! root 342: Define the following additional macros if you want to make floating ! 343: point constant folding work while cross compiling. If you don't define ! 344: them, cross compilation is still possible, but constant folding will ! 345: not happen for floating point values. 1.1.1.3 root 346: 347: `REAL_ARITHMETIC (OUTPUT, CODE, X, Y)' 1.1.1.5 ! root 348: A macro for a C statement which calculates an arithmetic operation ! 349: of the two floating point values X and Y, both of type 1.1.1.3 root 350: `REAL_VALUE_TYPE' in the target machine's representation, to 351: produce a result of the same type and representation which is 352: stored in OUTPUT (which will be a variable). 353: 354: The operation to be performed is specified by CODE, a tree code 355: which will always be one of the following: `PLUS_EXPR', 356: `MINUS_EXPR', `MULT_EXPR', `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'. 357: 358: The expansion of this macro is responsible for checking for 1.1.1.5 ! root 359: overflow. If overflow happens, the macro expansion should execute ! 360: the statement `return 0;', which indicates the inability to ! 361: perform the arithmetic operation requested. 1.1.1.3 root 362: 363: `REAL_VALUE_NEGATE (X)' 364: A macro for a C expression which returns the negative of the 365: floating point value X. Both X and the value of the expression 366: have type `REAL_VALUE_TYPE' and are in the target machine's 367: floating point representation. 368: 1.1.1.5 ! root 369: There is no way for this macro to report overflow, since overflow ! 370: can't happen in the negation operation. 1.1.1.3 root 371: 372: `REAL_VALUE_TO_INT (LOW, HIGH, X)' 1.1.1.5 ! root 373: A macro for a C expression which converts a floating point value X ! 374: into a double-precision integer which is then stored into LOW and ! 375: HIGH, two variables of type INT. 1.1.1.3 root 376: 377: `REAL_VALUE_FROM_INT (X, LOW, HIGH)' 378: A macro for a C expression which converts a double-precision 379: integer found in LOW and HIGH, two variables of type INT, into a 380: floating point value which is then stored into X. 381: 382: 383: File: gcc.info, Node: Misc, Next: Assembler Format, Prev: Cross-compilation, Up: Machine Macros 384: 385: Miscellaneous Parameters 386: ======================== 387: 388: `CASE_VECTOR_MODE' 389: An alias for a machine mode name. This is the machine mode that 390: elements of a jump-table should have. 391: 392: `CASE_VECTOR_PC_RELATIVE' 1.1.1.5 ! root 393: Define this macro if jump-tables should contain relative addresses. 1.1.1.3 root 394: 395: `CASE_DROPS_THROUGH' 1.1.1.5 ! root 396: Define this if control falls through a `case' insn when the index ! 397: value is out of range. This means the specified default-label is ! 398: actually ignored by the `case' insn proper. 1.1.1.3 root 399: 400: `IMPLICIT_FIX_EXPR' 401: An alias for a tree code that should be used by default for 402: conversion of floating point values to fixed point. Normally, 403: `FIX_ROUND_EXPR' is used. 404: 405: `FIXUNS_TRUNC_LIKE_FIX_TRUNC' 1.1.1.5 ! root 406: Define this macro if the same instructions that convert a floating ! 407: point number to a signed fixed point number also convert validly ! 408: to an unsigned one. 1.1.1.3 root 409: 410: `EASY_DIV_EXPR' 411: An alias for a tree code that is the easiest kind of division to 1.1.1.5 ! root 412: compile code for in the general case. It may be `TRUNC_DIV_EXPR', ! 413: `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'. These four ! 414: division operators differ in how they round the result to an ! 415: integer. `EASY_DIV_EXPR' is used when it is permissible to use ! 416: any of those kinds of division and the choice should be made on ! 417: the basis of efficiency. 1.1.1.3 root 418: 419: `DEFAULT_SIGNED_CHAR' 1.1.1.5 ! root 420: An expression whose value is 1 or 0, according to whether the type ! 421: `char' should be signed or unsigned by default. The user can ! 422: always override this default with the options `-fsigned-char' and ! 423: `-funsigned-char'. 1.1.1.3 root 424: 425: `SCCS_DIRECTIVE' 426: Define this if the preprocessor should ignore `#sccs' directives 427: and print no error message. 428: 429: `HAVE_VPRINTF' 1.1.1.5 ! root 430: Define this if the library function `vprintf' is available on your ! 431: system. 1.1.1.3 root 432: 433: `MOVE_MAX' 434: The maximum number of bytes that a single instruction can move 435: quickly from memory to memory. 436: 437: `INT_TYPE_SIZE' 438: A C expression for the size in bits of the type `int' on the 1.1.1.5 ! root 439: target machine. If you don't define this, the default is one word. 1.1.1.3 root 440: 441: `SHORT_TYPE_SIZE' 442: A C expression for the size in bits of the type `short' on the 443: target machine. If you don't define this, the default is half a 1.1.1.5 ! root 444: word. (If this would be less than one storage unit, it is rounded ! 445: up to one unit.) 1.1.1.3 root 446: 447: `LONG_TYPE_SIZE' 448: A C expression for the size in bits of the type `long' on the 1.1.1.5 ! root 449: target machine. If you don't define this, the default is one word. 1.1.1.3 root 450: 451: `LONG_LONG_TYPE_SIZE' 1.1.1.5 ! root 452: A C expression for the size in bits of the type `long long' on the ! 453: target machine. If you don't define this, the default is two ! 454: words. 1.1.1.3 root 455: 456: `CHAR_TYPE_SIZE' 457: A C expression for the size in bits of the type `char' on the 458: target machine. If you don't define this, the default is one 1.1.1.5 ! root 459: quarter of a word. (If this would be less than one storage unit, ! 460: it is rounded up to one unit.) 1.1.1.3 root 461: 462: `FLOAT_TYPE_SIZE' 463: A C expression for the size in bits of the type `float' on the 1.1.1.5 ! root 464: target machine. If you don't define this, the default is one word. 1.1.1.3 root 465: 466: `DOUBLE_TYPE_SIZE' 467: A C expression for the size in bits of the type `double' on the 468: target machine. If you don't define this, the default is two 469: words. 470: 471: `LONG_DOUBLE_TYPE_SIZE' 472: A C expression for the size in bits of the type `long double' on 1.1.1.5 ! root 473: the target machine. If you don't define this, the default is two ! 474: words. 1.1.1.3 root 475: 476: `SLOW_BYTE_ACCESS' 1.1.1.5 ! root 477: Define this macro as a C expression which is nonzero if accessing ! 478: less than a word of memory (i.e. a `char' or a `short') is slow ! 479: (requires more than one instruction). 1.1.1.3 root 480: 481: `SLOW_ZERO_EXTEND' 1.1.1.5 ! root 482: Define this macro if zero-extension (of a `char' or `short' to an ! 483: `int') can be done faster if the destination is a register that is ! 484: known to be zero. 1.1.1.3 root 485: 1.1.1.5 ! root 486: If you define this macro, you must have instruction patterns that ! 487: recognize RTL structures like this: 1.1.1.3 root 488: 489: (set (strict-low-part (subreg:QI (reg:SI ...) 0)) ...) 490: 491: and likewise for `HImode'. 492: 493: `SHIFT_COUNT_TRUNCATED' 1.1.1.5 ! root 494: Define this macro if shift instructions ignore all but the lowest ! 495: few bits of the shift count. It implies that a sign-extend or ! 496: zero-extend instruction for the shift count can be omitted. 1.1.1.3 root 497: 498: `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)' 499: A C expression which is nonzero if on this machine it is safe to 1.1.1.5 ! root 500: "convert" an integer of INPREC bits to one of OUTPREC bits (where ! 501: OUTPREC is smaller than INPREC) by merely operating on it as if it ! 502: had only OUTPREC bits. 1.1.1.3 root 503: 504: On many machines, this expression can be 1. 505: 506: `NO_FUNCTION_CSE' 507: Define this macro if it is as good or better to call a constant 508: function address than to call an address kept in a register. 509: 510: `PROMOTE_PROTOTYPES' 1.1.1.5 ! root 511: Define this macro if an argument declared as `char' or `short' in ! 512: a prototype should actually be passed as an `int'. In addition to ! 513: avoiding errors in certain cases of mismatch, it also makes for ! 514: better code on certain machines. 1.1.1.3 root 515: 516: `STORE_FLAG_VALUE' 517: A C expression for the value stored by a store-flag instruction 1.1.1.5 ! root 518: (`sCOND') when the condition is true. This is usually 1 or -1; it ! 519: is required to be an odd number or a negative number. 1.1.1.3 root 520: 1.1.1.5 ! root 521: Do not define `STORE_FLAG_VALUE' if the machine has no store-flag ! 522: instructions. 1.1.1.3 root 523: 524: `Pmode' 525: An alias for the machine mode for pointers. Normally the 526: definition can be 527: 528: #define Pmode SImode 529: 530: `FUNCTION_MODE' 531: An alias for the machine mode used for memory references to 532: functions being called, in `call' RTL expressions. On most 533: machines this should be `QImode'. 534: 535: `INSN_MACHINE_INFO' 536: This macro should expand into a C structure type to use for the 537: machine-dependent info field specified with the optional last 538: argument in `define_insn' and `define_peephole' patterns. For 1.1.1.5 ! root 539: example, it might expand into `struct machine_info'; then it would ! 540: be up to you to define this structure in the `tm.h' file. 1.1.1.3 root 541: 542: You do not need to define this macro if you do not write the 543: optional last argument in any of the patterns in the machine 544: description. 545: 546: `DEFAULT_MACHINE_INFO' 1.1.1.5 ! root 547: This macro should expand into a C initializer to use to initialize ! 548: the machine-dependent info for one insn pattern. It is used for ! 549: patterns that do not specify the machine-dependent info. 1.1.1.3 root 550: 551: If you do not define this macro, zero is used. 552: 553: `CONST_COSTS (X, CODE)' 1.1.1.5 ! root 554: A part of a C `switch' statement that describes the relative costs ! 555: of constant RTL expressions. It must contain `case' labels for ! 556: expression codes `const_int', `const', `symbol_ref', `label_ref' ! 557: and `const_double'. Each case must ultimately reach a `return' ! 558: statement to return the relative cost of the use of that kind of ! 559: constant value in an expression. The cost may depend on the ! 560: precise value of the constant, which is available for examination ! 561: in X. 1.1.1.3 root 562: 563: CODE is the expression code--redundant, since it can be obtained 564: with `GET_CODE (X)'. 565: 566: `DOLLARS_IN_IDENTIFIERS' 567: Define this to be nonzero if the character `$' should be allowed 568: by default in identifier names. 569: 570: 1.1 root 571: File: gcc.info, Node: Assembler Format, Prev: Misc, Up: Machine Macros 572: 573: Output of Assembler Code 574: ======================== 575: 576: `ASM_SPEC' 1.1.1.5 ! root 577: A C string constant that tells the GNU CC driver program options to ! 578: pass to the assembler. It can also specify how to translate ! 579: options you give to GNU CC into options for GNU CC to pass to the ! 580: assembler. See the file `tm-sun3.h' for an example of this. 1.1 root 581: 582: Do not define this macro if it does not need to do anything. 583: 584: `LINK_SPEC' 1.1.1.5 ! root 585: A C string constant that tells the GNU CC driver program options to ! 586: pass to the linker. It can also specify how to translate options ! 587: you give to GNU CC into options for GNU CC to pass to the linker. 1.1 root 588: 589: Do not define this macro if it does not need to do anything. 590: 591: `LIB_SPEC' 592: Another C string constant used much like `LINK_SPEC'. The 1.1.1.5 ! root 593: difference between the two is that `LIBS_SPEC' is used at the end ! 594: of the command given to the linker. 1.1 root 595: 1.1.1.5 ! root 596: If this macro is not defined, a default is provided that loads the ! 597: standard C library from the usual place. See `gcc.c'. 1.1 root 598: 1.1.1.4 root 599: `LIBG_SPEC' 1.1.1.5 ! root 600: Another C string constant used much like `LINK_SPEC'. This ! 601: controls whether to link `libg.a' when debugging. Some systems 1.1.1.4 root 602: expect this; others do not have any `libg.a'. 603: 1.1.1.5 ! root 604: If this macro is not defined, a default is provided that loads the ! 605: `libg.a' provided `-g' is specified. See `gcc.c'. 1.1.1.4 root 606: 1.1 root 607: `STARTFILE_SPEC' 608: Another C string constant used much like `LINK_SPEC'. The 1.1.1.5 ! root 609: difference between the two is that `STARTFILE_SPEC' is used at the ! 610: very beginning of the command given to the linker. 1.1 root 611: 1.1.1.5 ! root 612: If this macro is not defined, a default is provided that loads the ! 613: standard C startup file from the usual place. See `gcc.c'. 1.1 root 614: 615: `STANDARD_EXEC_PREFIX' 616: Define this macro as a C string constant if you wish to override 1.1.1.5 ! root 617: the standard choice of `/usr/local/lib/gcc-' as the default prefix ! 618: to try when searching for the executable files of the compiler. 1.1 root 619: 620: The prefix specified by the `-B' option, if any, is tried before 1.1.1.5 ! root 621: the default prefix. After the default prefix, if the executable is ! 622: not found that way, `/usr/lib/gcc-' is tried next; then the 1.1 root 623: directories in your search path for shell commands are searched. 624: 625: `STANDARD_STARTFILE_PREFIX' 626: Define this macro as a C string constant if you wish to override 1.1.1.5 ! root 627: the standard choice of `/usr/local/lib/' as the default prefix to ! 628: try when searching for startup files such as `crt0.o'. 1.1 root 629: 630: In this search, all the prefixes tried for executable files are 1.1.1.5 ! root 631: tried first. Then comes the default startfile prefix specified by ! 632: this macro, followed by the prefixes `/lib/' and `/usr/lib/' as ! 633: last resorts. 1.1 root 634: 635: `ASM_FILE_START (STREAM)' 636: A C expression which outputs to the stdio stream STREAM some 637: appropriate text to go at the start of an assembler file. 638: 639: Normally this macro is defined to output a line containing 640: `#NO_APP', which is a comment that has no effect on most 1.1.1.5 ! root 641: assemblers but tells the GNU assembler that it can save time by not ! 642: checking for certain assembler constructs. 1.1 root 643: 644: On systems that use SDB, it is necessary to output certain 645: commands; see `tm-attasm.h'. 646: 647: `ASM_FILE_END (STREAM)' 648: A C expression which outputs to the stdio stream STREAM some 649: appropriate text to go at the end of an assembler file. 650: 651: If this macro is not defined, the default is to output nothing 652: special at the end of the file. Most systems don't require any 653: definition. 654: 655: On systems that use SDB, it is necessary to output certain 656: commands; see `tm-attasm.h'. 657: 658: `ASM_IDENTIFY_GCC (FILE)' 1.1.1.5 ! root 659: A C statement to output assembler commands which will identify the ! 660: object file as having been compiled with GNU CC (or another GNU ! 661: compiler). 1.1 root 662: 663: If you don't define this macro, the string `gcc_compiled.:' is 664: output. This string is calculated to define a symbol which, on 1.1.1.5 ! root 665: BSD systems, will never be defined for any other reason. GDB 1.1 root 666: checks for the presence of this symbol when reading the symbol 667: table of an executable. 668: 669: On non-BSD systems, you must arrange communication with GDB in 670: some other fashion. If GDB is not used on your system, you can 671: define this macro with an empty body. 672: 673: `ASM_APP_ON' 674: A C string constant for text to be output before each `asm' 675: statement or group of consecutive ones. Normally this is 1.1.1.5 ! root 676: `"#APP"', which is a comment that has no effect on most assemblers ! 677: but tells the GNU assembler that it must check the lines that ! 678: follow for all valid assembler constructs. 1.1 root 679: 680: `ASM_APP_OFF' 681: A C string constant for text to be output after each `asm' 682: statement or group of consecutive ones. Normally this is 683: `"#NO_APP"', which tells the GNU assembler to resume making the 684: time-saving assumptions that are valid for ordinary compiler 685: output. 686: 687: `TEXT_SECTION_ASM_OP' 1.1.1.5 ! root 688: A C string constant for the assembler operation that should precede ! 689: instructions and read-only data. Normally `".text"' is right. 1.1 root 690: 691: `DATA_SECTION_ASM_OP' 692: A C string constant for the assembler operation to identify the 693: following data as writable initialized data. Normally `".data"' 694: is right. 695: 696: `EXTRA_SECTIONS' 1.1.1.5 ! root 697: A list of names for sections other than the standard two, which are ! 698: `in_text' and `in_data'. You need not define this macro on a ! 699: system with no other sections (that GCC needs to use). 1.1 root 700: 701: `EXTRA_SECTION_FUNCTIONS' 702: One or more functions to be defined in `varasm.c'. These 1.1.1.5 ! root 703: functions should do jobs analogous to those of `text_section' and ! 704: `data_section', for your additional sections. Do not define this ! 705: macro if you do not define `EXTRA_SECTIONS'. 1.1 root 706: 707: `SELECT_SECTION (EXP)' 708: A C statement or statements to switch to the appropriate section 1.1.1.5 ! root 709: for output of EXP. You can assume that EXP is either a `VAR_DECL' ! 710: node or a constant of some sort. Select the section by calling ! 711: `text_section' or one of the alternatives for other sections. ! 712: ! 713: Do not define this macro if you use only the standard two sections ! 714: and put all read-only variables and constants in the text section. 1.1 root 715: 716: `SELECT_RTX_SECTION (MODE, RTX)' 717: A C statement or statements to switch to the appropriate section 718: for output of RTX in mode MODE. You can assume that RTX is some 1.1.1.5 ! root 719: kind of constant in RTL. The argument MODE is redundant except in ! 720: the case of a `const_int' rtx. Select the section by calling 1.1 root 721: `text_section' or one of the alternatives for other sections. 722: 1.1.1.5 ! root 723: Do not define this macro if you use only the standard two sections ! 724: and put all constants in the text section. 1.1 root 725: 726: `REGISTER_NAMES' 727: A C initializer containing the assembler's names for the machine 728: registers, each one as a C string constant. This is what 729: translates register numbers in the compiler into assembler 730: language. 731: 732: `DBX_REGISTER_NUMBER (REGNO)' 733: A C expression that returns the DBX register number for the 1.1.1.5 ! root 734: compiler register number REGNO. In simple cases, the value of this ! 735: expression may be REGNO itself. But sometimes there are some ! 736: registers that the compiler knows about and DBX does not, or vice ! 737: versa. In such cases, some register may need to have one number in ! 738: the compiler and another for DBX. 1.1 root 739: 740: `DBX_DEBUGGING_INFO' 1.1.1.5 ! root 741: Define this macro if GNU CC should produce debugging output for DBX ! 742: in response to the `-g' option. 1.1 root 743: 744: `SDB_DEBUGGING_INFO' 1.1.1.5 ! root 745: Define this macro if GNU CC should produce debugging output for SDB ! 746: in response to the `-g' option. 1.1 root 747: 748: `PUT_SDB_OP' 749: Define these macros to override the assembler syntax for the 750: special SDB assembler directives. See `sdbout.c' for a list of 1.1.1.5 ! root 751: these macros and their arguments. If the standard syntax is used, ! 752: you need not define them yourself. 1.1 root 753: 754: `SDB_GENERATE_FAKE' 755: Define this macro to override the usual method of constructing a 756: dummy name for anonymous structure and union types. See 757: `sdbout.c' for more information. 758: 759: `DBX_NO_XREFS' 760: Define this macro if DBX on your system does not support the 1.1.1.5 ! root 761: construct `xsTAGNAME'. On some systems, this construct is used to ! 762: describe a forward reference to a structure named TAGNAME. On ! 763: other systems, this construct is not supported at all. 1.1 root 764: 765: `DBX_CONTIN_LENGTH' 766: A symbol name in DBX-format debugging information is normally 767: continued (split into two separate `.stabs' directives) when it 768: exceeds a certain length (by default, 80 characters). On some 769: operating systems, DBX requires this splitting; on others, 1.1.1.5 ! root 770: splitting must not be done. You can inhibit splitting by defining ! 771: this macro with the value zero. You can override the default ! 772: splitting-length by defining this macro as an expression for the ! 773: length you desire. 1.1 root 774: 775: `DBX_CONTIN_CHAR' 776: Normally continuation is indicated by adding a `\' character to 1.1.1.5 ! root 777: the end of a `.stabs' string when a continuation follows. To use ! 778: a different character instead, define this macro as a character ! 779: constant for the character you want to use. Do not define this ! 780: macro if backslash is correct for your system. 1.1 root 781: 782: `DBX_STATIC_STAB_DATA_SECTION' 783: Define this macro if it is necessary to go to the data section 784: before outputting the `.stabs' pseudo-op for a non-global static 785: variable. 786: 787: `ASM_OUTPUT_LABEL (STREAM, NAME)' 788: A C statement (sans semicolon) to output to the stdio stream 1.1.1.5 ! root 789: STREAM the assembler definition of a label named NAME. Use the 1.1 root 790: expression `assemble_name (STREAM, NAME)' to output the name 791: itself; before and after that, output the additional assembler 792: syntax for defining the name, and a newline. 793: 794: `ASM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL)' 795: A C statement (sans semicolon) to output to the stdio stream 796: STREAM any text necessary for declaring the name NAME of a 797: function which is being defined. This macro is responsible for 798: outputting the label definition (perhaps using 799: `ASM_OUTPUT_LABEL'). The argument DECL is the `FUNCTION_DECL' 800: tree node representing the function. 801: 1.1.1.5 ! root 802: If this macro is not defined, then the function name is defined in ! 803: the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). 1.1 root 804: 805: `ASM_GLOBALIZE_LABEL (STREAM, NAME)' 806: A C statement (sans semicolon) to output to the stdio stream 807: STREAM some commands that will make the label NAME global; that 1.1.1.5 ! root 808: is, available for reference from other files. Use the expression ! 809: `assemble_name (STREAM, NAME)' to output the name itself; before ! 810: and after that, output the additional assembler syntax for making ! 811: that name global, and a newline. 1.1 root 812: 813: `ASM_OUTPUT_EXTERNAL (STREAM, DECL, NAME)' 814: A C statement (sans semicolon) to output to the stdio stream 815: STREAM any text necessary for declaring the name of an external 1.1.1.5 ! root 816: symbol named NAME which is referenced in this compilation but not ! 817: defined. The value of DECL is the tree node for the declaration. 1.1 root 818: 819: This macro need not be defined if it does not need to output 1.1.1.5 ! root 820: anything. The GNU assembler and most Unix assemblers don't require ! 821: anything. 1.1 root 822: 823: `ASM_OUTPUT_LABELREF (STREAM, NAME)' 1.1.1.5 ! root 824: A C statement to output to the stdio stream STREAM a reference in ! 825: assembler syntax to a label named NAME. The character `_' should ! 826: be added to the front of the name, if that is customary on your ! 827: operating system, as it is in most Berkeley Unix systems. This ! 828: macro is used in `assemble_name'. 1.1 root 829: 830: `ASM_GENERATE_INTERNAL_LABEL (STRING, PREFIX, NUM)' 831: A C statement to store into the string STRING a label whose name 832: is made from the string PREFIX and the number NUM. 833: 834: This string, when output subsequently by `ASM_OUTPUT_LABELREF', 835: should produce the same output that `ASM_OUTPUT_INTERNAL_LABEL' 836: would produce with the same PREFIX and NUM. 837: 838: `ASM_OUTPUT_INTERNAL_LABEL (STREAM, PREFIX, NUM)' 839: A C statement to output to the stdio stream STREAM a label whose 1.1.1.5 ! root 840: name is made from the string PREFIX and the number NUM. These ! 841: labels are used for internal purposes, and there is no reason for ! 842: them to appear in the symbol table of the object file. On many ! 843: systems, the letter `L' at the beginning of a label has this ! 844: effect. The usual definition of this macro is as follows: 1.1 root 845: 846: fprintf (STREAM, "L%s%d:\n", PREFIX, NUM) 847: 848: `ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)' 849: Define this if the label before a jump-table needs to be output 850: specially. The first three arguments are the same as for 1.1.1.5 ! root 851: `ASM_OUTPUT_INTERNAL_LABEL'; the fourth argument is the jump-table ! 852: which follows (a `jump_insn' containing an `addr_vec' or ! 853: `addr_diff_vec'). 1.1 root 854: 1.1.1.5 ! root 855: This feature is used on system V to output a `swbeg' statement for ! 856: the table. 1.1 root 857: 858: If this macro is not defined, these labels are output with 859: `ASM_OUTPUT_INTERNAL_LABEL'. 860: 861: `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)' 862: Define this if something special must be output at the end of a 1.1.1.5 ! root 863: jump-table. The definition should be a C statement to be executed ! 864: after the assembler code for the table is written. It should write ! 865: the appropriate code to stdio stream STREAM. The argument TABLE ! 866: is the jump-table insn, and NUM is the label-number of the ! 867: preceding label. 1.1 root 868: 1.1.1.5 ! root 869: If this macro is not defined, nothing special is output at the end ! 870: of the jump-table. 1.1 root 871: 872: `ASM_OUTPUT_ALIGN_CODE (FILE)' 1.1.1.5 ! root 873: A C expression to output text to align the location counter in the ! 874: way that is desirable at a point in the code that is reached only ! 875: by jumping. 1.1 root 876: 877: This macro need not be defined if you don't want any special 1.1.1.5 ! root 878: alignment to be done at such a time. Most machine descriptions do ! 879: not currently define the macro. 1.1 root 880: 881: `ASM_FORMAT_PRIVATE_NAME (OUTVAR, NAME, NUMBER)' 882: A C expression to assign to OUTVAR (which is a variable of type 883: `char *') a newly allocated string made from the string NAME and 884: the number NUMBER, with some suitable punctuation added. Use 885: `alloca' to get space for the string. 886: 1.1.1.5 ! root 887: This string will be used as the argument to `ASM_OUTPUT_LABELREF' ! 888: to produce an assembler label for an internal static variable whose ! 889: name is NAME. Therefore, the string must be such as to result in ! 890: valid assembler code. The argument NUMBER is different each time ! 891: this macro is executed; it prevents conflicts between ! 892: similarly-named internal static variables in different scopes. ! 893: ! 894: Ideally this string should not be a valid C identifier, to prevent ! 895: any conflict with the user's own symbols. Most assemblers allow ! 896: periods or percent signs in assembler symbols; putting at least ! 897: one of these between the name and the number will suffice. 1.1 root 898: 899: `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)' 1.1.1.5 ! root 900: A C expression to output to STREAM some assembler code which will ! 901: push hard register number REGNO onto the stack. The code need not ! 902: be optimal, since this macro is used only when profiling. 1.1 root 903: 904: `ASM_OUTPUT_REG_POP (STREAM, REGNO)' 1.1.1.5 ! root 905: A C expression to output to STREAM some assembler code which will ! 906: pop hard register number REGNO off of the stack. The code need not ! 907: be optimal, since this macro is used only when profiling. 1.1 root 908: 909: `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, VALUE, REL)' 1.1.1.5 ! root 910: This macro should be provided on machines where the addresses in a ! 911: dispatch table are relative to the table's own address. 1.1 root 912: 913: The definition should be a C statement to output to the stdio 914: stream STREAM an assembler pseudo-instruction to generate a 915: difference between two labels. VALUE and REL are the numbers of 916: two internal labels. The definitions of these labels are output 1.1.1.5 ! root 917: using `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the ! 918: same way here. For example, 1.1 root 919: 920: fprintf (STREAM, "\t.word L%d-L%d\n", 921: VALUE, REL) 922: 923: `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)' 1.1.1.5 ! root 924: This macro should be provided on machines where the addresses in a ! 925: dispatch table are absolute. 1.1 root 926: 927: The definition should be a C statement to output to the stdio 928: stream STREAM an assembler pseudo-instruction to generate a 929: reference to a label. VALUE is the number of an internal label 1.1.1.5 ! root 930: whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'. For ! 931: example, 1.1 root 932: 933: fprintf (STREAM, "\t.word L%d\n", VALUE) 934: 935: `ASM_OUTPUT_DOUBLE (STREAM, VALUE)' 936: A C statement to output to the stdio stream STREAM an assembler 1.1.1.5 ! root 937: instruction to assemble a `double' constant whose value is VALUE. ! 938: VALUE will be a C expression of type `double'. 1.1 root 939: 940: `ASM_OUTPUT_FLOAT (STREAM, VALUE)' 941: A C statement to output to the stdio stream STREAM an assembler 1.1.1.5 ! root 942: instruction to assemble a `float' constant whose value is VALUE. ! 943: VALUE will be a C expression of type `float'. 1.1 root 944: 945: `ASM_OUTPUT_INT (STREAM, EXP)' 946: `ASM_OUTPUT_SHORT (STREAM, EXP)' 947: `ASM_OUTPUT_CHAR (STREAM, EXP)' 948: A C statement to output to the stdio stream STREAM an assembler 1.1.1.5 ! root 949: instruction to assemble a `int', `short' or `char' constant whose ! 950: value is VALUE. The argument EXP will be an RTL expression which ! 951: represents a constant value. Use `output_addr_const (STREAM, ! 952: EXP)' to output this value as an assembler expression. 1.1 root 953: 954: `ASM_OUTPUT_DOUBLE_INT (STREAM, EXP)' 955: A C statement to output to the stdio stream STREAM an assembler 1.1.1.5 ! root 956: instruction to assemble a `long long' constant whose value is EXP. ! 957: The argument EXP will be an RTL expression which represents a ! 958: constant value. It may be a `const_double' RTX, or it may be an ! 959: ordinary single-precision constant. In the latter case, you ! 960: should zero-extend it. 1.1 root 961: 962: `ASM_OUTPUT_BYTE (STREAM, VALUE)' 963: A C statement to output to the stdio stream STREAM an assembler 964: instruction to assemble a single byte containing the number VALUE. 965: 966: `ASM_OUTPUT_ASCII (STREAM, PTR, LEN)' 967: A C statement to output to the stdio stream STREAM an assembler 1.1.1.5 ! root 968: instruction to assemble a string constant containing the LEN bytes ! 969: at PTR. PTR will be a C expression of type `char *' and LEN a C ! 970: expression of type `int'. ! 971: ! 972: If the assembler has a `.ascii' pseudo-op as found in the Berkeley ! 973: Unix assembler, do not define the macro `ASM_OUTPUT_ASCII'. 1.1 root 974: 975: `ASM_OUTPUT_SKIP (STREAM, NBYTES)' 976: A C statement to output to the stdio stream STREAM an assembler 1.1.1.5 ! root 977: instruction to advance the location counter by NBYTES bytes. 1.1 root 978: NBYTES will be a C expression of type `int'. 979: 980: `ASM_OUTPUT_ALIGN (STREAM, POWER)' 981: A C statement to output to the stdio stream STREAM an assembler 1.1.1.5 ! root 982: instruction to advance the location counter to a multiple of 2 to ! 983: the POWER bytes. POWER will be a C expression of type `int'. 1.1 root 984: 985: `ASM_OUTPUT_COMMON (STREAM, NAME, SIZE, ROUNDED)' 986: A C statement (sans semicolon) to output to the stdio stream 1.1.1.5 ! root 987: STREAM the assembler definition of a common-label named NAME whose ! 988: size is SIZE bytes. The variable ROUNDED is the size rounded up ! 989: to whatever alignment the caller wants. 1.1 root 990: 991: Use the expression `assemble_name (STREAM, NAME)' to output the 992: name itself; before and after that, output the additional 993: assembler syntax for defining the name, and a newline. 994: 1.1.1.5 ! root 995: This macro controls how the assembler definitions of uninitialized ! 996: global variables are output. 1.1 root 997: 998: `ASM_OUTPUT_LOCAL (STREAM, NAME, SIZE, ROUNDED)' 999: A C statement (sans semicolon) to output to the stdio stream 1.1.1.5 ! root 1000: STREAM the assembler definition of a local-common-label named NAME ! 1001: whose size is SIZE bytes. The variable ROUNDED is the size 1.1 root 1002: rounded up to whatever alignment the caller wants. 1003: 1004: Use the expression `assemble_name (STREAM, NAME)' to output the 1005: name itself; before and after that, output the additional 1006: assembler syntax for defining the name, and a newline. 1007: 1.1.1.5 ! root 1008: This macro controls how the assembler definitions of uninitialized ! 1009: static variables are output. 1.1 root 1010: 1011: `ASM_OUTPUT_SOURCE_FILENAME (STREAM, NAME)' 1012: A C statment to output DBX or SDB debugging information which 1013: indicates that filename NAME is the current source file to the 1014: stdio stream STREAM. 1015: 1016: This macro need not be defined if the standard form of debugging 1017: information for the debugger in use is appropriate. 1018: 1019: `ASM_OUTPUT_SOURCE_LINE (STREAM, LINE)' 1.1.1.5 ! root 1020: A C statment to output DBX or SDB debugging information before code ! 1021: for line number LINE of the current source file to the stdio ! 1022: stream STREAM. 1.1 root 1023: 1024: This macro need not be defined if the standard form of debugging 1025: information for the debugger in use is appropriate. 1026: 1027: `ASM_OUTPUT_IDENT (STREAM, STRING)' 1.1.1.5 ! root 1028: A C statement to output something to the assembler file to handle a ! 1029: `#ident' directive containing the text STRING. If this macro is ! 1030: not defined, nothing is output for a `#ident' directive. 1.1 root 1031: 1032: `TARGET_BELL' 1.1.1.5 ! root 1033: A C constant expression for the integer value for escape sequence ! 1034: `\a'. 1.1 root 1035: 1036: `TARGET_BS' 1037: `TARGET_TAB' 1038: `TARGET_NEWLINE' 1.1.1.5 ! root 1039: C constant expressions for the integer values for escape sequences ! 1040: `\b', `\t' and `\n'. 1.1 root 1041: 1042: `TARGET_VT' 1043: `TARGET_FF' 1044: `TARGET_CR' 1.1.1.5 ! root 1045: C constant expressions for the integer values for escape sequences ! 1046: `\v', `\f' and `\r'. 1.1 root 1047: 1048: `ASM_OUTPUT_OPCODE (STREAM, PTR)' 1049: Define this macro if you are using an unusual assembler that 1050: requires different names for the machine instructions. 1051: 1052: The definition is a C statement or statements which output an 1053: assembler instruction opcode to the stdio stream STREAM. The 1054: macro-operand PTR is a variable of type `char *' which points to 1.1.1.2 root 1055: the opcode name in its "internal" form--the form that is written 1056: in the machine description. The definition should output the 1.1.1.5 ! root 1057: opcode name to STREAM, performing any translation you desire, and ! 1058: increment the variable PTR to point at the end of the opcode so ! 1059: that it will not be output twice. 1.1 root 1060: 1061: In fact, your macro definition may process less than the entire 1062: opcode name, or more than the opcode name; but if you want to 1063: process text that includes `%'-sequences to substitute operands, 1.1.1.5 ! root 1064: you must take care of the substitution yourself. Just be sure to ! 1065: increment PTR over whatever text should not be output normally. 1.1 root 1066: 1.1.1.5 ! root 1067: If you need to look at the operand values, they can be found as the ! 1068: elements of `recog_operand'. 1.1 root 1069: 1.1.1.5 ! root 1070: If the macro definition does nothing, the instruction is output in ! 1071: the usual way. 1.1 root 1072: 1073: `FINAL_PRESCAN_INSN (INSN, OPVEC, NOPERANDS)' 1.1.1.5 ! root 1074: If defined, a C statement to be executed just prior to the output ! 1075: of assembler code for INSN, to modify the extracted operands so ! 1076: they will be output differently. 1.1 root 1077: 1078: Here the argument OPVEC is the vector containing the operands 1079: extracted from INSN, and NOPERANDS is the number of elements of 1.1.1.5 ! root 1080: the vector which contain meaningful data for this insn. The ! 1081: contents of this vector are what will be used to convert the insn ! 1082: template into assembler code, so you can change the assembler ! 1083: output by changing the contents of the vector. ! 1084: ! 1085: This macro is useful when various assembler syntaxes share a single ! 1086: file of instruction patterns; by defining this macro differently, ! 1087: you can cause a large class of instructions to be output ! 1088: differently (such as with rearranged operands). Naturally, ! 1089: variations in assembler syntax affecting individual insn patterns ! 1090: ought to be handled by writing conditional output routines in ! 1091: those patterns. 1.1 root 1092: 1.1.1.5 ! root 1093: If this macro is not defined, it is equivalent to a null statement. 1.1 root 1094: 1095: `PRINT_OPERAND (STREAM, X, CODE)' 1096: A C compound statement to output to stdio stream STREAM the 1097: assembler syntax for an instruction operand X. X is an RTL 1098: expression. 1099: 1.1.1.5 ! root 1100: CODE is a value that can be used to specify one of several ways of ! 1101: printing the operand. It is used when identical operands must be ! 1102: printed differently depending on the context. CODE comes from the ! 1103: `%' specification that was used to request printing of the ! 1104: operand. If the specification was just `%DIGIT' then CODE is 0; ! 1105: if the specification was `%LTR DIGIT' then CODE is the ASCII code ! 1106: for LTR. 1.1 root 1107: 1108: If X is a register, this macro should print the register's name. 1.1.1.5 ! root 1109: The names can be found in an array `reg_names' whose type is `char ! 1110: *[]'. `reg_names' is initialized from `REGISTER_NAMES'. 1.1 root 1111: 1112: When the machine description has a specification `%PUNCT' (a `%' 1.1.1.5 ! root 1113: followed by a punctuation character), this macro is called with a ! 1114: null pointer for X and the punctuation character for CODE. 1.1 root 1115: 1116: `PRINT_OPERAND_PUNCT_VALID_P (CODE)' 1117: A C expression which evaluates to true if CODE is a valid 1118: punctuation character for use in the `PRINT_OPERAND' macro. If 1119: `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no 1.1.1.5 ! root 1120: punctuation characters (except for the standard one, `%') are used ! 1121: in this way. 1.1 root 1122: 1123: `PRINT_OPERAND_ADDRESS (STREAM, X)' 1124: A C compound statement to output to stdio stream STREAM the 1125: assembler syntax for an instruction operand that is a memory 1126: reference whose address is X. X is an RTL expression. 1127: 1128: `ASM_OPEN_PAREN' 1129: `ASM_CLOSE_PAREN' 1130: These macros are defined as C string constant, describing the 1.1.1.5 ! root 1131: syntax in the assembler for grouping arithmetic expressions. The ! 1132: following definitions are correct for most assemblers: 1.1 root 1133: 1134: #define ASM_OPEN_PAREN "(" 1135: #define ASM_CLOSE_PAREN ")" 1136: 1.1.1.4 root 1137:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.