home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gcc-2.3.3-src.lha / GNU / src / amiga / gcc-2.3.3 / gcc.info-12 (.txt) < prev    next >
GNU Info File  |  1994-02-06  |  47KB  |  844 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.49 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided also
  10. that the sections entitled "GNU General Public License" and "Protect
  11. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  12. original, and provided that the entire resulting derived work is
  13. distributed under the terms of a permission notice identical to this
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that the sections entitled "GNU General Public
  17. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  18. permission notice, may be included in translations approved by the Free
  19. Software Foundation instead of in the original English.
  20. File: gcc.info,  Node: Standard Names,  Next: Pattern Ordering,  Prev: Constraints,  Up: Machine Desc
  21. Standard Names for Patterns Used in Generation
  22. ==============================================
  23.    Here is a table of the instruction names that are meaningful in the
  24. RTL generation pass of the compiler.  Giving one of these names to an
  25. instruction pattern tells the RTL generation pass that it can use the
  26. pattern in to accomplish a certain task.
  27. `movM'
  28.      Here M stands for a two-letter machine mode name, in lower case.
  29.      This instruction pattern moves data with that machine mode from
  30.      operand 1 to operand 0.  For example, `movsi' moves full-word data.
  31.      If operand 0 is a `subreg' with mode M of a register whose own
  32.      mode is wider than M, the effect of this instruction is to store
  33.      the specified value in the part of the register that corresponds
  34.      to mode M.  The effect on the rest of the register is undefined.
  35.      This class of patterns is special in several ways.  First of all,
  36.      each of these names *must* be defined, because there is no other
  37.      way to copy a datum from one place to another.
  38.      Second, these patterns are not used solely in the RTL generation
  39.      pass. Even the reload pass can generate move insns to copy values
  40.      from stack slots into temporary registers.  When it does so, one
  41.      of the operands is a hard register and the other is an operand
  42.      that can need to be reloaded into a register.
  43.      Therefore, when given such a pair of operands, the pattern must
  44.      generate RTL which needs no reloading and needs no temporary
  45.      registers--no registers other than the operands.  For example, if
  46.      you support the pattern with a `define_expand', then in such a
  47.      case the `define_expand' mustn't call `force_reg' or any other such
  48.      function which might generate new pseudo registers.
  49.      This requirement exists even for subword modes on a RISC machine
  50.      where fetching those modes from memory normally requires several
  51.      insns and some temporary registers.  Look in `spur.md' to see how
  52.      the requirement can be satisfied.
  53.      During reload a memory reference with an invalid address may be
  54.      passed as an operand.  Such an address will be replaced with a
  55.      valid address later in the reload pass.  In this case, nothing may
  56.      be done with the address except to use it as it stands.  If it is
  57.      copied, it will not be replaced with a valid address.  No attempt
  58.      should be made to make such an address into a valid address and no
  59.      routine (such as `change_address') that will do so may be called. 
  60.      Note that `general_operand' will fail when applied to such an
  61.      address.
  62.      The global variable `reload_in_progress' (which must be explicitly
  63.      declared if required) can be used to determine whether such special
  64.      handling is required.
  65.      The variety of operands that have reloads depends on the rest of
  66.      the machine description, but typically on a RISC machine these can
  67.      only be pseudo registers that did not get hard registers, while on
  68.      other machines explicit memory references will get optional
  69.      reloads.
  70.      If a scratch register is required to move an object to or from
  71.      memory, it can be allocated using `gen_reg_rtx' prior to reload. 
  72.      But this is impossible during and after reload.  If there are
  73.      cases needing scratch registers after reload, you must define
  74.      `SECONDARY_INPUT_RELOAD_CLASS' and/or
  75.      `SECONDARY_OUTPUT_RELOAD_CLASS' to detect them, and provide
  76.      patterns `reload_inM' or `reload_outM' to handle them.  *Note
  77.      Register Classes::.
  78.      The constraints on a `moveM' must permit moving any hard register
  79.      to any other hard register provided that `HARD_REGNO_MODE_OK'
  80.      permits mode M in both registers and `REGISTER_MOVE_COST' applied
  81.      to their classes returns a value of 2.
  82.      It is obligatory to support floating point `moveM' instructions
  83.      into and out of any registers that can hold fixed point values,
  84.      because unions and structures (which have modes `SImode' or
  85.      `DImode') can be in those registers and they may have floating
  86.      point members.
  87.      There may also be a need to support fixed point `moveM'
  88.      instructions in and out of floating point registers. 
  89.      Unfortunately, I have forgotten why this was so, and I don't know
  90.      whether it is still true.  If `HARD_REGNO_MODE_OK' rejects fixed
  91.      point values in floating point registers, then the constraints of
  92.      the fixed point `moveM' instructions must be designed to avoid
  93.      ever trying to reload into a floating point register.
  94. `reload_inM'
  95. `reload_outM'
  96.      Like `movM', but used when a scratch register is required to move
  97.      between operand 0 and operand 1.  Operand 2 describes the scratch
  98.      register.  See the discussion of the `SECONDARY_RELOAD_CLASS'
  99.      macro in *note Register Classes::..
  100. `movstrictM'
  101.      Like `movM' except that if operand 0 is a `subreg' with mode M of
  102.      a register whose natural mode is wider, the `movstrictM'
  103.      instruction is guaranteed not to alter any of the register except
  104.      the part which belongs to mode M.
  105. `load_multiple'
  106.      Load several consecutive memory locations into consecutive
  107.      registers. Operand 0 is the first of the consecutive registers,
  108.      operand 1 is the first memory location, and operand 2 is a
  109.      constant: the number of consecutive registers.
  110.      Define this only if the target machine really has such an
  111.      instruction; do not define this if the most efficient way of
  112.      loading consecutive registers from memory is to do them one at a
  113.      time.
  114.      On some machines, there are restrictions as to which consecutive
  115.      registers can be stored into memory, such as particular starting or
  116.      ending register numbers or only a range of valid counts.  For those
  117.      machines, use a `define_expand' (*note Expander Definitions::.)
  118.      and make the pattern fail if the restrictions are not met.
  119.      Write the generated insn as a `parallel' with elements being a
  120.      `set' of one register from the appropriate memory location (you may
  121.      also need `use' or `clobber' elements).  Use a `match_parallel'
  122.      (*note RTL Template::.) to recognize the insn.  See `a29k.md' and
  123.      `rs6000.md' for examples of the use of this insn pattern.
  124. `store_multiple'
  125.      Similar to `load_multiple', but store several consecutive registers
  126.      into consecutive memory locations.  Operand 0 is the first of the
  127.      consecutive memory locations, operand 1 is the first register, and
  128.      operand 2 is a constant: the number of consecutive registers.
  129. `addM3'
  130.      Add operand 2 and operand 1, storing the result in operand 0.  All
  131.      operands must have mode M.  This can be used even on two-address
  132.      machines, by means of constraints requiring operands 1 and 0 to be
  133.      the same location.
  134. `subM3', `mulM3'
  135. `divM3', `udivM3', `modM3', `umodM3'
  136. `sminM3', `smaxM3', `uminM3', `umaxM3'
  137. `andM3', `iorM3', `x