home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc / gcc.info-6 < prev    next >
Encoding:
GNU Info File  |  1992-09-10  |  48.1 KB  |  1,143 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.47 from the input
  2. file gcc.texinfo.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc.
  7.  
  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.
  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 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.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that the sections entitled "GNU General Public
  23. License" and "Protect Your Freedom--Fight `Look And Feel'" and this
  24. permission notice may be included in translations approved by the Free
  25. Software Foundation instead of in the original English.
  26.  
  27. 
  28. File: gcc.info,  Node: Constants,  Next: Regs and Memory,  Prev: Machine Modes,  Up: RTL
  29.  
  30. Constant Expression Types
  31. =========================
  32.  
  33.    The simplest RTL expressions are those that represent constant
  34. values.
  35.  
  36. `(const_int I)'
  37.      This type of expression represents the integer value I.  I is
  38.      customarily accessed with the macro `INTVAL' as in `INTVAL (EXP)',
  39.      which is equivalent to `XINT (EXP, 0)'.
  40.  
  41.      There is only one expression object for the integer value zero; it
  42.      is the value of the variable `const0_rtx'.  Likewise, the only
  43.      expression for integer value one is found in `const1_rtx'. Any
  44.      attempt to create an expression of code `const_int' and value zero
  45.      or one will return `const0_rtx' or `const1_rtx' as appropriate.
  46.  
  47. `(const_double:M I0 I1)'
  48.      Represents a 64-bit constant of mode M.  All floating point
  49.      constants are represented in this way, and so are 64-bit `DImode'
  50.      integer constants.
  51.  
  52.      The two integers I0 and I1 together contain the bits of the value.
  53.       If the constant is floating point (either single or double
  54.      precision), then they represent a `double'.  To convert them to a
  55.      `double', do
  56.  
  57.           union { double d; int i[2];} u;
  58.           u.i[0] = CONST_DOUBLE_LOW(x);
  59.           u.i[1] = CONST_DOUBLE_HIGH(x);
  60.  
  61.      and then refer to `u.d'.
  62.  
  63.      The global variables `dconst0_rtx' and `fconst0_rtx' hold
  64.      `const_double' expressions with value 0, in modes `DFmode' and
  65.      `SFmode', respectively.  The macro `CONST0_RTX (MODE)' refers to a
  66.      `const_double' expression with value 0 in mode MODE.  The mode
  67.      MODE must be of mode class `MODE_FLOAT'.
  68.  
  69. `(symbol_ref SYMBOL)'
  70.      Represents the value of an assembler label for data.  SYMBOL is a
  71.      string that describes the name of the assembler label.  If it
  72.      starts with a `*', the label is the rest of SYMBOL not including
  73.      the `*'.  Otherwise, the label is SYMBOL, prefixed with `_'.
  74.  
  75. `(label_ref LABEL)'
  76.      Represents the value of an assembler label for code.  It contains
  77.      one operand, an expression, which must be a `code_label' that
  78.      appears in the instruction sequence to identify the place where
  79.      the label should go.
  80.  
  81.      The reason for using a distinct expression type for code label
  82.      references is so that jump optimization can distinguish them.
  83.  
  84. `(const EXP)'
  85.      Represents a constant that is the result of an assembly-time
  86.      arithmetic computation.  The operand, EXP, is an expression that
  87.      contains only constants (`const_int', `symbol_ref' and `label_ref'
  88.      expressions) combined with `plus' and `minus'.  However, not all
  89.      combinations are valid, since the assembler cannot do arbitrary
  90.      arithmetic on relocatable symbols.
  91.  
  92. 
  93. File: gcc.info,  Node: Regs and Memory,  Next: Arithmetic,  Prev: Constants,  Up: RTL
  94.  
  95. Registers and Memory
  96. ====================
  97.  
  98.    Here are the RTL expression types for describing access to machine
  99. registers and to main memory.
  100.  
  101. `(reg:M N)'
  102.      For small values of the integer N (less than
  103.      `FIRST_PSEUDO_REGISTER'), this stands for a reference to machine
  104.      register number N: a "hard register".  For larger values of N, it
  105.      stands for a temporary value or "pseudo register". The compiler's
  106.      strategy is to generate code assuming an unlimited number of such
  107.      pseudo registers, and later convert them into hard registers or
  108.      into memory references.
  109.  
  110.      The symbol `FIRST_PSEUDO_REGISTER' is defined by the machine
  111.      description, since the number of hard registers on the machine is
  112.      an invariant characteristic of the machine.  Note, however, that
  113.      not all of the machine registers must be general registers.  All
  114.      the machine registers that can be used for storage of data are
  115.      given hard register numbers, even those that can be used only in
  116.      certain instructions or can hold only certain types of data.
  117.  
  118.      Each pseudo register number used in a function's RTL code is
  119.      represented by a unique `reg' expression.
  120.  
  121.      M is the machine mode of the reference.  It is necessary because
  122.      machines can generally refer to each register in more than one
  123.      mode. For example, a register may contain a full word but there
  124.      may be instructions to refer to it as a half word or as a single
  125.      byte, as well as instructions to refer to it as a floating point
  126.      number of various precisions.
  127.  
  128.      Even for a register that the machine can access in only one mode,
  129.      the mode must always be specified.
  130.  
  131.      A hard register may be accessed in various modes throughout one
  132.      function, but each pseudo register is given a natural mode and is
  133.      accessed only in that mode.  When it is necessary to describe an
  134.      access to a pseudo register using a nonnatural mode, a `subreg'
  135.      expression is used.
  136.  
  137.      A `reg' expression with a machine mode that specifies more than
  138.      one word of data may actually stand for several consecutive
  139.      registers. If in addition the register number specifies a hardware
  140.      register, then it actually represents several consecutive hardware
  141.      registers starting with the specified one.
  142.  
  143.      Such multi-word hardware register `reg' expressions must not be
  144.      live across the boundary of a basic block.  The lifetime analysis
  145.      pass does not know how to record properly that several consecutive
  146.      registers are actually live there, and therefore register
  147.      allocation would be confused. The CSE pass must go out of its way
  148.      to make sure the situation does not arise.
  149.  
  150. `(subreg:M REG WORDNUM)'
  151.      `subreg' expressions are used to refer to a register in a machine
  152.      mode other than its natural one, or to refer to one register of a
  153.      multi-word `reg' that actually refers to several registers.
  154.  
  155.      Each pseudo-register has a natural mode.  If it is necessary to
  156.      operate on it in a different mode--for example, to perform a
  157.      fullword move instruction on a pseudo-register that contains a
  158.      single byte--the pseudo-register must be enclosed in a `subreg'. 
  159.      In such a case, WORDNUM is zero.
  160.  
  161.      The other use of `subreg' is to extract the individual registers
  162.      of a multi-register value.  Machine modes such as `DImode' and
  163.      `EPmode' indicate values longer than a word, values which usually
  164.      require two consecutive registers.  To access one of the registers,
  165.      use a `subreg' with mode `SImode' and a WORDNUM that says which
  166.      register.
  167.  
  168.      The compilation parameter `WORDS_BIG_ENDIAN', if defined, says
  169.      that word number zero is the most significant part; otherwise, it
  170.      is the least significant part.
  171.  
  172.      Between the combiner pass and the reload pass, it is possible to
  173.      have a `subreg' which contains a `mem' instead of a `reg' as its
  174.      first operand.  The reload pass eliminates these cases by
  175.      reloading the `mem' into a suitable register.
  176.  
  177.      Note that it is not valid to access a `DFmode' value in `SFmode'
  178.      using a `subreg'.  On some machines the most significant part of a
  179.      `DFmode' value does not have the same format as a single-precision
  180.      floating value.
  181.  
  182. `(cc0)'
  183.      This refers to the machine's condition code register.  It has no
  184.      operands and may not have a machine mode.  There are two ways to
  185.      use it:
  186.  
  187.         * To stand for a complete set of condition code flags.  This is
  188.           best on most machines, where each comparison sets the entire
  189.           series of flags.
  190.  
  191.           With this technique, `(cc0)' may be validly used in only two
  192.           contexts: as the destination of an assignment (in test and
  193.           compare instructions) and in comparison operators comparing
  194.           against zero (`const_int' with value zero; that is to say,
  195.           `const0_rtx').
  196.  
  197.         * To stand for a single flag that is the result of a single
  198.           condition. This is useful on machines that have only a single
  199.           flag bit, and in which comparison instructions must specify
  200.           the condition to test.
  201.  
  202.           With this technique, `(cc0)' may be validly used in only two
  203.           contexts: as the destination of an assignment (in test and
  204.           compare instructions) where the source is a comparison
  205.           operator, and as the first operand of `if_then_else' (in a
  206.           conditional branch).
  207.  
  208.      There is only one expression object of code `cc0'; it is the value
  209.      of the variable `cc0_rtx'.  Any attempt to create an expression of
  210.      code `cc0' will return `cc0_rtx'.
  211.  
  212.      One special thing about the condition code register is that
  213.      instructions can set it implicitly.  On many machines, nearly all
  214.      instructions set the condition code based on the value that they
  215.      compute or store.  It is not necessary to record these actions
  216.      explicitly in the RTL because the machine description includes a
  217.      prescription for recognizing the instructions that do so (by means
  218.      of the macro `NOTICE_UPDATE_CC').  Only instructions whose sole
  219.      purpose is to set the condition code, and instructions that use the
  220.      condition code, need mention `(cc0)'.
  221.  
  222.      In some cases, better code may result from recognizing
  223.      combinations or peepholes that include instructions that set the
  224.      condition codes, even in cases where some reloading is inevitable.
  225.       For examples, search for `addcc' and `andcc' in `sparc.md'.
  226.  
  227. `(pc)'
  228.      This represents the machine's program counter.  It has no operands
  229.      and may not have a machine mode.  `(pc)' may be validly used only
  230.      in certain specific contexts in jump instructions.
  231.  
  232.      There is only one expression object of code `pc'; it is the value
  233.      of the variable `pc_rtx'.  Any attempt to create an expression of
  234.      code `pc' will return `pc_rtx'.
  235.  
  236.      All instructions that do not jump alter the program counter
  237.      implicitly by incrementing it, but there is no need to mention
  238.      this in the RTL.
  239.  
  240. `(mem:M ADDR)'
  241.      This RTX represents a reference to main memory at an address
  242.      represented by the expression ADDR.  M specifies how large a unit
  243.      of memory is accessed.
  244.  
  245. 
  246. File: gcc.info,  Node: Arithmetic,  Next: Comparisons,  Prev: Regs and Memory,  Up: RTL
  247.  
  248. RTL Expressions for Arithmetic
  249. ==============================
  250.  
  251. `(plus:M X Y)'
  252.      Represents the sum of the values represented by X and Y carried
  253.      out in machine mode M.  This is valid only if X and Y both are
  254.      valid for mode M.
  255.  
  256. `(minus:M X Y)'
  257.      Like `plus' but represents subtraction.
  258.  
  259. `(compare X Y)'
  260.      Represents the result of subtracting Y from X for purposes of
  261.      comparison.  The absence of a machine mode in the `compare'
  262.      expression indicates that the result is computed without overflow,
  263.      as if with infinite precision.
  264.  
  265.      Of course, machines can't really subtract with infinite precision.
  266.      However, they can pretend to do so when only the sign of the
  267.      result will be used, which is the case when the result is stored
  268.      in `(cc0)'.  And that is the only way this kind of expression may
  269.      validly be used: as a value to be stored in the condition codes.
  270.  
  271. `(neg:M X)'
  272.      Represents the negation (subtraction from zero) of the value
  273.      represented by X, carried out in mode M.  X must be valid for mode
  274.      M.
  275.  
  276. `(mult:M X Y)'
  277.      Represents the signed product of the values represented by X and Y
  278.      carried out in machine mode M.  If X and Y are both valid for mode
  279.      M, this is ordinary size-preserving multiplication. 
  280.      Alternatively, both X and Y may be valid for a different, narrower
  281.      mode.  This represents the kind of multiplication that generates a
  282.      product wider than the operands. Widening multiplication and
  283.      same-size multiplication are completely distinct and supported by
  284.      different machine instructions; machines may support one but not
  285.      the other.
  286.  
  287.      `mult' may be used for floating point multiplication as well. Then
  288.      M is a floating point machine mode.
  289.  
  290. `(umult:M X Y)'
  291.      Like `mult' but represents unsigned multiplication.  It may be
  292.      used in both same-size and widening forms, like `mult'. `umult' is
  293.      used only for fixed-point multiplication.
  294.  
  295. `(div:M X Y)'
  296.      Represents the quotient in signed division of X by Y, carried out
  297.      in machine mode M.  If M is a floating-point mode, it represents
  298.      the exact quotient; otherwise, the integerized quotient.  If X and
  299.      Y are both valid for mode M, this is ordinary size-preserving
  300.      division.  Some machines have division instructions in which the
  301.      operands and quotient widths are not all the same; such
  302.      instructions are represented by `div' expressions in which the
  303.      machine modes are not all the same.
  304.  
  305. `(udiv:M X Y)'
  306.      Like `div' but represents unsigned division.
  307.  
  308. `(mod:M X Y)'
  309. `(umod:M X Y)'
  310.      Like `div' and `udiv' but represent the remainder instead of the
  311.      quotient.
  312.  
  313. `(not:M X)'
  314.      Represents the bitwise complement of the value represented by X,
  315.      carried out in mode M, which must be a fixed-point machine mode. X
  316.      must be valid for mode M, which must be a fixed-point mode.
  317.  
  318. `(and:M X Y)'
  319.      Represents the bitwise logical-and of the values represented by X
  320.      and Y, carried out in machine mode M.  This is valid only if X and
  321.      Y both are valid for mode M, which must be a fixed-point mode.
  322.  
  323. `(ior:M X Y)'
  324.      Represents the bitwise inclusive-or of the values represented by X
  325.      and Y, carried out in machine mode M.  This is valid only if X and
  326.      Y both are valid for mode M, which must be a fixed-point mode.
  327.  
  328. `(xor:M X Y)'
  329.      Represents the bitwise exclusive-or of the values represented by X
  330.      and Y, carried out in machine mode M.  This is valid only if X and
  331.      Y both are valid for mode M, which must be a fixed-point mode.
  332.  
  333. `(lshift:M X C)'
  334.      Represents the result of logically shifting X left by C places.  X
  335.      must be valid for the mode M, a fixed-point machine mode.  C must
  336.      be valid for a fixed-point mode; which mode is determined by the
  337.      mode called for in the machine description entry for the
  338.      left-shift instruction.  For example, on the Vax, the mode of C is
  339.      `QImode' regardless of M.
  340.  
  341.      On some machines, negative values of C may be meaningful; this is
  342.      why logical left shift and arithmetic left shift are distinguished.
  343.      For example, Vaxes have no right-shift instructions, and right
  344.      shifts are represented as left-shift instructions whose counts
  345.      happen to be negative constants or else computed (in a previous
  346.      instruction) by negation.
  347.  
  348. `(ashift:M X C)'
  349.      Like `lshift' but for arithmetic left shift.
  350.  
  351. `(lshiftrt:M X C)'
  352. `(ashiftrt:M X C)'
  353.      Like `lshift' and `ashift' but for right shift.
  354.  
  355. `(rotate:M X C)'
  356. `(rotatert:M X C)'
  357.      Similar but represent left and right rotate.
  358.  
  359. `(abs:M X)'
  360.      Represents the absolute value of X, computed in mode M. X must be
  361.      valid for M.
  362.  
  363. `(sqrt:M X)'
  364.      Represents the square root of X, computed in mode M. X must be
  365.      valid for M.  Most often M will be a floating point mode.
  366.  
  367. `(ffs:M X)'
  368.      Represents one plus the index of the least significant 1-bit in X,
  369.      represented as an integer of mode M.  (The value is zero if X is
  370.      zero.)  The mode of X need not be M; depending on the target
  371.      machine, various mode combinations may be valid.
  372.  
  373. 
  374. File: gcc.info,  Node: Comparisons,  Next: Bit Fields,  Prev: Arithmetic,  Up: RTL
  375.  
  376. Comparison Operations
  377. =====================
  378.  
  379.    Comparison operators test a relation on two operands and are
  380. considered to represent a machine-dependent nonzero value
  381. (`STORE_FLAG_VALUE') if the relation holds, or zero if it does not. 
  382. The mode of the comparison is determined by the operands; they must
  383. both be valid for a common machine mode.  A comparison with both
  384. operands constant would be invalid as the machine mode could not be
  385. deduced from it, but such a comparison should never exist in RTL due to
  386. constant folding.
  387.  
  388.    Inequality comparisons come in two flavors, signed and unsigned. 
  389. Thus, there are distinct expression codes `gt' and `gtu' for signed and
  390. unsigned greater-than.  These can produce different results for the same
  391. pair of integer values: for example, 1 is signed greater-than -1 but not
  392. unsigned greater-than, because -1 when regarded as unsigned is actually
  393. `0xffffffff' which is greater than 1.
  394.  
  395.    The signed comparisons are also used for floating point values. 
  396. Floating point comparisons are distinguished by the machine modes of
  397. the operands.
  398.  
  399.    The comparison operators may be used to compare the condition codes
  400. `(cc0)' against zero, as in `(eq (cc0) (const_int 0))'.  Such a
  401. construct actually refers to the result of the preceding instruction in
  402. which the condition codes were set.  The above example stands for 1 if
  403. the condition codes were set to say "zero" or "equal", 0 otherwise.
  404. Although the same comparison operators are used for this as may be used
  405. in other contexts on actual data, no confusion can result since the
  406. machine description would never allow both kinds of uses in the same
  407. context.
  408.  
  409. `(eq X Y)'
  410.      1 if the values represented by X and Y are equal, otherwise 0.
  411.  
  412. `(ne X Y)'
  413.      1 if the values represented by X and Y are not equal, otherwise 0.
  414.  
  415. `(gt X Y)'
  416.      1 if the X is greater than Y.  If they are fixed-point, the
  417.      comparison is done in a signed sense.
  418.  
  419. `(gtu X Y)'
  420.      Like `gt' but does unsigned comparison, on fixed-point numbers
  421.      only.
  422.  
  423. `(lt X Y)'
  424. `(ltu X Y)'
  425.      Like `gt' and `gtu' but test for "less than".
  426.  
  427. `(ge X Y)'
  428. `(geu X Y)'
  429.      Like `gt' and `gtu' but test for "greater than or equal".
  430.  
  431. `(le X Y)'
  432. `(leu X Y)'
  433.      Like `gt' and `gtu' but test for "less than or equal".
  434.  
  435. `(if_then_else COND THEN ELSE)'
  436.      This is not a comparison operation but is listed here because it is
  437.      always used in conjunction with a comparison operation.  To be
  438.      precise, COND is a comparison expression.  This expression
  439.      represents a choice, according to COND, between the value
  440.      represented by THEN and the one represented by ELSE.
  441.  
  442.      On most machines, `if_then_else' expressions are valid only to
  443.      express conditional jumps.
  444.  
  445. 
  446. File: gcc.info,  Node: Bit Fields,  Next: Conversions,  Prev: Comparisons,  Up: RTL
  447.  
  448. Bit-fields
  449. ==========
  450.  
  451.    Special expression codes exist to represent bit-field instructions.
  452. These types of expressions are lvalues in RTL; they may appear on the
  453. left side of an assignment, indicating insertion of a value into the
  454. specified bit field.
  455.  
  456. `(sign_extract:SI LOC SIZE POS)'
  457.      This represents a reference to a sign-extended bit-field contained
  458.      or starting in LOC (a memory or register reference).  The bit field
  459.      is SIZE bits wide and starts at bit POS.  The compilation option
  460.      `BITS_BIG_ENDIAN' says which end of the memory unit POS counts
  461.      from.
  462.  
  463.      Which machine modes are valid for LOC depends on the machine, but
  464.      typically LOC should be a single byte when in memory or a full
  465.      word in a register.
  466.  
  467. `(zero_extract:SI LOC SIZE POS)'
  468.      Like `sign_extract' but refers to an unsigned or zero-extended bit
  469.      field.  The same sequence of bits are extracted, but they are
  470.      filled to an entire word with zeros instead of by sign-extension.
  471.  
  472. 
  473. File: gcc.info,  Node: Conversions,  Next: RTL Declarations,  Prev: Bit Fields,  Up: RTL
  474.  
  475. Conversions
  476. ===========
  477.  
  478.    All conversions between machine modes must be represented by
  479. explicit conversion operations.  For example, an expression which is
  480. the sum of a byte and a full word cannot be written as `(plus:SI
  481. (reg:QI 34) (reg:SI 80))' because the `plus' operation requires two
  482. operands of the same machine mode. Therefore, the byte-sized operand is
  483. enclosed in a conversion operation, as in
  484.  
  485.      (plus:SI (sign_extend:SI (reg:QI 34)) (reg:SI 80))
  486.  
  487.    The conversion operation is not a mere placeholder, because there
  488. may be more than one way of converting from a given starting mode to
  489. the desired final mode.  The conversion operation code says how to do
  490. it.
  491.  
  492. `(sign_extend:M X)'
  493.      Represents the result of sign-extending the value X to machine
  494.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  495.      a mode narrower than M.
  496.  
  497. `(zero_extend:M X)'
  498.      Represents the result of zero-extending the value X to machine
  499.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  500.      a mode narrower than M.
  501.  
  502. `(float_extend:M X)'
  503.      Represents the result of extending the value X to machine mode M. 
  504.      M must be a floating point mode and X a floating point value of a
  505.      mode narrower than M.
  506.  
  507. `(truncate:M X)'
  508.      Represents the result of truncating the value X to machine mode M.
  509.       M must be a fixed-point mode and X a fixed-point value of a mode
  510.      wider than M.
  511.  
  512. `(float_truncate:M X)'
  513.      Represents the result of truncating the value X to machine mode M.
  514.       M must be a floating point mode and X a floating point value of a
  515.      mode wider than M.
  516.  
  517. `(float:M X)'
  518.      Represents the result of converting fixed point value X, regarded
  519.      as signed, to floating point mode M.
  520.  
  521. `(unsigned_float:M X)'
  522.      Represents the result of converting fixed point value X, regarded
  523.      as unsigned, to floating point mode M.
  524.  
  525. `(fix:M X)'
  526.      When M is a fixed point mode, represents the result of converting
  527.      floating point value X to mode M, regarded as signed.  How
  528.      rounding is done is not specified, so this operation may be used
  529.      validly in compiling C code only for integer-valued operands.
  530.  
  531. `(unsigned_fix:M X)'
  532.      Represents the result of converting floating point value X to
  533.      fixed point mode M, regarded as unsigned.  How rounding is done is
  534.      not specified.
  535.  
  536. `(fix:M X)'
  537.      When M is a floating point mode, represents the result of
  538.      converting floating point value X (valid for mode M) to an
  539.      integer, still represented in floating point mode M, by rounding
  540.      towards zero.
  541.  
  542. 
  543. File: gcc.info,  Node: RTL Declarations,  Next: Side Effects,  Prev: Conversions,  Up: RTL
  544.  
  545. Declarations
  546. ============
  547.  
  548.    Declaration expression codes do not represent arithmetic operations
  549. but rather state assertions about their operands.
  550.  
  551. `(strict_low_part (subreg:M (reg:N R) 0))'
  552.      This expression code is used in only one context: operand 0 of a
  553.      `set' expression.  In addition, the operand of this expression
  554.      must be a `subreg' expression.
  555.  
  556.      The presence of `strict_low_part' says that the part of the
  557.      register which is meaningful in mode N, but is not part of mode M,
  558.      is not to be altered.  Normally, an assignment to such a subreg is
  559.      allowed to have undefined effects on the rest of the register when
  560.      M is less than a word.
  561.  
  562. 
  563. File: gcc.info,  Node: Side Effects,  Next: Incdec,  Prev: RTL Declarations,  Up: RTL
  564.  
  565. Side Effect Expressions
  566. =======================
  567.  
  568.    The expression codes described so far represent values, not actions.
  569. But machine instructions never produce values; they are meaningful only
  570. for their side effects on the state of the machine.  Special expression
  571. codes are used to represent side effects.
  572.  
  573.    The body of an instruction is always one of these side effect codes;
  574. the codes described above, which represent values, appear only as the
  575. operands of these.
  576.  
  577. `(set LVAL X)'
  578.      Represents the action of storing the value of X into the place
  579.      represented by LVAL.  LVAL must be an expression representing a
  580.      place that can be stored in: `reg' (or `subreg' or
  581.      `strict_low_part'), `mem', `pc' or `cc0'.
  582.  
  583.      If LVAL is a `reg', `subreg' or `mem', it has a machine mode; then
  584.      X must be valid for that mode.
  585.  
  586.      If LVAL is a `reg' whose machine mode is less than the full width
  587.      of the register, then it means that the part of the register
  588.      specified by the machine mode is given the specified value and the
  589.      rest of the register receives an undefined value.  Likewise, if
  590.      LVAL is a `subreg' whose machine mode is narrower than `SImode',
  591.      the rest of the register can be changed in an undefined way.
  592.  
  593.      If LVAL is a `strict_low_part' of a `subreg', then the part of the
  594.      register specified by the machine mode of the `subreg' is given
  595.      the value X and the rest of the register is not changed.
  596.  
  597.      If LVAL is `(cc0)', it has no machine mode, and X may have any
  598.      mode.  This represents a "test" or "compare" instruction.
  599.  
  600.      If LVAL is `(pc)', we have a jump instruction, and the
  601.      possibilities for X are very limited.  It may be a `label_ref'
  602.      expression (unconditional jump).  It may be an `if_then_else'
  603.      (conditional jump), in which case either the second or the third
  604.      operand must be `(pc)' (for the case which does not jump) and the
  605.      other of the two must be a `label_ref' (for the case which does
  606.      jump).  X may also be a `mem' or `(plus:SI (pc) Y)', where Y may
  607.      be a `reg' or a `mem'; these unusual patterns are used to
  608.      represent jumps through branch tables.
  609.  
  610. `(return)'
  611.      Represents a return from the current function, on machines where
  612.      this can be done with one instruction, such as Vaxes.  On machines
  613.      where a multi-instruction "epilogue" must be executed in order to
  614.      return from the function, returning is done by jumping to a label
  615.      which precedes the epilogue, and the `return' expression code is
  616.      never used.
  617.  
  618. `(call FUNCTION NARGS)'
  619.      Represents a function call.  FUNCTION is a `mem' expression whose
  620.      address is the address of the function to be called. NARGS is an
  621.      expression which can be used for two purposes: on some machines it
  622.      represents the number of bytes of stack argument; on others, it
  623.      represents the number of argument registers.
  624.  
  625.      Each machine has a standard machine mode which FUNCTION must have.
  626.       The machine description defines macro `FUNCTION_MODE' to expand
  627.      into the requisite mode name.  The purpose of this mode is to
  628.      specify what kind of addressing is allowed, on machines where the
  629.      allowed kinds of addressing depend on the machine mode being
  630.      addressed.
  631.  
  632. `(clobber X)'
  633.      Represents the storing or possible storing of an unpredictable,
  634.      undescribed value into X, which must be a `reg' or `mem'
  635.      expression.
  636.  
  637.      One place this is used is in string instructions that store
  638.      standard values into particular hard registers.  It may not be
  639.      worth the trouble to describe the values that are stored, but it
  640.      is essential to inform the compiler that the registers will be
  641.      altered, lest it attempt to keep data in them across the string
  642.      instruction.
  643.  
  644.      X may also be null--a null C pointer, no expression at all. Such a
  645.      `(clobber (null))' expression means that all memory locations must
  646.      be presumed clobbered.
  647.  
  648.      Note that the machine description classifies certain hard
  649.      registers as "call-clobbered".  All function call instructions are
  650.      assumed by default to clobber these registers, so there is no need
  651.      to use `clobber' expressions to indicate this fact.  Also, each
  652.      function call is assumed to have the potential to alter any memory
  653.      location, unless the function is declared `const'.
  654.  
  655.      When a `clobber' expression for a register appears inside a
  656.      `parallel' with other side effects, GNU CC guarantees that the
  657.      register is unoccupied both before and after that insn. 
  658.      Therefore, it is safe for the assembler code produced by the insn
  659.      to use the register as a temporary.  You can clobber either a
  660.      specific hard register or a pseudo register; in the latter case,
  661.      GNU CC will allocate a hard register that is available there for
  662.      use as a temporary.
  663.  
  664.      If you clobber a pseudo register in this way, use a pseudo register
  665.      which appears nowhere else--generate a new one each time. 
  666.      Otherwise, you may confuse CSE.
  667.  
  668.      There is one other known use for clobbering a pseudo register in a
  669.      `parallel': when one of the input operands of the insn is also
  670.      clobbered by the insn.  In this case, using the same pseudo
  671.      register in the clobber and elsewhere in the insn produces the
  672.      expected results.
  673.  
  674. `(use X)'
  675.      Represents the use of the value of X.  It indicates that the value
  676.      in X at this point in the program is needed, even though it may
  677.      not be apparent why this is so.  Therefore, the compiler will not
  678.      attempt to delete previous instructions whose only effect is to
  679.      store a value in X.  X must be a `reg' expression.
  680.  
  681. `(parallel [X0 X1 ...])'
  682.      Represents several side effects performed in parallel.  The square
  683.      brackets stand for a vector; the operand of `parallel' is a vector
  684.      of expressions.  X0, X1 and so on are individual side effect
  685.      expressions--expressions of code `set', `call', `return',
  686.      `clobber' or `use'.
  687.  
  688.      "In parallel" means that first all the values used in the
  689.      individual side-effects are computed, and second all the actual
  690.      side-effects are performed.  For example,
  691.  
  692.           (parallel [(set (reg:SI 1) (mem:SI (reg:SI 1)))
  693.                      (set (mem:SI (reg:SI 1)) (reg:SI 1))])
  694.  
  695.      says unambiguously that the values of hard register 1 and the
  696.      memory location addressed by it are interchanged.  In both places
  697.      where `(reg:SI 1)' appears as a memory address it refers to the
  698.      value in register 1 *before* the execution of the insn.
  699.  
  700.      It follows that it is *incorrect* to use `parallel' and expect the
  701.      result of one `set' to be available for the next one. For example,
  702.      people sometimes attempt to represent a jump-if-zero instruction
  703.      this way:
  704.  
  705.           (parallel [(set (cc0) (reg:SI 34))
  706.                      (set (pc) (if_then_else
  707.                                   (eq (cc0) (const_int 0))
  708.                                   (label_ref ...)
  709.                                   (pc)))])
  710.  
  711.      But this is incorrect, because it says that the jump condition
  712.      depends on the condition code value *before* this instruction, not
  713.      on the new value that is set by this instruction.
  714.  
  715.      Peephole optimization, which takes place in together with final
  716.      assembly code output, can produce insns whose patterns consist of
  717.      a `parallel' whose elements are the operands needed to output the
  718.      resulting assembler code--often `reg', `mem' or constant
  719.      expressions. This would not be well-formed RTL at any other stage
  720.      in compilation, but it is ok then because no further optimization
  721.      remains to be done. However, the definition of the macro
  722.      `NOTICE_UPDATE_CC' must deal with such insns if you define any
  723.      peephole optimizations.
  724.  
  725. `(sequence [INSNS ...])'
  726.      Represents a sequence of insns.  Each of the INSNS that appears in
  727.      the vector is suitable for appearing in the chain of insns, so it
  728.      must be an `insn', `jump_insn', `call_insn', `code_label',
  729.      `barrier' or `note'.
  730.  
  731.      A `sequence' RTX never appears in an actual insn.  It represents
  732.      the sequence of insns that result from a `define_expand' *before*
  733.      those insns are passed to `emit_insn' to insert them in the chain
  734.      of insns.  When actually inserted, the individual sub-insns are
  735.      separated out and the `sequence' is forgotten.
  736.  
  737.    Three expression codes appear in place of a side effect, as the body
  738. of an insn, though strictly speaking they do not describe side effects
  739. as such:
  740.  
  741. `(asm_input S)'
  742.      Represents literal assembler code as described by the string S.
  743.  
  744. `(addr_vec:M [LR0 LR1 ...])'
  745.      Represents a table of jump addresses.  The vector elements LR0,
  746.      etc., are `label_ref' expressions.  The mode M specifies how much
  747.      space is given to each address; normally M would be `Pmode'.
  748.  
  749. `(addr_diff_vec:M BASE [LR0 LR1 ...])'
  750.      Represents a table of jump addresses expressed as offsets from
  751.      BASE.  The vector elements LR0, etc., are `label_ref' expressions
  752.      and so is BASE.  The mode M specifies how much space is given to
  753.      each address-difference.
  754.  
  755. 
  756. File: gcc.info,  Node: Incdec,  Next: Assembler,  Prev: Side Effects,  Up: RTL
  757.  
  758. Embedded Side-Effects on Addresses
  759. ==================================
  760.  
  761.    Four special side-effect expression codes appear as memory addresses.
  762.  
  763. `(pre_dec:M X)'
  764.      Represents the side effect of decrementing X by a standard amount
  765.      and represents also the value that X has after being decremented. 
  766.      X must be a `reg' or `mem', but most machines allow only a `reg'. 
  767.      M must be the machine mode for pointers on the machine in use. 
  768.      The amount X is decremented by is the length in bytes of the
  769.      machine mode of the containing memory reference of which this
  770.      expression serves as the address.  Here is an example of its use:
  771.  
  772.           (mem:DF (pre_dec:SI (reg:SI 39)))
  773.  
  774.      This says to decrement pseudo register 39 by the length of a
  775.      `DFmode' value and use the result to address a `DFmode' value.
  776.  
  777. `(pre_inc:M X)'
  778.      Similar, but specifies incrementing X instead of decrementing it.
  779.  
  780. `(post_dec:M X)'
  781.      Represents the same side effect as `pre_dec' but a different
  782.      value.  The value represented here is the value X has before being
  783.      decremented.
  784.  
  785. `(post_inc:M X)'
  786.      Similar, but specifies incrementing X instead of decrementing it.
  787.  
  788.    These embedded side effect expressions must be used with care. 
  789. Instruction patterns may not use them.  Until the `flow' pass of the
  790. compiler, they may occur only to represent pushes onto the stack.  The
  791. `flow' pass finds cases where registers are incremented or decremented
  792. in one instruction and used as an address shortly before or after;
  793. these cases are then transformed to use pre- or post-increment or
  794. -decrement.
  795.  
  796.    Explicit popping of the stack could be represented with these
  797. embedded side effect operators, but that would not be safe; the
  798. instruction combination pass could move the popping past pushes, thus
  799. changing the meaning of the code.
  800.  
  801.    An instruction that can be represented with an embedded side effect
  802. could also be represented using `parallel' containing an additional
  803. `set' to describe how the address register is altered.  This is not
  804. done because machines that allow these operations at all typically
  805. allow them wherever a memory address is called for.  Describing them as
  806. additional parallel stores would require doubling the number of entries
  807. in the machine description.
  808.  
  809. 
  810. File: gcc.info,  Node: Assembler,  Next: Insns,  Prev: IncDec,  Up: RTL
  811.  
  812. Assembler Instructions as Expressions
  813. =====================================
  814.  
  815.    The RTX code `asm_operands' represents a value produced by a
  816. user-specified assembler instruction.  It is used to represent an `asm'
  817. statement with arguments.  An `asm' statement with a single output
  818. operand, like this:
  819.  
  820.      asm ("foo %1,%2,%0" : "=a" (outputvar) : "g" (x + y), "di" (*z));
  821.  
  822. is represented using a single `asm_operands' RTX which represents the
  823. value that is stored in `outputvar':
  824.  
  825.      (set RTX-FOR-OUTPUTVAR
  826.           (asm_operands "foo %1,%2,%0" "a" 0
  827.                         [RTX-FOR-ADDITION-RESULT RTX-FOR-*Z]
  828.                         [(asm_input:M1 "g")
  829.                          (asm_input:M2 "di")]))
  830.  
  831. Here the operands of the `asm_operands' RTX are the assembler template
  832. string, the output-operand's constraint, the index-number of the output
  833. operand among the output operands specified, a vector of input operand
  834. RTX's, and a vector of input-operand modes and constraints.  The mode
  835. M1 is the mode of the sum `x+y'; M2 is that of `*z'.
  836.  
  837.    When an `asm' statement has multiple output values, its insn has
  838. several such `set' RTX's inside of a `parallel'.  Each `set' contains a
  839. `asm_operands'; all of these share the same assembler template and
  840. vectors, but each contains the constraint for the respective output
  841. operand.  They are also distinguished by the output-operand index
  842. number, which is 0, 1, ... for successive output operands.
  843.  
  844. 
  845. File: gcc.info,  Node: Insns,  Next: Calls,  Prev: Assembler,  Up: RTL
  846.  
  847. Insns
  848. =====
  849.  
  850.    The RTL representation of the code for a function is a doubly-linked
  851. chain of objects called "insns".  Insns are expressions with special
  852. codes that are used for no other purpose.  Some insns are actual
  853. instructions; others represent dispatch tables for `switch' statements;
  854. others represent labels to jump to or various sorts of declarative
  855. information.
  856.  
  857.    In addition to its own specific data, each insn must have a unique
  858. id-number that distinguishes it from all other insns in the current
  859. function, and chain pointers to the preceding and following insns. 
  860. These three fields occupy the same position in every insn, independent
  861. of the expression code of the insn.  They could be accessed with `XEXP'
  862. and `XINT', but instead three special macros are always used:
  863.  
  864. `INSN_UID (I)'
  865.      Accesses the unique id of insn I.
  866.  
  867. `PREV_INSN (I)'
  868.      Accesses the chain pointer to the insn preceding I. If I is the
  869.      first insn, this is a null pointer.
  870.  
  871. `NEXT_INSN (I)'
  872.      Accesses the chain pointer to the insn following I. If I is the
  873.      last insn, this is a null pointer.
  874.  
  875.    The `NEXT_INSN' and `PREV_INSN' pointers must always correspond: if
  876. INSN is not the first insn,
  877.  
  878.      NEXT_INSN (PREV_INSN (INSN)) == INSN
  879.  
  880. is always true.
  881.  
  882.    Every insn has one of the following six expression codes:
  883.  
  884. `insn'
  885.      The expression code `insn' is used for instructions that do not
  886.      jump and do not do function calls.  Insns with code `insn' have
  887.      four additional fields beyond the three mandatory ones listed
  888.      above. These four are described in a table below.
  889.  
  890. `jump_insn'
  891.      The expression code `jump_insn' is used for instructions that may
  892.      jump (or, more generally, may contain `label_ref' expressions).
  893.      `jump_insn' insns have the same extra fields as `insn' insns,
  894.      accessed in the same way.  If there is an instruction to return
  895.      from the current function, it is recorded as a `jump_insn'.
  896.  
  897. `call_insn'
  898.      The expression code `call_insn' is used for instructions that may
  899.      do function calls.  It is important to distinguish these
  900.      instructions because they imply that certain registers and memory
  901.      locations may be altered unpredictably.
  902.  
  903.      `call_insn' insns have the same extra fields as `insn' insns,
  904.      accessed in the same way.
  905.  
  906. `code_label'
  907.      A `code_label' insn represents a label that a jump insn can jump
  908.      to. It contains one special field of data in addition to the three
  909.      standard ones. It is used to hold the "label number", a number
  910.      that identifies this label uniquely among all the labels in the
  911.      compilation (not just in the current function).  Ultimately, the
  912.      label is represented in the assembler output as an assembler label
  913.      `LN' where N is the label number.
  914.  
  915. `barrier'
  916.      Barriers are placed in the instruction stream after unconditional
  917.      jump instructions to indicate that the jumps are unconditional.
  918.      They contain no information beyond the three standard fields.
  919.  
  920. `note'
  921.      `note' insns are used to represent additional debugging and
  922.      declarative information.  They contain two nonstandard fields, an
  923.      integer which is accessed with the macro `NOTE_LINE_NUMBER' and a
  924.      string accessed with `NOTE_SOURCE_FILE'.
  925.  
  926.      If `NOTE_LINE_NUMBER' is positive, the note represents the
  927.      position of a source line and `NOTE_SOURCE_FILE' is the source
  928.      file name that the line came from.  These notes control generation
  929.      of line number data in the assembler output.
  930.  
  931.      Otherwise, `NOTE_LINE_NUMBER' is not really a line number but a
  932.      code with one of the following values (and `NOTE_SOURCE_FILE' must
  933.      contain a null pointer):
  934.  
  935.     `NOTE_INSN_DELETED'
  936.           Such a note is completely ignorable.  Some passes of the
  937.           compiler delete insns by altering them into notes of this
  938.           kind.
  939.  
  940.     `NOTE_INSN_BLOCK_BEG'
  941.     `NOTE_INSN_BLOCK_END'
  942.           These types of notes indicate the position of the beginning
  943.           and end of a level of scoping of variable names.  They
  944.           control the output of debugging information.
  945.  
  946.     `NOTE_INSN_LOOP_BEG'
  947.     `NOTE_INSN_LOOP_END'
  948.           These types of notes indicate the position of the beginning
  949.           and end of a `while' or `for' loop.  They enable the loop
  950.           optimizer to find loops quickly.
  951.  
  952.     `NOTE_INSN_FUNCTION_END'
  953.           Appears near the end of the function body, just before the
  954.           label that `return' statements jump to (on machine where a
  955.           single instruction does not suffice for returning).  This
  956.           note may be deleted by jump optimization.
  957.  
  958.     `NOTE_INSN_SETJMP'
  959.           Appears following each call to `setjmp' or a related function.
  960.  
  961.     `NOTE_INSN_LOOP_CONT'
  962.           Appears at the place in a loop that `continue' statements
  963.           jump to.
  964.  
  965.      These codes are printed symbolically when they appear in debugging
  966.      dumps.
  967.  
  968.    The machine mode of an insn is normally zero (`VOIDmode'), but the
  969. reload pass sets it to `QImode' if the insn needs reloading.
  970.  
  971.    Here is a table of the extra fields of `insn', `jump_insn' and
  972. `call_insn' insns:
  973.  
  974. `PATTERN (I)'
  975.      An expression for the side effect performed by this insn.
  976.  
  977. `INSN_CODE (I)'
  978.      An integer that says which pattern in the machine description
  979.      matches this insn, or -1 if the matching has not yet been
  980.      attempted.
  981.  
  982.      Such matching is never attempted and this field is not used on an
  983.      insn whose pattern consists of a single `use', `clobber', `asm',
  984.      `addr_vec' or `addr_diff_vec' expression.
  985.  
  986. `LOG_LINKS (I)'
  987.      A list (chain of `insn_list' expressions) of previous "related"
  988.      insns: insns which store into registers values that are used for
  989.      the first time in this insn.  (An additional constraint is that
  990.      neither a jump nor a label may come between the related insns). 
  991.      This list is set up by the flow analysis pass; it is a null
  992.      pointer until then.
  993.  
  994. `REG_NOTES (I)'
  995.      A list (chain of `expr_list' expressions) giving information about
  996.      the usage of registers in this insn.  This list is set up by the
  997.      flow analysis pass; it is a null pointer until then.
  998.  
  999.    The `LOG_LINKS' field of an insn is a chain of `insn_list'
  1000. expressions.  Each of these has two operands: the first is an insn, and
  1001. the second is another `insn_list' expression (the next one in the
  1002. chain).  The last `insn_list' in the chain has a null pointer as second
  1003. operand.  The significant thing about the chain is which insns appear
  1004. in it (as first operands of `insn_list' expressions).  Their order is
  1005. not significant.
  1006.  
  1007.    The `REG_NOTES' field of an insn is a similar chain but of
  1008. `expr_list' expressions instead of `insn_list'.  There are several
  1009. kinds of register notes, which are distinguished by the machine mode of
  1010. the `expr_list', which in a register note is really understood as being
  1011. an `enum reg_note'.  The first operand OP of the `expr_list' is data
  1012. whose meaning depends on the kind of note.  Here are the kinds of
  1013. register note:
  1014.  
  1015. `REG_DEAD'
  1016.      The register OP dies in this insn; that is to say, altering the
  1017.      value immediately after this insn would not affect the future
  1018.      behavior of the program.
  1019.  
  1020. `REG_INC'
  1021.      The register OP is incremented (or decremented; at this level
  1022.      there is no distinction) by an embedded side effect inside this
  1023.      insn. This means it appears in a `post_inc', `pre_inc', `post_dec'
  1024.      or `pre_dec' RTX.
  1025.  
  1026. `REG_EQUIV'
  1027.      The register that is set by this insn will be equal to OP at run
  1028.      time, and could validly be replaced in all its occurrences by OP. 
  1029.      ("Validly" here refers to the data flow of the program; simple
  1030.      replacement may make some insns invalid.)
  1031.  
  1032.      The value which the insn explicitly copies into the register may
  1033.      look different from OP, but they will be equal at run time.
  1034.  
  1035.      For example, when a constant is loaded into a register that is
  1036.      never assigned any other value, this kind of note is used.
  1037.  
  1038.      When a parameter is copied into a pseudo-register at entry to a
  1039.      function, a note of this kind records that the register is
  1040.      equivalent to the stack slot where the parameter was passed. 
  1041.      Although in this case the register may be set by other insns, it
  1042.      is still valid to replace the register by the stack slot
  1043.      throughout the function.
  1044.  
  1045. `REG_EQUAL'
  1046.      The register that is set by this insn will be equal to OP at run
  1047.      time at the end of this insn (but not necessarily elsewhere in the
  1048.      function).
  1049.  
  1050.      The RTX OP is typically an arithmetic expression.  For example,
  1051.      when a sequence of insns such as a library call is used to perform
  1052.      an arithmetic operation, this kind of note is attached to the insn
  1053.      that produces or copies the final value.  It tells the CSE pass
  1054.      how to think of that value.
  1055.  
  1056. `REG_RETVAL'
  1057.      This insn copies the value of a library call, and OP is the first
  1058.      insn that was generated to set up the arguments for the library
  1059.      call.
  1060.  
  1061.      Flow analysis uses this note to delete all of a library call whose
  1062.      result is dead.
  1063.  
  1064. `REG_WAS_0'
  1065.      The register OP contained zero before this insn.  You can rely on
  1066.      this note if it is present; its absence implies nothing.
  1067.  
  1068. `REG_LIBCALL'
  1069.      This is the inverse of `REG_RETVAL': it is placed on the first
  1070.      insn of a library call, and it points to the last one.
  1071.  
  1072.      Loop optimization uses this note to move an entire library call out
  1073.      of a loop when its value is constant.
  1074.  
  1075. `REG_NONNEG'
  1076.      The register OP is known to have nonnegative value when this insn
  1077.      is reached.
  1078.  
  1079.    For convenience, the machine mode in an `insn_list' or `expr_list'
  1080. is printed using these symbolic codes in debugging dumps.
  1081.  
  1082.    The only difference between the expression codes `insn_list' and
  1083. `expr_list' is that the first operand of an `insn_list' is assumed to
  1084. be an insn and is printed in debugging dumps as the insn's unique id;
  1085. the first operand of an `expr_list' is printed in the ordinary way as
  1086. an expression.
  1087.  
  1088. 
  1089. File: gcc.info,  Node: Calls,  Next: Sharing,  Prev: Insns,  Up: RTL
  1090.  
  1091. RTL Representation of Function-Call Insns
  1092. =========================================
  1093.  
  1094.    Insns that call subroutines have the RTL expression code `call_insn'.
  1095. These insns must satisfy special rules, and their bodies must use a
  1096. special RTL expression code, `call'.
  1097.  
  1098.    A `call' expression has two operands, as follows:
  1099.  
  1100.      (call (mem:FM ADDR) NBYTES)
  1101.  
  1102. Here NBYTES is an operand that represents the number of bytes of
  1103. argument data being passed to the subroutine, FM is a machine mode
  1104. (which must equal as the definition of the `FUNCTION_MODE' macro in the
  1105. machine description) and ADDR represents the address of the subroutine.
  1106.  
  1107.    For a subroutine that returns no value, the `call' RTX as shown above
  1108. is the entire body of the insn.
  1109.  
  1110.    For a subroutine that returns a value whose mode is not `BLKmode',
  1111. the value is returned in a hard register.  If this register's number is
  1112. R, then the body of the call insn looks like this:
  1113.  
  1114.      (set (reg:M R)
  1115.           (call (mem:FM ADDR) NBYTES))
  1116.  
  1117. This RTL expression makes it clear (to the optimizer passes) that the
  1118. appropriate register receives a useful value in this insn.
  1119.  
  1120.    Immediately after RTL generation, if the value of the subroutine is
  1121. actually used, this call insn is always followed closely by an insn
  1122. which refers to the register R.  This remains true through all the
  1123. optimizer passes until cross jumping occurs.
  1124.  
  1125.    The following insn has one of two forms.  Either it copies the value
  1126. into a pseudo-register, like this:
  1127.  
  1128.      (set (reg:M P) (reg:M R))
  1129.  
  1130. or (in the case where the calling function will simply return whatever
  1131. value the call produced, and no operation is needed to do this):
  1132.  
  1133.      (use (reg:M R))
  1134.  
  1135. Between the call insn and this following insn there may intervene only a
  1136. stack-adjustment insn (and perhaps some `note' insns).
  1137.  
  1138.    When a subroutine returns a `BLKmode' value, it is handled by
  1139. passing to the subroutine the address of a place to store the value. So
  1140. the call insn itself does not "return" any value, and it has the same
  1141. RTL form as a call that returns nothing.
  1142.  
  1143.