home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / gcc-2.5.8-bin.lha / info / gcc.info-18 (.txt) < prev    next >
GNU Info File  |  1994-02-21  |  49KB  |  825 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License" and "Protect
  13. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  14. original, and provided that the entire resulting derived work is
  15. distributed under the terms of a permission notice identical to this
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that the sections entitled "GNU General Public
  19. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  20. permission notice, may be included in translations approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: gcc.info,  Node: Obsolete Register Macros,  Prev: Stack Registers,  Up: Registers
  23. Obsolete Macros for Controlling Register Usage
  24. ----------------------------------------------
  25.    These features do not work very well.  They exist because they used
  26. to be required to generate correct code for the 80387 coprocessor of the
  27. 80386.  They are no longer used by that machine description and may be
  28. removed in a later version of the compiler.  Don't use them!
  29. `OVERLAPPING_REGNO_P (REGNO)'
  30.      If defined, this is a C expression whose value is nonzero if hard
  31.      register number REGNO is an overlapping register.  This means a
  32.      hard register which overlaps a hard register with a different
  33.      number.  (Such overlap is undesirable, but occasionally it allows
  34.      a machine to be supported which otherwise could not be.)  This
  35.      macro must return nonzero for *all* the registers which overlap
  36.      each other.  GNU CC can use an overlapping register only in
  37.      certain limited ways.  It can be used for allocation within a
  38.      basic block, and may be spilled for reloading; that is all.
  39.      If this macro is not defined, it means that none of the hard
  40.      registers overlap each other.  This is the usual situation.
  41. `INSN_CLOBBERS_REGNO_P (INSN, REGNO)'
  42.      If defined, this is a C expression whose value should be nonzero if
  43.      the insn INSN has the effect of mysteriously clobbering the
  44.      contents of hard register number REGNO.  By "mysterious" we mean
  45.      that the insn's RTL expression doesn't describe such an effect.
  46.      If this macro is not defined, it means that no insn clobbers
  47.      registers mysteriously.  This is the usual situation; all else
  48.      being equal, it is best for the RTL expression to show all the
  49.      activity.
  50. `PRESERVE_DEATH_INFO_REGNO_P (REGNO)'
  51.      If defined, this is a C expression whose value is nonzero if
  52.      accurate `REG_DEAD' notes are needed for hard register number REGNO
  53.      at the time of outputting the assembler code.  When this is so, a
  54.      few optimizations that take place after register allocation and
  55.      could invalidate the death notes are not done when this register is
  56.      involved.
  57.      You would arrange to preserve death info for a register when some
  58.      of the code in the machine description which is executed to write
  59.      the assembler code looks at the death notes.  This is necessary
  60.      only when the actual hardware feature which GNU CC thinks of as a
  61.      register is not actually a register of the usual sort.  (It might,
  62.      for example, be a hardware stack.)
  63.      If this macro is not defined, it means that no death notes need to
  64.      be preserved.  This is the usual situation.
  65. File: gcc.info,  Node: Register Classes,  Next: Stack and Calling,  Prev: Registers,  Up: Target Macros
  66. Register Classes
  67. ================
  68.    On many machines, the numbered registers are not all equivalent.
  69. For example, certain registers may not be allowed for indexed
  70. addressing; certain registers may not be allowed in some instructions.
  71. These machine restrictions are described to the compiler using
  72. "register classes".
  73.    You define a number of register classes, giving each one a name and
  74. saying which of the registers belong to it.  Then you can specify
  75. register classes that are allowed as operands to particular instruction
  76. patterns.
  77.    In general, each register will belong to several classes.  In fact,
  78. one class must be named `ALL_REGS' and contain all the registers.
  79. Another class must be named `NO_REGS' and contain no registers.  Often
  80. the union of two classes will be another class; however, this is not
  81. required.
  82.    One of the classes must be named `GENERAL_REGS'.  There is nothing
  83. terribly special about the name, but the operand constraint letters `r'
  84. and `g' specify this class.  If `GENERAL_REGS' is the same as
  85. `ALL_REGS', just define it as a macro which expands to `ALL_REGS'.
  86.    Order the classes so that if class X is contained in class Y then X
  87. has a lower class number than Y.
  88.    The way classes other than `GENERAL_REGS' are specified in operand
  89. constraints is through machine-dependent operand constraint letters.
  90. You can define such letters to correspond to various classes, then use
  91. them in operand constraints.
  92.    You should define a class for the union of two classes whenever some
  93. instruction allows both classes.  For example, if an instruction allows
  94. either a floating point (coprocessor) register or a general register
  95. for a certain operand, you should define a class `FLOAT_OR_GENERAL_REGS'
  96. which includes both of them.  Otherwise you will get suboptimal code.
  97.    You must also specify certain redundant information about the
  98. register classes: for each class, which classes contain it and which
  99. ones are contained in it; for each pair of classes, the largest class
  100. contained in their union.
  101.    When a value occupying several consecutive registers is expected in a
  102. certain class, all the registers used must belong to that class.
  103. Therefore, register classes cannot be used to enforce a requirement for
  104. a register pair to start with an even-numbered register.  The way to
  105. specify this requirement is with `HARD_REGNO_MODE_OK'.
  106.    Register classes used for input-operands of bitwise-and or shift
  107. instructions have a special requirement: each such class must have, for
  108. each fixed-point machine mode, a subclass whose registers can transfer
  109. that mode to or from memory.  For example, on some machines, the
  110. operations for single-byte values (`QImode') are limited to certain
  111. registers.  When this is so, each register class that is used in a
  112. bitwise-and or shift instruction must have a subclass consisting of
  113. registers from which single-byte values can be loaded or stored.  This
  114. is so that `PREFERRED_RELOAD_CLASS' can always have a possible value to
  115. return.
  116. `enum reg_class'
  117.      An enumeral type that must be defined with all the register class
  118.      names as enumeral values.  `NO_REGS' must be first.  `ALL_REGS'
  119.      must be the last register class, followed by one more enumeral
  120.      value, `LIM_REG_CLASSES', which is not a register class but rather
  121.      tells how many classes there are.
  122.      Each register class has a number, which is the value of casting
  123.      the class name to type `int'.  The number serves as an index in
  124.      many of the tables described below.
  125. `N_REG_CLASSES'
  126.      The number of distinct register classes, defined as follows:
  127.           #define N_REG_CLASSES (int) LIM_REG_CLASSES
  128. `REG_CLASS_NAMES'
  129.      An initializer containing the names of the register classes as C
  130.      string constants.  These names are used in writing some of the
  131.      debugging dumps.
  132. `REG_CLASS_CONTENTS'
  133.      An initializer containing the contents of the register classes, as
  134.      integers which are bit masks.  The Nth integer specifies the
  135.      contents of class N.  The way the integer MASK is interpreted is
  136.      that register R is in the class if `MASK & (1 << R)' is 1.
  137.