|
|
1.1.1.2 ! root 1: This is Info file gcc.info, produced by Makeinfo-1.44 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: 8: Permission is granted to make and distribute verbatim copies of 9: this manual provided the copyright notice and this permission notice 10: are preserved on all copies. 11: 12: Permission is granted to copy and distribute modified versions of 13: this manual under the conditions for verbatim copying, provided also 14: that the section entitled "GNU General Public License" is included 15: exactly as in the original, and provided that the entire resulting 16: derived work is distributed under the terms of a permission notice 17: identical to this one. 18: 19: Permission is granted to copy and distribute translations of this 20: manual into another language, under the above conditions for modified 21: versions, except that the section entitled "GNU General Public 22: License" and this permission notice may be included in translations 23: approved by the Free Software Foundation instead of in the original 24: English. 25: 26: 1.1.1.2 ! root 27: File: gcc.info, Node: Debugging Info, Next: Cross-compilation, Prev: Assembler Format, Up: Target Macros ! 28: ! 29: Controlling Debugging Information Format ! 30: ======================================== ! 31: ! 32: `DBX_REGISTER_NUMBER (REGNO)' ! 33: A C expression that returns the DBX register number for the ! 34: compiler register number REGNO. In simple cases, the value of ! 35: this expression may be REGNO itself. But sometimes there are some ! 36: registers that the compiler knows about and DBX does not, or vice ! 37: versa. In such cases, some register may need to have one number ! 38: in the compiler and another for DBX. ! 39: ! 40: If two registers have consecutive numbers inside GNU CC, and they ! 41: can be used as a pair to hold a multiword value, then they *must* ! 42: have consecutive numbers after renumbering with ! 43: `DBX_REGISTER_NUMBER'. Otherwise, debuggers will be unable to ! 44: access such a pair, because they expect register pairs to be ! 45: consecutive in their own numbering scheme. ! 46: ! 47: If you find yourself defining `DBX_REGISTER_NUMBER' in way that ! 48: does not preserve register pairs, then what you must do instead is ! 49: redefine the actual register numbering scheme. ! 50: ! 51: `DBX_DEBUGGING_INFO' ! 52: Define this macro if GNU CC should produce debugging output for ! 53: DBX in response to the `-g' option. ! 54: ! 55: `SDB_DEBUGGING_INFO' ! 56: Define this macro if GNU CC should produce COFF-style debugging ! 57: output for SDB in response to the `-g' option. ! 58: ! 59: `DWARF_DEBUGGING_INFO' ! 60: Define this macro if GNU CC should produce dwarf format debugging ! 61: output in response to the `-g' option. ! 62: ! 63: `XCOFF_DEBUGGING_INFO' ! 64: Define this macro if GNU CC should produce XCOFF format debugging ! 65: output in response to the `-g' option. ! 66: ! 67: `DEFAULT_GDB_EXTENSIONS' ! 68: Define this macro to control whether GNU CC should by default ! 69: generate GDB's extended version of DBX debugging information ! 70: (assuming DBX-format debugging information is enabled at all). ! 71: If you don't define the macro, the default is 1: always generate ! 72: the extended information. ! 73: ! 74: `DEBUG_SYMS_TEXT' ! 75: Define this macro if all `.stabs' commands should be output while ! 76: in the text section. ! 77: ! 78: `DEBUGGER_AUTO_OFFSET (X)' ! 79: A C expression that returns the integer offset value for an ! 80: automatic variable having address X (an RTL expression). The ! 81: default computation assumes that X is based on the frame-pointer ! 82: and gives the offset from the frame-pointer. This is required ! 83: for targets that produce debugging output for DBX or COFF-style ! 84: debugging output for SDB and allow the frame-pointer to be ! 85: eliminated when the `-g' options is used. ! 86: ! 87: `DEBUGGER_ARG_OFFSET (OFFSET, X)' ! 88: A C expression that returns the integer offset value for an ! 89: argument having address X (an RTL expression). The nominal ! 90: offset is OFFSET. ! 91: ! 92: `ASM_STABS_OP' ! 93: A C string constant naming the assembler pseudo op to use instead ! 94: of `.stabs' to define an ordinary debugging symbol. If you don't ! 95: define this macro, `.stabs' is used. This macro applies only to ! 96: DBX debugging information format. ! 97: ! 98: `ASM_STABD_OP' ! 99: A C string constant naming the assembler pseudo op to use instead ! 100: of `.stabd' to define a debugging symbol whose value is the ! 101: current location. If you don't define this macro, `.stabd' is ! 102: used. This macro applies only to DBX debugging information ! 103: format. ! 104: ! 105: `ASM_STABN_OP' ! 106: A C string constant naming the assembler pseudo op to use instead ! 107: of `.stabn' to define a debugging symbol with no name. If you ! 108: don't define this macro, `.stabn' is used. This macro applies ! 109: only to DBX debugging information format. ! 110: ! 111: `PUT_SDB_...' ! 112: Define these macros to override the assembler syntax for the ! 113: special SDB assembler directives. See `sdbout.c' for a list of ! 114: these macros and their arguments. If the standard syntax is ! 115: used, you need not define them yourself. ! 116: ! 117: `SDB_DELIM' ! 118: Some assemblers do not support a semicolon as a delimiter, even ! 119: between SDB assembler directives. In that case, define this ! 120: macro to be the delimiter to use (usually `\n'). It is not ! 121: necessary to define a new set of `PUT_SDB_OP' macros if this is ! 122: the only change required. ! 123: ! 124: `SDB_GENERATE_FAKE' ! 125: Define this macro to override the usual method of constructing a ! 126: dummy name for anonymous structure and union types. See ! 127: `sdbout.c' for more information. ! 128: ! 129: `SDB_ALLOW_UNKNOWN_REFERENCES' ! 130: Define this macro to allow references to unknown structure, ! 131: union, or enumeration tags to be emitted. Standard COFF does not ! 132: allow handling of unknown references, MIPS ECOFF has support for ! 133: it. ! 134: ! 135: `SDB_ALLOW_FORWARD_REFERENCES' ! 136: Define this macro to allow references to structure, union, or ! 137: enumeration tags that have not yet been seen to be handled. Some ! 138: assemblers choke if forward tags are used, while some require it. ! 139: ! 140: `DBX_NO_XREFS' ! 141: Define this macro if DBX on your system does not support the ! 142: construct `xsTAGNAME'. On some systems, this construct is used to ! 143: describe a forward reference to a structure named TAGNAME. On ! 144: other systems, this construct is not supported at all. ! 145: ! 146: `DBX_CONTIN_LENGTH' ! 147: A symbol name in DBX-format debugging information is normally ! 148: continued (split into two separate `.stabs' directives) when it ! 149: exceeds a certain length (by default, 80 characters). On some ! 150: operating systems, DBX requires this splitting; on others, ! 151: splitting must not be done. You can inhibit splitting by ! 152: defining this macro with the value zero. You can override the ! 153: default splitting-length by defining this macro as an expression ! 154: for the length you desire. ! 155: ! 156: `DBX_CONTIN_CHAR' ! 157: Normally continuation is indicated by adding a `\' character to ! 158: the end of a `.stabs' string when a continuation follows. To use ! 159: a different character instead, define this macro as a character ! 160: constant for the character you want to use. Do not define this ! 161: macro if backslash is correct for your system. ! 162: ! 163: `DBX_WORKING_DIRECTORY' ! 164: Define this if DBX wants to have the current directory recorded ! 165: in each object file. ! 166: ! 167: Note that the working directory is always recorded if GDB ! 168: extensions are enabled. ! 169: ! 170: `DBX_STATIC_STAB_DATA_SECTION' ! 171: Define this macro if it is necessary to go to the data section ! 172: before outputting the `.stabs' pseudo-op for a non-global static ! 173: variable. ! 174: ! 175: `DBX_LBRAC_FIRST' ! 176: Define this macro if the `N_LBRAC' symbol for a block should ! 177: precede the debugging information for variables and functions ! 178: defined in that block. Normally, in DBX format, the `N_LBRAC' ! 179: symbol comes first. ! 180: ! 181: `DBX_FUNCTION_FIRST' ! 182: Define this macro if the DBX information for a function and its ! 183: arguments should precede the assembler code for the function. ! 184: Normally, in DBX format, the debugging information entirely ! 185: follows the assembler code. ! 186: ! 187: `DBX_OUTPUT_FUNCTION_END (STREAM, FUNCTION)' ! 188: Define this macro if the target machine requires special output ! 189: at the end of the debugging information for a function. The ! 190: definition should be a C statement (sans semicolon) to output the ! 191: appropriate information to STREAM. FUNCTION is the ! 192: `FUNCTION_DECL' node for the function. ! 193: ! 194: `DBX_OUTPUT_STANDARD_TYPES (SYMS)' ! 195: Define this macro if you need to control the order of output of ! 196: the standard data types at the beginning of compilation. The ! 197: argument SYMS is a `tree' which is a chain of all the predefined ! 198: global symbols, including names of data types. ! 199: ! 200: Normally, DBX output starts with definitions of the types for ! 201: integers and characters, followed by all the other predefined ! 202: types of the particular language in no particular order. ! 203: ! 204: On some machines, it is necessary to output different particular ! 205: types first. To do this, define `DBX_OUTPUT_STANDARD_TYPES' to ! 206: output those symbols in the necessary order. Any predefined ! 207: types that you don't explicitly output will be output afterward ! 208: in no particular order. ! 209: ! 210: Be careful not to define this macro so that it works only for C. ! 211: There are no global variables to access most of the built-in ! 212: types, because another language may have another set of types. ! 213: The way to output a particular type is to look through SYMS to ! 214: see if you can find it. Here is an example: ! 215: ! 216: { ! 217: tree decl; ! 218: for (decl = syms; decl; decl = TREE_CHAIN (decl)) ! 219: if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)), "long int")) ! 220: dbxout_symbol (decl); ! 221: ... ! 222: } ! 223: ! 224: This does nothing if the expected type does not exist. ! 225: ! 226: See the function `init_decl_processing' in source file `c-decl.c' ! 227: to find the names to use for all the built-in C types. ! 228: ! 229: `DBX_OUTPUT_MAIN_SOURCE_FILENAME (STREAM, NAME)' ! 230: A C statement to output DBX debugging information to the stdio ! 231: stream STREAM which indicates that file NAME is the main source ! 232: file--the file specified as the input file for compilation. This ! 233: macro is called only once, at the beginning of compilation. ! 234: ! 235: This macro need not be defined if the standard form of output for ! 236: DBX debugging information is appropriate. ! 237: ! 238: `DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (STREAM, NAME)' ! 239: A C statement to output DBX debugging information to the stdio ! 240: stream STREAM which indicates that the current directory during ! 241: compilation is named NAME. ! 242: ! 243: This macro need not be defined if the standard form of output for ! 244: DBX debugging information is appropriate. ! 245: ! 246: `DBX_OUTPUT_MAIN_SOURCE_FILE_END (STREAM, NAME)' ! 247: A C statement to output DBX debugging information at the end of ! 248: compilation of the main source file NAME. ! 249: ! 250: If you don't define this macro, nothing special is output at the ! 251: end of compilation, which is correct for most machines. ! 252: ! 253: `DBX_OUTPUT_SOURCE_FILENAME (STREAM, NAME)' ! 254: A C statement to output DBX debugging information to the stdio ! 255: stream STREAM which indicates that file NAME is the current source ! 256: file. This output is generated each time input shifts to a ! 257: different source file as a result of `#include', the end of an ! 258: included file, or a `#line' command. ! 259: ! 260: This macro need not be defined if the standard form of output for ! 261: DBX debugging information is appropriate. ! 262: ! 263: ! 264: File: gcc.info, Node: Cross-compilation, Next: Misc, Prev: Debugging Info, Up: Target Macros ! 265: ! 266: Cross Compilation and Floating Point Format ! 267: =========================================== ! 268: ! 269: While all modern machines use 2's complement representation for ! 270: integers, there are a variety of representations for floating point ! 271: numbers. This means that in a cross-compiler the representation of ! 272: floating point numbers in the compiled program may be different from ! 273: that used in the machine doing the compilation. ! 274: ! 275: Because different representation systems may offer different ! 276: amounts of range and precision, the cross compiler cannot safely use ! 277: the host machine's floating point arithmetic. Therefore, floating ! 278: point constants must be represented in the target machine's format. ! 279: This means that the cross compiler cannot use `atof' to parse a ! 280: floating point constant; it must have its own special routine to use ! 281: instead. Also, constant folding must emulate the target machine's ! 282: arithmetic (or must not be done at all). ! 283: ! 284: The macros in the following table should be defined only if you are ! 285: cross compiling between different floating point formats. ! 286: ! 287: Otherwise, don't define them. Then default definitions will be set ! 288: up which use `double' as the data type, `==' to test for equality, etc. ! 289: ! 290: You don't need to worry about how many times you use an operand of ! 291: any of these macros. The compiler never uses operands which have side ! 292: effects. ! 293: ! 294: `REAL_VALUE_TYPE' ! 295: A macro for the C data type to be used to hold a floating point ! 296: value in the target machine's format. Typically this would be a ! 297: `struct' containing an array of `int'. ! 298: ! 299: `REAL_VALUES_EQUAL (X, Y)' ! 300: A macro for a C expression which compares for equality the two ! 301: values, X and Y, both of type `REAL_VALUE_TYPE'. ! 302: ! 303: `REAL_VALUES_LESS (X, Y)' ! 304: A macro for a C expression which tests whether X is less than Y, ! 305: both values being of type `REAL_VALUE_TYPE' and interpreted as ! 306: floating point numbers in the target machine's representation. ! 307: ! 308: `REAL_VALUE_LDEXP (X, SCALE)' ! 309: A macro for a C expression which performs the standard library ! 310: function `ldexp', but using the target machine's floating point ! 311: representation. Both X and the value of the expression have type ! 312: `REAL_VALUE_TYPE'. The second argument, SCALE, is an integer. ! 313: ! 314: `REAL_VALUE_FIX (X)' ! 315: A macro whose definition is a C expression to convert the ! 316: target-machine floating point value X to a signed integer. X has ! 317: type `REAL_VALUE_TYPE'. ! 318: ! 319: `REAL_VALUE_UNSIGNED_FIX (X)' ! 320: A macro whose definition is a C expression to convert the ! 321: target-machine floating point value X to an unsigned integer. X ! 322: has type `REAL_VALUE_TYPE'. ! 323: ! 324: `REAL_VALUE_FIX_TRUNCATE (X)' ! 325: A macro whose definition is a C expression to convert the ! 326: target-machine floating point value X to a signed integer, ! 327: rounding toward 0. X has type `REAL_VALUE_TYPE'. ! 328: ! 329: `REAL_VALUE_UNSIGNED_FIX_TRUNCATE (X)' ! 330: A macro whose definition is a C expression to convert the ! 331: target-machine floating point value X to an unsigned integer, ! 332: rounding toward 0. X has type `REAL_VALUE_TYPE'. ! 333: ! 334: `REAL_VALUE_ATOF (STRING)' ! 335: A macro for a C expression which converts STRING, an expression ! 336: of type `char *', into a floating point number in the target ! 337: machine's representation. The value has type `REAL_VALUE_TYPE'. ! 338: ! 339: `REAL_INFINITY' ! 340: Define this macro if infinity is a possible floating point value, ! 341: and therefore division by 0 is legitimate. ! 342: ! 343: `REAL_VALUE_ISINF (X)' ! 344: A macro for a C expression which determines whether X, a floating ! 345: point value, is infinity. The value has type `int'. By default, ! 346: this is defined to call `isinf'. ! 347: ! 348: `REAL_VALUE_ISNAN (X)' ! 349: A macro for a C expression which determines whether X, a floating ! 350: point value, is a "nan" (not-a-number). The value has type ! 351: `int'. By default, this is defined to call `isnan'. ! 352: ! 353: Define the following additional macros if you want to make floating ! 354: point constant folding work while cross compiling. If you don't ! 355: define them, cross compilation is still possible, but constant folding ! 356: will not happen for floating point values. ! 357: ! 358: `REAL_ARITHMETIC (OUTPUT, CODE, X, Y)' ! 359: A macro for a C statement which calculates an arithmetic ! 360: operation of the two floating point values X and Y, both of type ! 361: `REAL_VALUE_TYPE' in the target machine's representation, to ! 362: produce a result of the same type and representation which is ! 363: stored in OUTPUT (which will be a variable). ! 364: ! 365: The operation to be performed is specified by CODE, a tree code ! 366: which will always be one of the following: `PLUS_EXPR', ! 367: `MINUS_EXPR', `MULT_EXPR', `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'. ! 368: ! 369: The expansion of this macro is responsible for checking for ! 370: overflow. If overflow happens, the macro expansion should ! 371: execute the statement `return 0;', which indicates the inability ! 372: to perform the arithmetic operation requested. ! 373: ! 374: `REAL_VALUE_NEGATE (X)' ! 375: A macro for a C expression which returns the negative of the ! 376: floating point value X. Both X and the value of the expression ! 377: have type `REAL_VALUE_TYPE' and are in the target machine's ! 378: floating point representation. ! 379: ! 380: There is no way for this macro to report overflow, since overflow ! 381: can't happen in the negation operation. ! 382: ! 383: `REAL_VALUE_TRUNCATE (X)' ! 384: A macro for a C expression which converts the double-precision ! 385: floating point value X to single-precision. ! 386: ! 387: Both X and the value of the expression have type ! 388: `REAL_VALUE_TYPE' and are in the target machine's floating point ! 389: representation. However, the value should have an appropriate bit ! 390: pattern to be output properly as a single-precision floating ! 391: constant. ! 392: ! 393: There is no way for this macro to report overflow. ! 394: ! 395: `REAL_VALUE_TO_INT (LOW, HIGH, X)' ! 396: A macro for a C expression which converts a floating point value ! 397: X into a double-precision integer which is then stored into LOW ! 398: and HIGH, two variables of type INT. ! 399: ! 400: `REAL_VALUE_FROM_INT (X, LOW, HIGH)' ! 401: A macro for a C expression which converts a double-precision ! 402: integer found in LOW and HIGH, two variables of type INT, into a ! 403: floating point value which is then stored into X. ! 404: ! 405: ! 406: File: gcc.info, Node: Misc, Prev: Cross-compilation, Up: Target Macros ! 407: ! 408: Miscellaneous Parameters ! 409: ======================== ! 410: ! 411: `PREDICATE_CODES' ! 412: Optionally define this if you have added predicates to ! 413: `MACHINE.c'. This macro is called within an initializer of an ! 414: array of structures. The first field in the structure is the ! 415: name of a predicate and the second field is an array of rtl ! 416: codes. For each predicate, list all rtl codes that can be in ! 417: expressions matched by the predicate. The list should have a ! 418: trailing comma. Here is an example of two entries in the list ! 419: for a typical RISC machine: ! 420: ! 421: #define PREDICATE_CODES \ ! 422: {"gen_reg_rtx_operand", {SUBREG, REG}}, \ ! 423: {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}}, ! 424: ! 425: Defining this macro does not affect the generated code (however, ! 426: incorrect definitions that omit an rtl code that may be matched ! 427: by the predicate can cause the compiler to malfunction). ! 428: Instead, it allows the table built by `genrecog' to be more ! 429: compact and efficient, thus speeding up the compiler. The most ! 430: important predicates to include in the list specified by this ! 431: macro are thoses used in the most insn patterns. ! 432: ! 433: `CASE_VECTOR_MODE' ! 434: An alias for a machine mode name. This is the machine mode that ! 435: elements of a jump-table should have. ! 436: ! 437: `CASE_VECTOR_PC_RELATIVE' ! 438: Define this macro if jump-tables should contain relative ! 439: addresses. ! 440: ! 441: `CASE_DROPS_THROUGH' ! 442: Define this if control falls through a `case' insn when the index ! 443: value is out of range. This means the specified default-label is ! 444: actually ignored by the `case' insn proper. ! 445: ! 446: `BYTE_LOADS_ZERO_EXTEND' ! 447: Define this macro if an instruction to load a value narrower than ! 448: a word from memory into a register also zero-extends the value to ! 449: the whole register. ! 450: ! 451: `IMPLICIT_FIX_EXPR' ! 452: An alias for a tree code that should be used by default for ! 453: conversion of floating point values to fixed point. Normally, ! 454: `FIX_ROUND_EXPR' is used. ! 455: ! 456: `FIXUNS_TRUNC_LIKE_FIX_TRUNC' ! 457: Define this macro if the same instructions that convert a floating ! 458: point number to a signed fixed point number also convert validly ! 459: to an unsigned one. ! 460: ! 461: `EASY_DIV_EXPR' ! 462: An alias for a tree code that is the easiest kind of division to ! 463: compile code for in the general case. It may be ! 464: `TRUNC_DIV_EXPR', `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or ! 465: `ROUND_DIV_EXPR'. These four division operators differ in how ! 466: they round the result to an integer. `EASY_DIV_EXPR' is used ! 467: when it is permissible to use any of those kinds of division and ! 468: the choice should be made on the basis of efficiency. ! 469: ! 470: `MOVE_MAX' ! 471: The maximum number of bytes that a single instruction can move ! 472: quickly from memory to memory. ! 473: ! 474: `SHIFT_COUNT_TRUNCATED' ! 475: Defining this macro causes the compiler to omit a sign-extend, ! 476: zero-extend, or bitwise `and' instruction that truncates the ! 477: count of a shift operation to a width equal to the number of bits ! 478: needed to represent the size of the object being shifted. On ! 479: machines that have instructions that act on bitfields at variable ! 480: positions, including `bit test' instructions, defining ! 481: `SHIFT_COUNT_TRUNCATED' also causes truncation not to be applied ! 482: to these instructions. ! 483: ! 484: If both types of instructions truncate the count (for shifts) and ! 485: position (for bitfield operations), or if no variable-position ! 486: bitfield instructions exist, you should define this macro. ! 487: ! 488: However, on some machines, such as the 80386 and the 680x0, ! 489: truncation only applies to shift operations and not the (real or ! 490: pretended) bitfield operations. Do not define ! 491: `SHIFT_COUNT_TRUNCATED' on such machines. Instead, add patterns ! 492: to the `md' file that include the implied truncation of the shift ! 493: instructions. ! 494: ! 495: `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)' ! 496: A C expression which is nonzero if on this machine it is safe to ! 497: "convert" an integer of INPREC bits to one of OUTPREC bits (where ! 498: OUTPREC is smaller than INPREC) by merely operating on it as if ! 499: it had only OUTPREC bits. ! 500: ! 501: On many machines, this expression can be 1. ! 502: ! 503: It is reported that suboptimal code can result when ! 504: `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for modes ! 505: for which `MODES_TIEABLE_P' is 0. If this is the case, making ! 506: `TRULY_NOOP_TRUNCATION' return 0 in such cases may improve things. ! 507: ! 508: `STORE_FLAG_VALUE' ! 509: A C expression describing the value returned by a comparison ! 510: operator and stored by a store-flag instruction (`sCOND') when the ! 511: condition is true. This description must apply to *all* the ! 512: `sCOND' patterns and all the comparison operators. ! 513: ! 514: A value of 1 or -1 means that the instruction implementing the ! 515: comparison operator returns exactly 1 or -1 when the comparison ! 516: is true and 0 when the comparison is false. Otherwise, the value ! 517: indicates which bits of the result are guaranteed to be 1 when ! 518: the comparison is true. This value is interpreted in the mode of ! 519: the comparison operation, which is given by the mode of the first ! 520: operand in the `sCOND' pattern. Either the low bit or the sign ! 521: bit of `STORE_FLAG_VALUE' be on. Presently, only those bits are ! 522: used by the compiler. ! 523: ! 524: If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will ! 525: generate code that depends only on the specified bits. It can ! 526: also replace comparison operators with equivalent operations if ! 527: they cause the required bits to be set, even if the remaining ! 528: bits are undefined. For example, on a machine whose comparison ! 529: operators return an `SImode' value and where `STORE_FLAG_VALUE' ! 530: is defined as `0x80000000', saying that just the sign bit is ! 531: relevant, the expression ! 532: ! 533: (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0)) ! 534: ! 535: can be converted to ! 536: ! 537: (ashift:SI X (const_int N)) ! 538: ! 539: where N is the appropriate shift count to move the bit being ! 540: tested into the sign bit. ! 541: ! 542: There is no way to describe a machine that always sets the ! 543: low-order bit for a true value, but does not guarantee the value ! 544: of any other bits, but we do not know of any machine that has ! 545: such an instruction. If you are trying to port GNU CC to such a ! 546: machine, include an instruction to perform a logical-and of the ! 547: result with 1 in the pattern for the comparison operators and let ! 548: us know (*note Bug Reporting::.). ! 549: ! 550: Often, a machine will have multiple instructions that obtain a ! 551: value from a comparison (or the condition codes). Here are rules ! 552: to guide the choice of value for `STORE_FLAG_VALUE', and hence ! 553: the instructions to be used: ! 554: ! 555: * Use the shortest sequence that yields a valid definition for ! 556: `STORE_FLAG_VALUE'. It is more efficent for the compiler to ! 557: "normalize" the value (convert it to, e.g., 1 or 0) than for ! 558: the comparison operators to do so because there may be ! 559: opportunities to combine the normalization with other ! 560: operations. ! 561: ! 562: * For equal-length sequences, use a value of 1 or -1, with -1 ! 563: being slightly preferred on machines with expensive jumps ! 564: and 1 preferred on other machines. ! 565: ! 566: * As a second choice, choose a value of `0x80000001' if ! 567: instructions exist that set both the sign and low-order bits ! 568: but do not define the others. ! 569: ! 570: * Otherwise, use a value of `0x80000000'. ! 571: ! 572: You need not define `STORE_FLAG_VALUE' if the machine has no ! 573: store-flag instructions. ! 574: ! 575: `Pmode' ! 576: An alias for the machine mode for pointers. Normally the ! 577: definition can be ! 578: ! 579: #define Pmode SImode ! 580: ! 581: `FUNCTION_MODE' ! 582: An alias for the machine mode used for memory references to ! 583: functions being called, in `call' RTL expressions. On most ! 584: machines this should be `QImode'. ! 585: ! 586: `INTEGRATE_THRESHOLD (DECL)' ! 587: A C expression for the maximum number of instructions above which ! 588: the function DECL should not be inlined. DECL is a ! 589: `FUNCTION_DECL' node. ! 590: ! 591: The default definition of this macro is 64 plus 8 times the ! 592: number of arguments that the function accepts. Some people think ! 593: a larger threshold should be used on RISC machines. ! 594: ! 595: `SCCS_DIRECTIVE' ! 596: Define this if the preprocessor should ignore `#sccs' directives ! 597: and print no error message. ! 598: ! 599: `HANDLE_PRAGMA (STREAM)' ! 600: Define this macro if you want to implement any pragmas. If ! 601: defined, it should be a C statement to be executed when `#pragma' ! 602: is seen. The argument STREAM is the stdio input stream from ! 603: which the source text can be read. ! 604: ! 605: It is generally a bad idea to implement new uses of `#pragma'. ! 606: The only reason to define this macro is for compatibility with ! 607: other compilers that do support `#pragma' for the sake of any user ! 608: programs which already use it. ! 609: ! 610: `DOLLARS_IN_IDENTIFIERS' ! 611: Define this macro to control use of the character `$' in ! 612: identifier names. The value should be 0, 1, or 2. 0 means `$' ! 613: is not allowed by default; 1 means it is allowed by default if ! 614: `-traditional' is used; 2 means it is allowed by default provided ! 615: `-ansi' is not used. 1 is the default; there is no need to ! 616: define this macro in that case. ! 617: ! 618: `NO_DOLLAR_IN_LABEL' ! 619: Define this macro if the assembler does not accept the character ! 620: `$' in label names. By default constructors and destructors in ! 621: G++ have `$' in the identifiers. If this macro is defined, `.' ! 622: is used instead. ! 623: ! 624: `DEFAULT_MAIN_RETURN' ! 625: Define this macro if the target system expects every program's ! 626: `main' function to return a standard "success" value by default ! 627: (if no other value is explicitly returned). ! 628: ! 629: The definition should be a C statement (sans semicolon) to ! 630: generate the appropriate rtl instructions. It is used only when ! 631: compiling the end of `main'. ! 632: ! 633: `HAVE_ATEXIT' ! 634: Define this if the target system supports the function `atexit' ! 635: from the ANSI C standard. If this is not defined, and ! 636: `INIT_SECTION_ASM_OP' is not defined, a default `exit' function ! 637: will be provided to support C++. ! 638: ! 639: `EXIT_BODY' ! 640: Define this if your `exit' function needs to do something besides ! 641: calling an external function `_cleanup' before terminating with ! 642: `_exit'. The `EXIT_BODY' macro is only needed if netiher ! 643: `HAVE_ATEXIT' nor `INIT_SECTION_ASM_OP' are defined. ! 644: ! 645: ! 646: File: gcc.info, Node: Config, Next: Index, Prev: Target Macros, Up: Top 1.1 root 647: 648: The Configuration File 649: ********************** 650: 651: The configuration file `xm-MACHINE.h' contains macro definitions 652: that describe the machine and system on which the compiler is running, 653: unlike the definitions in `MACHINE.h', which describe the machine for 654: which the compiler is producing output. Most of the values in 655: `xm-MACHINE.h' are actually the same on all machines that GNU CC runs 656: on, so large parts of all configuration files are identical. But 657: there are some macros that vary: 658: 659: `USG' 660: Define this macro if the host system is System V. 661: 662: `VMS' 663: Define this macro if the host system is VMS. 664: 665: `FAILURE_EXIT_CODE' 666: A C expression for the status code to be returned when the 667: compiler exits after serious errors. 668: 669: `SUCCESS_EXIT_CODE' 670: A C expression for the status code to be returned when the 671: compiler exits without serious errors. 672: 673: `HOST_WORDS_BIG_ENDIAN' 674: Defined if the host machine stores words of multi-word values in 675: big-endian order. (GNU CC does not depend on the host byte 676: ordering within a word.) 677: 678: `HOST_FLOAT_FORMAT' 679: A numeric code distinguishing the floating point format for the 680: host machine. See `TARGET_FLOAT_FORMAT' in *Note Storage 681: Layout:: for the alternatives and default. 682: 683: `HOST_BITS_PER_CHAR' 684: A C expression for the number of bits in `char' on the host 685: machine. 686: 687: `HOST_BITS_PER_SHORT' 688: A C expression for the number of bits in `short' on the host 689: machine. 690: 691: `HOST_BITS_PER_INT' 692: A C expression for the number of bits in `int' on the host 693: machine. 694: 695: `HOST_BITS_PER_LONG' 696: A C expression for the number of bits in `long' on the host 697: machine. 698: 699: `ONLY_INT_FIELDS' 700: Define this macro to indicate that the host compiler only supports 701: `int' bit fields, rather than other integral types, including 702: `enum', as do most C compilers. 703: 704: `EXECUTABLE_SUFFIX' 705: Define this macro if the host system uses a naming convention for 706: executable files that involves a common suffix (such as, in some 707: systems, `.exe') that must be mentioned explicitly when you run 708: the program. 709: 710: `OBSTACK_CHUNK_SIZE' 711: A C expression for the size of ordinary obstack chunks. If you 712: don't define this, a usually-reasonable default is used. 713: 714: `OBSTACK_CHUNK_ALLOC' 715: The function used to allocate obstack chunks. If you don't 716: define this, `xmalloc' is used. 717: 718: `OBSTACK_CHUNK_FREE' 719: The function used to free obstack chunks. If you don't define 720: this, `free' is used. 721: 722: `USE_C_ALLOCA' 723: Define this macro to indicate that the compiler is running with 724: the `alloca' implemented in C. This version of `alloca' can be 725: found in the file `alloca.c'; to use it, you must also alter the 726: `Makefile' variable `ALLOCA'. (This is done automatically for 727: the systems on which we know it is needed.) 728: 729: If you do define this macro, you should probably do it as follows: 730: 731: #ifndef __GNUC__ 732: #define USE_C_ALLOCA 733: #else 734: #define alloca __builtin_alloca 735: #endif 736: 737: so that when the compiler is compiled with GNU CC it uses the more 738: efficient built-in `alloca' function. 739: 740: `FUNCTION_CONVERSION_BUG' 741: Define this macro to indicate that the host compiler does not 742: properly handle converting a function value to a 743: pointer-to-function when it is used in an expression. 744: 1.1.1.2 ! root 745: `HAVE_VPRINTF' ! 746: Define this if the library function `vprintf' is available on your ! 747: system. ! 748: ! 749: `HAVE_PUTENV' ! 750: Define this if the library function `putenv' is available on your ! 751: system. ! 752: ! 753: `NO_SYS_SIGLIST' ! 754: Define this if your system *does not* provide the variable ! 755: `sys_siglist'. ! 756: ! 757: Some systems do provide this variable, but with a different name ! 758: such as `_sys_siglist'. On these systems, you can define ! 759: `sys_siglist' as a macro which expands into the name actually ! 760: provided. ! 761: ! 762: `NO_STAB_H' ! 763: Define this if your system does not have the include file ! 764: `stab.h'. If `USG' is defined, `NO_STAB_H' is assumed. ! 765: 1.1 root 766: In addition, configuration files for system V define `bcopy', 767: `bzero' and `bcmp' as aliases. Some files define `alloca' as a macro 768: when compiled with GNU CC, in order to take advantage of the benefit 769: of GNU CC's built-in `alloca'. 770: 771:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.