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-10 (.txt) < prev    next >
GNU Info File  |  1994-02-06  |  50KB  |  857 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: Conversions,  Next: RTL Declarations,  Prev: Bit Fields,  Up: RTL
  21. Conversions
  22. ===========
  23.    All conversions between machine modes must be represented by
  24. explicit conversion operations.  For example, an expression which is
  25. the sum of a byte and a full word cannot be written as `(plus:SI
  26. (reg:QI 34) (reg:SI 80))' because the `plus' operation requires two
  27. operands of the same machine mode. Therefore, the byte-sized operand is
  28. enclosed in a conversion operation, as in
  29.      (plus:SI (sign_extend:SI (reg:QI 34)) (reg:SI 80))
  30.    The conversion operation is not a mere placeholder, because there
  31. may be more than one way of converting from a given starting mode to
  32. the desired final mode.  The conversion operation code says how to do
  33.    For all conversion operations, X must not be `VOIDmode' because the
  34. mode in which to do the conversion would not be known. The conversion
  35. must either be done at compile-time or X must be placed into a register.
  36. `(sign_extend:M X)'
  37.      Represents the result of sign-extending the value X to machine
  38.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  39.      a mode narrower than M.
  40. `(zero_extend:M X)'
  41.      Represents the result of zero-extending the value X to machine
  42.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  43.      a mode narrower than M.
  44. `(float_extend:M X)'
  45.      Represents the result of extending the value X to machine mode M. 
  46.      M must be a floating point mode and X a floating point value of a
  47.      mode narrower than M.
  48. `(truncate:M X)'
  49.      Represents the result of truncating the value X to machine mode M.
  50.       M must be a fixed-point mode and X a fixed-point value of a mode
  51.      wider than M.
  52. `(float_truncate:M X)'
  53.      Represents the result of truncating the value X to machine mode M.
  54.       M must be a floating point mode and X a floating point value of a
  55.      mode wider than M.
  56. `(float:M X)'
  57.      Represents the result of converting fixed point value X, regarded
  58.      as signed, to floating point mode M.
  59. `(unsigned_float:M X)'
  60.      Represents the result of converting fixed point value X, regarded
  61.      as unsigned, to floating point mode M.
  62. `(fix:M X)'
  63.      When M is a fixed point mode, represents the result of converting
  64.      floating point value X to mode M, regarded as signed.  How
  65.      rounding is done is not specified, so this operation may be used
  66.      validly in compiling C code only for integer-valued operands.
  67. `(unsigned_fix:M X)'
  68.      Represents the result of converting floating point value X to
  69.      fixed point mode M, regarded as unsigned.  How rounding is done is
  70.      not specified.
  71. `(fix:M X)'
  72.      When M is a floating point mode, represents the result of
  73.      converting floating point value X (valid for mode M) to an
  74.      integer, still represented in floating point mode M, by rounding
  75.      towards zero.
  76. File: gcc.info,  Node: RTL Declarations,  Next: Side Effects,  Prev: Conversions,  Up: RTL
  77. Declarations
  78. ============
  79.    Declaration expression codes do not represent arithmetic operations
  80. but rather state assertions about their operands.
  81. `(strict_low_part (subreg:M (reg:N R) 0))'
  82.      This expression code is used in only one context: as the
  83.      destination operand of a `set' expression.  In addition, the
  84.      operand of this expression must be a non-paradoxical `subreg'
  85.      expression.
  86.      The presence of `strict_low_part' says that the part of the
  87.      register which is meaningful in mode N, but is not part of mode M,
  88.      is not to be altered.  Normally, an assignment to such a subreg is
  89.      allowed to have undefined effects on the rest of the register when
  90.      M is less than a word.
  91. File: gcc.info,  Node: Side Effects,  Next: Incdec,  Prev: RTL Declarations,  Up: RTL
  92. Side Effect Expressions
  93. =======================
  94.    The expression codes described so far represent values, not actions.
  95. But machine instructions never produce values; they are meaningful only
  96. for their side effects on the state of the machine.  Special expression
  97. codes are used to represent side effects.
  98.    The body of an instruction is always one of these side effect codes;
  99. the codes described above, which represent values, appear only as the
  100. operands of these.
  101. `(set LVAL X)'
  102.      Represents the action of storing the value of X into the place
  103.      represented by LVAL.  LVAL must be an expression representing a
  104.      place that can be stored in: `reg' (or `subreg' or
  105.      `strict_low_part'), `mem', `pc' or `cc0'.
  106.      If LVAL is a `reg', `subreg' or `mem', it has a machine mode; then
  107.      X must be valid for that mode.
  108.      If LVAL is a `reg' whose machine mode is less than the full width
  109.      of the register, then it means that the part of the register
  110.      specified by the machine mode is given the specified value and the
  111.      rest of the register receives an undefined value.  Likewise, if
  112.      LVAL is a `subreg' whose machine mode is narrower than the mode of
  113.      the register, the rest of the register can be changed in an
  114.      undefined way.
  115.      If LVAL is a `strict_low_part' of a `subreg', then the part of the
  116.      register specified by the machine mode of the `subreg' is given
  117.      the value X and the rest of the register is not changed.
  118.      If LVAL is `(cc0)', it has no machine mode, and X may be either a
  119.      `compare' expression or a value that may have any mode. The latter
  120.      case represents a "test" instruction.  The expression `(set (cc0)
  121.      (reg:M N))' is equivalent to `(set (cc0) (compare (reg:M N)
  122.      (const_int 0)))'. Use the former expression to save space during
  123.      the compilation.
  124.      If LVAL is `(pc)', we have a jump instruction, and the
  125.      possibilities for X are very limited.  It may be a `label_ref'
  126.      expression (unconditional jump).  It may be an `if_then_else'
  127.      (conditional jump), in which case either the second or the third
  128.      operand must be `(pc)' (for the case which does not jump) and the
  129.      other of the two must be a `label_ref' (for the case which does
  130.      jump).  X may also be a `mem' or `(plus:SI (pc) Y)', where Y may
  131.      be a `reg' or a `mem'; these unusual patterns are used to
  132.      represent jumps through branch tables.
  133.      If LVAL is neither `(cc0)' nor `(pc)', the mode of LVAL must not
  134.      be `VOIDmode' and the mode of X must be valid for the mode of LVAL.
  135.      LVAL is customarily accessed with the `SET_DEST' macro and X with
  136.      the `SET_SRC' macro.
  137. `(return)'
  138.      As the sole expression in a pattern, represents a return from the
  139.      current function, on machines where this can be done with one
  140.      instruction, such as Vaxes.  On machines where a multi-instruction
  141.      "epilogue" must be executed in order to return from the function,
  142.      returning is done by jumping to a label which precedes the
  143.      epilogue, and the `return' expression code is never used.
  144.      Inside an `if_then_else' expression, represents the value to be
  145.      placed in `pc' to return to the caller.
  146.      Note that an insn pattern of `(return)' is lo