home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / msdos / djgpp / docs / gcc / gcc.i10 < prev    next >
Encoding:
GNU Info File  |  1993-05-29  |  48.2 KB  |  1,171 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  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, 1993 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: Flags,  Next: Machine Modes,  Prev: Accessors,  Up: RTL
  29.  
  30. Flags in an RTL Expression
  31. ==========================
  32.  
  33.    RTL expressions contain several flags (one-bit bit-fields) that are
  34. used in certain types of expression.  Most often they are accessed with
  35. the following macros:
  36.  
  37. `MEM_VOLATILE_P (X)'
  38.      In `mem' expressions, nonzero for volatile memory references.
  39.      Stored in the `volatil' field and printed as `/v'.
  40.  
  41. `MEM_IN_STRUCT_P (X)'
  42.      In `mem' expressions, nonzero for reference to an entire
  43.      structure, union or array, or to a component of one.  Zero for
  44.      references to a scalar variable or through a pointer to a scalar.
  45.      Stored in the `in_struct' field and printed as `/s'.
  46.  
  47. `REG_LOOP_TEST_P'
  48.      In `reg' expressions, nonzero if this register's entire life is
  49.      contained in the exit test code for some loop.  Stored in the
  50.      `in_struct' field and printed as `/s'.
  51.  
  52. `REG_USERVAR_P (X)'
  53.      In a `reg', nonzero if it corresponds to a variable present in the
  54.      user's source code.  Zero for temporaries generated internally by
  55.      the compiler.  Stored in the `volatil' field and printed as `/v'.
  56.  
  57. `REG_FUNCTION_VALUE_P (X)'
  58.      Nonzero in a `reg' if it is the place in which this function's
  59.      value is going to be returned.  (This happens only in a hard
  60.      register.)  Stored in the `integrated' field and printed as `/i'.
  61.  
  62.      The same hard register may be used also for collecting the values
  63.      of functions called by this one, but `REG_FUNCTION_VALUE_P' is zero
  64.      in this kind of use.
  65.  
  66. `SUBREG_PROMOTED_VAR_P'
  67.      Nonzero in a `subreg' if it was made when accessing an object that
  68.      was promoted to a wider mode in accord with the `PROMOTED_MODE'
  69.      machine description macro (*note Storage Layout::.).  In this
  70.      case, the mode of the `subreg' is the declared mode of the object
  71.      and the mode of `SUBREG_REG' is the mode of the register that
  72.      holds the object.  Promoted variables are always either sign- or
  73.      zero-extended to the wider mode on every assignment.  Stored in
  74.      the `in_struct' field and printed as `/s'.
  75.  
  76. `SUBREG_PROMOTED_UNSIGNED_P'
  77.      Nonzero in a `subreg' that has `SUBREG_PROMOTED_VAR_P' nonzero if
  78.      the object being referenced is kept zero-extended and zero if it
  79.      is kept sign-extended.  Stored in the `unchanging' field and
  80.      printed as `/u'.
  81.  
  82. `RTX_UNCHANGING_P (X)'
  83.      Nonzero in a `reg' or `mem' if the value is not changed.  (This
  84.      flag is not set for memory references via pointers to constants.
  85.      Such pointers only guarantee that the object will not be changed
  86.      explicitly by the current function.  The object might be changed by
  87.      other functions or by aliasing.)  Stored in the `unchanging' field
  88.      and printed as `/u'.
  89.  
  90. `RTX_INTEGRATED_P (INSN)'
  91.      Nonzero in an insn if it resulted from an in-line function call.
  92.      Stored in the `integrated' field and printed as `/i'.  This may be
  93.      deleted; nothing currently depends on it.
  94.  
  95. `SYMBOL_REF_USED (X)'
  96.      In a `symbol_ref', indicates that X has been used.  This is
  97.      normally only used to ensure that X is only declared external
  98.      once.  Stored in the `used' field.
  99.  
  100. `SYMBOL_REF_FLAG (X)'
  101.      In a `symbol_ref', this is used as a flag for machine-specific
  102.      purposes.  Stored in the `volatil' field and printed as `/v'.
  103.  
  104. `LABEL_OUTSIDE_LOOP_P'
  105.      In `label_ref' expressions, nonzero if this is a reference to a
  106.      label that is outside the innermost loop containing the reference
  107.      to the label.  Stored in the `in_struct' field and printed as `/s'.
  108.  
  109. `INSN_DELETED_P (INSN)'
  110.      In an insn, nonzero if the insn has been deleted.  Stored in the
  111.      `volatil' field and printed as `/v'.
  112.  
  113. `INSN_ANNULLED_BRANCH_P (INSN)'
  114.      In an `insn' in the delay slot of a branch insn, indicates that an
  115.      annulling branch should be used.  See the discussion under
  116.      `sequence' below.  Stored in the `unchanging' field and printed as
  117.      `/u'.
  118.  
  119. `INSN_FROM_TARGET_P (INSN)'
  120.      In an `insn' in a delay slot of a branch, indicates that the insn
  121.      is from the target of the branch.  If the branch insn has
  122.      `INSN_ANNULLED_BRANCH_P' set, this insn should only be executed if
  123.      the branch is taken.  For annulled branches with this bit clear,
  124.      the insn should be executed only if the branch is not taken.
  125.      Stored in the `in_struct' field and printed as `/s'.
  126.  
  127. `CONSTANT_POOL_ADDRESS_P (X)'
  128.      Nonzero in a `symbol_ref' if it refers to part of the current
  129.      function's "constants pool".  These are addresses close to the
  130.      beginning of the function, and GNU CC assumes they can be addressed
  131.      directly (perhaps with the help of base registers).  Stored in the
  132.      `unchanging' field and printed as `/u'.
  133.  
  134. `CONST_CALL_P (X)'
  135.      In a `call_insn', indicates that the insn represents a call to a
  136.      const function.  Stored in the `unchanging' field and printed as
  137.      `/u'.
  138.  
  139. `LABEL_PRESERVE_P (X)'
  140.      In a `code_label', indicates that the label can never be deleted.
  141.      Labels referenced by a non-local goto will have this bit set.
  142.      Stored in the `in_struct' field and printed as `/s'.
  143.  
  144. `SCHED_GROUP_P (INSN)'
  145.      During instruction scheduling, in an insn, indicates that the
  146.      previous insn must be scheduled together with this insn.  This is
  147.      used to ensure that certain groups of instructions will not be
  148.      split up by the instruction scheduling pass, for example, `use'
  149.      insns before a `call_insn' may not be separated from the
  150.      `call_insn'.  Stored in the `in_struct' field and printed as `/s'.
  151.  
  152.    These are the fields which the above macros refer to:
  153.  
  154. `used'
  155.      Normally, this flag is used only momentarily, at the end of RTL
  156.      generation for a function, to count the number of times an
  157.      expression appears in insns.  Expressions that appear more than
  158.      once are copied, according to the rules for shared structure
  159.      (*note Sharing::.).
  160.  
  161.      In a `symbol_ref', it indicates that an external declaration for
  162.      the symbol has already been written.
  163.  
  164.      In a `reg', it is used by the leaf register renumbering code to
  165.      ensure that each register is only renumbered once.
  166.  
  167. `volatil'
  168.      This flag is used in `mem', `symbol_ref' and `reg' expressions and
  169.      in insns.  In RTL dump files, it is printed as `/v'.
  170.  
  171.      In a `mem' expression, it is 1 if the memory reference is volatile.
  172.      Volatile memory references may not be deleted, reordered or
  173.      combined.
  174.  
  175.      In a `symbol_ref' expression, it is used for machine-specific
  176.      purposes.
  177.  
  178.      In a `reg' expression, it is 1 if the value is a user-level
  179.      variable.  0 indicates an internal compiler temporary.
  180.  
  181.      In an insn, 1 means the insn has been deleted.
  182.  
  183. `in_struct'
  184.      In `mem' expressions, it is 1 if the memory datum referred to is
  185.      all or part of a structure or array; 0 if it is (or might be) a
  186.      scalar variable.  A reference through a C pointer has 0 because
  187.      the pointer might point to a scalar variable.  This information
  188.      allows the compiler to determine something about possible cases of
  189.      aliasing.
  190.  
  191.      In an insn in the delay slot of a branch, 1 means that this insn
  192.      is from the target of the branch.
  193.  
  194.      During instruction scheduling, in an insn, 1 means that this insn
  195.      must be scheduled as part of a group together with the previous
  196.      insn.
  197.  
  198.      In `reg' expressions, it is 1 if the register has its entire life
  199.      contained within the test expression of some loopl.
  200.  
  201.      In `subreg' expressions, 1 means that the `subreg' is accessing an
  202.      object that has had its mode promoted from a wider mode.
  203.  
  204.      In `label_ref' expressions, 1 means that the referenced label is
  205.      outside the innermost loop containing the insn in which the
  206.      `label_ref' was found.
  207.  
  208.      In `code_label' expressions, it is 1 if the label may never be
  209.      deleted.  This is used for labels which are the target of
  210.      non-local gotos.
  211.  
  212.      In an RTL dump, this flag is represented as `/s'.
  213.  
  214. `unchanging'
  215.      In `reg' and `mem' expressions, 1 means that the value of the
  216.      expression never changes.
  217.  
  218.      In `subreg' expressions, it is 1 if the `subreg' references an
  219.      unsigned object whose mode has been promoted to a wider mode.
  220.  
  221.      In an insn, 1 means that this is an annulling branch.
  222.  
  223.      In a `symbol_ref' expression, 1 means that this symbol addresses
  224.      something in the per-function constants pool.
  225.  
  226.      In a `call_insn', 1 means that this instruction is a call to a
  227.      const function.
  228.  
  229.      In an RTL dump, this flag is represented as `/u'.
  230.  
  231. `integrated'
  232.      In some kinds of expressions, including insns, this flag means the
  233.      rtl was produced by procedure integration.
  234.  
  235.      In a `reg' expression, this flag indicates the register containing
  236.      the value to be returned by the current function.  On machines
  237.      that pass parameters in registers, the same register number may be
  238.      used for parameters as well, but this flag is not set on such uses.
  239.  
  240. 
  241. File: gcc.info,  Node: Machine Modes,  Next: Constants,  Prev: Flags,  Up: RTL
  242.  
  243. Machine Modes
  244. =============
  245.  
  246.    A machine mode describes a size of data object and the
  247. representation used for it.  In the C code, machine modes are
  248. represented by an enumeration type, `enum machine_mode', defined in
  249. `machmode.def'.  Each RTL expression has room for a machine mode and so
  250. do certain kinds of tree expressions (declarations and types, to be
  251. precise).
  252.  
  253.    In debugging dumps and machine descriptions, the machine mode of an
  254. RTL expression is written after the expression code with a colon to
  255. separate them.  The letters `mode' which appear at the end of each
  256. machine mode name are omitted.  For example, `(reg:SI 38)' is a `reg'
  257. expression with machine mode `SImode'.  If the mode is `VOIDmode', it
  258. is not written at all.
  259.  
  260.    Here is a table of machine modes.  The term "byte" below refers to an
  261. object of `BITS_PER_UNIT' bits (*note Storage Layout::.).
  262.  
  263. `QImode'
  264.      "Quarter-Integer" mode represents a single byte treated as an
  265.      integer.
  266.  
  267. `HImode'
  268.      "Half-Integer" mode represents a two-byte integer.
  269.  
  270. `PSImode'
  271.      "Partial Single Integer" mode represents an integer which occupies
  272.      four bytes but which doesn't really use all four.  On some
  273.      machines, this is the right mode to use for pointers.
  274.  
  275. `SImode'
  276.      "Single Integer" mode represents a four-byte integer.
  277.  
  278. `PDImode'
  279.      "Partial Double Integer" mode represents an integer which occupies
  280.      eight bytes but which doesn't really use all eight.  On some
  281.      machines, this is the right mode to use for certain pointers.
  282.  
  283. `DImode'
  284.      "Double Integer" mode represents an eight-byte integer.
  285.  
  286. `TImode'
  287.      "Tetra Integer" (?) mode represents a sixteen-byte integer.
  288.  
  289. `SFmode'
  290.      "Single Floating" mode represents a single-precision (four byte)
  291.      floating point number.
  292.  
  293. `DFmode'
  294.      "Double Floating" mode represents a double-precision (eight byte)
  295.      floating point number.
  296.  
  297. `XFmode'
  298.      "Extended Floating" mode represents a triple-precision (twelve
  299.      byte) floating point number.  This mode is used for IEEE extended
  300.      floating point.
  301.  
  302. `TFmode'
  303.      "Tetra Floating" mode represents a quadruple-precision (sixteen
  304.      byte) floating point number.
  305.  
  306. `CCmode'
  307.      "Condition Code" mode represents the value of a condition code,
  308.      which is a machine-specific set of bits used to represent the
  309.      result of a comparison operation.  Other machine-specific modes
  310.      may also be used for the condition code.  These modes are not used
  311.      on machines that use `cc0' (see *note Condition Code::.).
  312.  
  313. `BLKmode'
  314.      "Block" mode represents values that are aggregates to which none of
  315.      the other modes apply.  In RTL, only memory references can have
  316.      this mode, and only if they appear in string-move or vector
  317.      instructions.  On machines which have no such instructions,
  318.      `BLKmode' will not appear in RTL.
  319.  
  320. `VOIDmode'
  321.      Void mode means the absence of a mode or an unspecified mode.  For
  322.      example, RTL expressions of code `const_int' have mode `VOIDmode'
  323.      because they can be taken to have whatever mode the context
  324.      requires.  In debugging dumps of RTL, `VOIDmode' is expressed by
  325.      the absence of any mode.
  326.  
  327. `SCmode, DCmode, XCmode, TCmode'
  328.      These modes stand for a complex number represented as a pair of
  329.      floating point values.  The values are in `SFmode', `DFmode',
  330.      `XFmode', and `TFmode', respectively.  Since C does not support
  331.      complex numbers, these machine modes are only partially
  332.      implemented.
  333.  
  334.    The machine description defines `Pmode' as a C macro which expands
  335. into the machine mode used for addresses.  Normally this is the mode
  336. whose size is `BITS_PER_WORD', `SImode' on 32-bit machines.
  337.  
  338.    The only modes which a machine description must support are
  339. `QImode', and the modes corresponding to `BITS_PER_WORD',
  340. `FLOAT_TYPE_SIZE' and `DOUBLE_TYPE_SIZE'.  The compiler will attempt to
  341. use `DImode' for 8-byte structures and unions, but this can be
  342. prevented by overriding the definition of `MAX_FIXED_MODE_SIZE'.
  343. Alternatively, you can have the compiler use `TImode' for 16-byte
  344. structures and unions.  Likewise, you can arrange for the C type `short
  345. int' to avoid using `HImode'.
  346.  
  347.    Very few explicit references to machine modes remain in the compiler
  348. and these few references will soon be removed.  Instead, the machine
  349. modes are divided into mode classes.  These are represented by the
  350. enumeration type `enum mode_class' defined in `machmode.h'.  The
  351. possible mode classes are:
  352.  
  353. `MODE_INT'
  354.      Integer modes.  By default these are `QImode', `HImode', `SImode',
  355.      `DImode', and `TImode'.
  356.  
  357. `MODE_PARTIAL_INT'
  358.      The "partial integer" modes, `PSImode' and `PDImode'.
  359.  
  360. `MODE_FLOAT'
  361.      floating point modes.  By default these are `SFmode', `DFmode',
  362.      `XFmode' and `TFmode'.
  363.  
  364. `MODE_COMPLEX_INT'
  365.      Complex integer modes.  (These are not currently implemented).
  366.  
  367. `MODE_COMPLEX_FLOAT'
  368.      Complex floating point modes.  By default these are `SCmode',
  369.      `DCmode', `XCmode', and `TCmode'.
  370.  
  371. `MODE_FUNCTION'
  372.      Algol or Pascal function variables including a static chain.
  373.      (These are not currently implemented).
  374.  
  375. `MODE_CC'
  376.      Modes representing condition code values.  These are `CCmode' plus
  377.      any modes listed in the `EXTRA_CC_MODES' macro.  *Note Jump
  378.      Patterns::, also see *Note Condition Code::.
  379.  
  380. `MODE_RANDOM'
  381.      This is a catchall mode class for modes which don't fit into the
  382.      above classes.  Currently `VOIDmode' and `BLKmode' are in
  383.      `MODE_RANDOM'.
  384.  
  385.    Here are some C macros that relate to machine modes:
  386.  
  387. `GET_MODE (X)'
  388.      Returns the machine mode of the RTX X.
  389.  
  390. `PUT_MODE (X, NEWMODE)'
  391.      Alters the machine mode of the RTX X to be NEWMODE.
  392.  
  393. `NUM_MACHINE_MODES'
  394.      Stands for the number of machine modes available on the target
  395.      machine.  This is one greater than the largest numeric value of any
  396.      machine mode.
  397.  
  398. `GET_MODE_NAME (M)'
  399.      Returns the name of mode M as a string.
  400.  
  401. `GET_MODE_CLASS (M)'
  402.      Returns the mode class of mode M.
  403.  
  404. `GET_MODE_WIDER_MODE (M)'
  405.      Returns the next wider natural mode.  For example, the macro
  406.      `GET_WIDER_MODE(QImode)' returns `HImode'.
  407.  
  408. `GET_MODE_SIZE (M)'
  409.      Returns the size in bytes of a datum of mode M.
  410.  
  411. `GET_MODE_BITSIZE (M)'
  412.      Returns the size in bits of a datum of mode M.
  413.  
  414. `GET_MODE_MASK (M)'
  415.      Returns a bitmask containing 1 for all bits in a word that fit
  416.      within mode M.  This macro can only be used for modes whose
  417.      bitsize is less than or equal to `HOST_BITS_PER_INT'.
  418.  
  419. `GET_MODE_ALIGNMENT (M))'
  420.      Return the required alignment, in bits, for an object of mode M.
  421.  
  422. `GET_MODE_UNIT_SIZE (M)'
  423.      Returns the size in bytes of the subunits of a datum of mode M.
  424.      This is the same as `GET_MODE_SIZE' except in the case of complex
  425.      modes.  For them, the unit size is the size of the real or
  426.      imaginary part.
  427.  
  428. `GET_MODE_NUNITS (M)'
  429.      Returns the number of units contained in a mode, i.e.,
  430.      `GET_MODE_SIZE' divided by `GET_MODE_UNIT_SIZE'.
  431.  
  432. `GET_CLASS_NARROWEST_MODE (C)'
  433.      Returns the narrowest mode in mode class C.
  434.  
  435.    The global variables `byte_mode' and `word_mode' contain modes whose
  436. classes are `MODE_INT' and whose bitsizes are either `BITS_PER_UNIT' or
  437. `BITS_PER_WORD', respectively.  On 32-bit machines, these are `QImode'
  438. and `SImode', respectively.
  439.  
  440. 
  441. File: gcc.info,  Node: Constants,  Next: Regs and Memory,  Prev: Machine Modes,  Up: RTL
  442.  
  443. Constant Expression Types
  444. =========================
  445.  
  446.    The simplest RTL expressions are those that represent constant
  447. values.
  448.  
  449. `(const_int I)'
  450.      This type of expression represents the integer value I.  I is
  451.      customarily accessed with the macro `INTVAL' as in `INTVAL (EXP)',
  452.      which is equivalent to `XWINT (EXP, 0)'.
  453.  
  454.      There is only one expression object for the integer value zero; it
  455.      is the value of the variable `const0_rtx'.  Likewise, the only
  456.      expression for integer value one is found in `const1_rtx', the only
  457.      expression for integer value two is found in `const2_rtx', and the
  458.      only expression for integer value negative one is found in
  459.      `constm1_rtx'.  Any attempt to create an expression of code
  460.      `const_int' and value zero, one, two or negative one will return
  461.      `const0_rtx', `const1_rtx', `const2_rtx' or `constm1_rtx' as
  462.      appropriate.
  463.  
  464.      Similarly, there is only one object for the integer whose value is
  465.      `STORE_FLAG_VALUE'.  It is found in `const_true_rtx'.  If
  466.      `STORE_FLAG_VALUE' is one, `const_true_rtx' and `const1_rtx' will
  467.      point to the same object.  If `STORE_FLAG_VALUE' is -1,
  468.      `const_true_rtx' and `constm1_rtx' will point to the same object.
  469.  
  470. `(const_double:M ADDR I0 I1 ...)'
  471.      Represents either a floating-point constant of mode M or an
  472.      integer constant too large to fit into `HOST_BITS_PER_WIDE_INT'
  473.      bits but small enough to fit within twice that number of bits (GNU
  474.      CC does not provide a mechanism to represent even larger
  475.      constants).  In the latter case, M will be `VOIDmode'.
  476.  
  477.      ADDR is used to contain the `mem' expression that corresponds to
  478.      the location in memory that at which the constant can be found.  If
  479.      it has not been allocated a memory location, but is on the chain
  480.      of all `const_double' expressions in this compilation (maintained
  481.      using an undisplayed field), ADDR contains `const0_rtx'.  If it is
  482.      not on the chain, ADDR contains `cc0_rtx'.  ADDR is customarily
  483.      accessed with the macro `CONST_DOUBLE_MEM' and the chain field via
  484.      `CONST_DOUBLE_CHAIN'.
  485.  
  486.      If M is `VOIDmode', the bits of the value are stored in I0 and I1.
  487.      I0 is customarily accessed with the macro `CONST_DOUBLE_LOW' and
  488.      I1 with `CONST_DOUBLE_HIGH'.
  489.  
  490.      If the constant is floating point (regardless of its precision),
  491.      then the number of integers used to store the value depends on the
  492.      size of `REAL_VALUE_TYPE' (*note Cross-compilation::.).  The
  493.      integers represent a floating point number, but not precisely in
  494.      the target machine's or host machine's floating point format.  To
  495.      convert them to the precise bit pattern used by the target
  496.      machine, use the macro `REAL_VALUE_TO_TARGET_DOUBLE' and friends
  497.      (*note Data Output::.).
  498.  
  499.      The macro `CONST0_RTX (MODE)' refers to an expression with value 0
  500.      in mode MODE.  If mode MODE is of mode class `MODE_INT', it
  501.      returns `const0_rtx'.  Otherwise, it returns a `CONST_DOUBLE'
  502.      expression in mode MODE.  Similarly, the macro `CONST1_RTX (MODE)'
  503.      refers to an expression with value 1 in mode MODE and similarly
  504.      for `CONST2_RTX'.
  505.  
  506. `(const_string STR)'
  507.      Represents a constant string with value STR.  Currently this is
  508.      used only for insn attributes (*note Insn Attributes::.) since
  509.      constant strings in C are placed in memory.
  510.  
  511. `(symbol_ref:MODE SYMBOL)'
  512.      Represents the value of an assembler label for data.  SYMBOL is a
  513.      string that describes the name of the assembler label.  If it
  514.      starts with a `*', the label is the rest of SYMBOL not including
  515.      the `*'.  Otherwise, the label is SYMBOL, usually prefixed with
  516.      `_'.
  517.  
  518.      The `symbol_ref' contains a mode, which is usually `Pmode'.
  519.      Usually that is the only mode for which a symbol is directly valid.
  520.  
  521. `(label_ref LABEL)'
  522.      Represents the value of an assembler label for code.  It contains
  523.      one operand, an expression, which must be a `code_label' that
  524.      appears in the instruction sequence to identify the place where
  525.      the label should go.
  526.  
  527.      The reason for using a distinct expression type for code label
  528.      references is so that jump optimization can distinguish them.
  529.  
  530. `(const:M EXP)'
  531.      Represents a constant that is the result of an assembly-time
  532.      arithmetic computation.  The operand, EXP, is an expression that
  533.      contains only constants (`const_int', `symbol_ref' and `label_ref'
  534.      expressions) combined with `plus' and `minus'.  However, not all
  535.      combinations are valid, since the assembler cannot do arbitrary
  536.      arithmetic on relocatable symbols.
  537.  
  538.      M should be `Pmode'.
  539.  
  540. `(high:M EXP)'
  541.      Represents the high-order bits of EXP, usually a `symbol_ref'.
  542.      The number of bits is machine-dependent and is normally the number
  543.      of bits specified in an instruction that initializes the high
  544.      order bits of a register.  It is used with `lo_sum' to represent
  545.      the typical two-instruction sequence used in RISC machines to
  546.      reference a global memory location.
  547.  
  548.      M should be `Pmode'.
  549.  
  550. 
  551. File: gcc.info,  Node: Regs and Memory,  Next: Arithmetic,  Prev: Constants,  Up: RTL
  552.  
  553. Registers and Memory
  554. ====================
  555.  
  556.    Here are the RTL expression types for describing access to machine
  557. registers and to main memory.
  558.  
  559. `(reg:M N)'
  560.      For small values of the integer N (those that are less than
  561.      `FIRST_PSEUDO_REGISTER'), this stands for a reference to machine
  562.      register number N: a "hard register".  For larger values of N, it
  563.      stands for a temporary value or "pseudo register".  The compiler's
  564.      strategy is to generate code assuming an unlimited number of such
  565.      pseudo registers, and later convert them into hard registers or
  566.      into memory references.
  567.  
  568.      M is the machine mode of the reference.  It is necessary because
  569.      machines can generally refer to each register in more than one
  570.      mode.  For example, a register may contain a full word but there
  571.      may be instructions to refer to it as a half word or as a single
  572.      byte, as well as instructions to refer to it as a floating point
  573.      number of various precisions.
  574.  
  575.      Even for a register that the machine can access in only one mode,
  576.      the mode must always be specified.
  577.  
  578.      The symbol `FIRST_PSEUDO_REGISTER' is defined by the machine
  579.      description, since the number of hard registers on the machine is
  580.      an invariant characteristic of the machine.  Note, however, that
  581.      not all of the machine registers must be general registers.  All
  582.      the machine registers that can be used for storage of data are
  583.      given hard register numbers, even those that can be used only in
  584.      certain instructions or can hold only certain types of data.
  585.  
  586.      A hard register may be accessed in various modes throughout one
  587.      function, but each pseudo register is given a natural mode and is
  588.      accessed only in that mode.  When it is necessary to describe an
  589.      access to a pseudo register using a nonnatural mode, a `subreg'
  590.      expression is used.
  591.  
  592.      A `reg' expression with a machine mode that specifies more than
  593.      one word of data may actually stand for several consecutive
  594.      registers.  If in addition the register number specifies a
  595.      hardware register, then it actually represents several consecutive
  596.      hardware registers starting with the specified one.
  597.  
  598.      Each pseudo register number used in a function's RTL code is
  599.      represented by a unique `reg' expression.
  600.  
  601.      Some pseudo register numbers, those within the range of
  602.      `FIRST_VIRTUAL_REGISTER' to `LAST_VIRTUAL_REGISTER' only appear
  603.      during the RTL generation phase and are eliminated before the
  604.      optimization phases.  These represent locations in the stack frame
  605.      that cannot be determined until RTL generation for the function
  606.      has been completed.  The following virtual register numbers are
  607.      defined:
  608.  
  609.     `VIRTUAL_INCOMING_ARGS_REGNUM'
  610.           This points to the first word of the incoming arguments
  611.           passed on the stack.  Normally these arguments are placed
  612.           there by the caller, but the callee may have pushed some
  613.           arguments that were previously passed in registers.
  614.  
  615.           When RTL generation is complete, this virtual register is
  616.           replaced by the sum of the register given by
  617.           `ARG_POINTER_REGNUM' and the value of `FIRST_PARM_OFFSET'.
  618.  
  619.     `VIRTUAL_STACK_VARS_REGNUM'
  620.           If `FRAME_GROWS_DOWNWARDS' is defined, this points to
  621.           immediately above the first variable on the stack.
  622.           Otherwise, it points to the first variable on the stack.
  623.  
  624.           `VIRTUAL_STACK_VARS_REGNUM' is replaced with the sum of the
  625.           register given by `FRAME_POINTER_REGNUM' and the value
  626.           `STARTING_FRAME_OFFSET'.
  627.  
  628.     `VIRTUAL_STACK_DYNAMIC_REGNUM'
  629.           This points to the location of dynamically allocated memory
  630.           on the stack immediately after the stack pointer has been
  631.           adjusted by the amount of memory desired.
  632.  
  633.           This virtual register is replaced by the sum of the register
  634.           given by `STACK_POINTER_REGNUM' and the value
  635.           `STACK_DYNAMIC_OFFSET'.
  636.  
  637.     `VIRTUAL_OUTGOING_ARGS_REGNUM'
  638.           This points to the location in the stack at which outgoing
  639.           arguments should be written when the stack is pre-pushed
  640.           (arguments pushed using push insns should always use
  641.           `STACK_POINTER_REGNUM').
  642.  
  643.           This virtual register is replaced by the sum of the register
  644.           given by `STACK_POINTER_REGNUM' and the value
  645.           `STACK_POINTER_OFFSET'.
  646.  
  647. `(subreg:M REG WORDNUM)'
  648.      `subreg' expressions are used to refer to a register in a machine
  649.      mode other than its natural one, or to refer to one register of a
  650.      multi-word `reg' that actually refers to several registers.
  651.  
  652.      Each pseudo-register has a natural mode.  If it is necessary to
  653.      operate on it in a different mode--for example, to perform a
  654.      fullword move instruction on a pseudo-register that contains a
  655.      single byte--the pseudo-register must be enclosed in a `subreg'.
  656.      In such a case, WORDNUM is zero.
  657.  
  658.      Usually M is at least as narrow as the mode of REG, in which case
  659.      it is restricting consideration to only the bits of REG that are
  660.      in M.  However, sometimes M is wider than the mode of REG.  These
  661.      `subreg' expressions are often called "paradoxical".  They are
  662.      used in cases where we want to refer to an object in a wider mode
  663.      but do not care what value the additional bits have.  The reload
  664.      pass ensures that paradoxical references are only made to hard
  665.      registers.
  666.  
  667.      The other use of `subreg' is to extract the individual registers of
  668.      a multi-register value.  Machine modes such as `DImode' and
  669.      `TImode' can indicate values longer than a word, values which
  670.      usually require two or more consecutive registers.  To access one
  671.      of the registers, use a `subreg' with mode `SImode' and a WORDNUM
  672.      that says which register.
  673.  
  674.      The compilation parameter `WORDS_BIG_ENDIAN', if set to 1, says
  675.      that word number zero is the most significant part; otherwise, it
  676.      is the least significant part.
  677.  
  678.      Between the combiner pass and the reload pass, it is possible to
  679.      have a paradoxical `subreg' which contains a `mem' instead of a
  680.      `reg' as its first operand.  After the reload pass, it is also
  681.      possible to have a non-paradoxical `subreg' which contains a
  682.      `mem'; this usually occurs when the `mem' is a stack slot which
  683.      replaced a pseudo register.
  684.  
  685.      Note that it is not valid to access a `DFmode' value in `SFmode'
  686.      using a `subreg'.  On some machines the most significant part of a
  687.      `DFmode' value does not have the same format as a single-precision
  688.      floating value.
  689.  
  690.      It is also not valid to access a single word of a multi-word value
  691.      in a hard register when less registers can hold the value than
  692.      would be expected from its size.  For example, some 32-bit
  693.      machines have floating-point registers that can hold an entire
  694.      `DFmode' value.  If register 10 were such a register `(subreg:SI
  695.      (reg:DF 10) 1)' would be invalid because there is no way to
  696.      convert that reference to a single machine register.  The reload
  697.      pass prevents `subreg' expressions such as these from being formed.
  698.  
  699.      The first operand of a `subreg' expression is customarily accessed
  700.      with the `SUBREG_REG' macro and the second operand is customarily
  701.      accessed with the `SUBREG_WORD' macro.
  702.  
  703. `(scratch:M)'
  704.      This represents a scratch register that will be required for the
  705.      execution of a single instruction and not used subsequently.  It is
  706.      converted into a `reg' by either the local register allocator or
  707.      the reload pass.
  708.  
  709.      `scratch' is usually present inside a `clobber' operation (*note
  710.      Side Effects::.).
  711.  
  712. `(cc0)'
  713.      This refers to the machine's condition code register.  It has no
  714.      operands and may not have a machine mode.  There are two ways to
  715.      use it:
  716.  
  717.         * To stand for a complete set of condition code flags.  This is
  718.           best on most machines, where each comparison sets the entire
  719.           series of flags.
  720.  
  721.           With this technique, `(cc0)' may be validly used in only two
  722.           contexts: as the destination of an assignment (in test and
  723.           compare instructions) and in comparison operators comparing
  724.           against zero (`const_int' with value zero; that is to say,
  725.           `const0_rtx').
  726.  
  727.         * To stand for a single flag that is the result of a single
  728.           condition.  This is useful on machines that have only a
  729.           single flag bit, and in which comparison instructions must
  730.           specify the condition to test.
  731.  
  732.           With this technique, `(cc0)' may be validly used in only two
  733.           contexts: as the destination of an assignment (in test and
  734.           compare instructions) where the source is a comparison
  735.           operator, and as the first operand of `if_then_else' (in a
  736.           conditional branch).
  737.  
  738.      There is only one expression object of code `cc0'; it is the value
  739.      of the variable `cc0_rtx'.  Any attempt to create an expression of
  740.      code `cc0' will return `cc0_rtx'.
  741.  
  742.      Instructions can set the condition code implicitly.  On many
  743.      machines, nearly all instructions set the condition code based on
  744.      the value that they compute or store.  It is not necessary to
  745.      record these actions explicitly in the RTL because the machine
  746.      description includes a prescription for recognizing the
  747.      instructions that do so (by means of the macro
  748.      `NOTICE_UPDATE_CC').  *Note Condition Code::.  Only instructions
  749.      whose sole purpose is to set the condition code, and instructions
  750.      that use the condition code, need mention `(cc0)'.
  751.  
  752.      On some machines, the condition code register is given a register
  753.      number and a `reg' is used instead of `(cc0)'.  This is usually the
  754.      preferable approach if only a small subset of instructions modify
  755.      the condition code.  Other machines store condition codes in
  756.      general registers; in such cases a pseudo register should be used.
  757.  
  758.      Some machines, such as the Sparc and RS/6000, have two sets of
  759.      arithmetic instructions, one that sets and one that does not set
  760.      the condition code.  This is best handled by normally generating
  761.      the instruction that does not set the condition code, and making a
  762.      pattern that both performs the arithmetic and sets the condition
  763.      code register (which would not be `(cc0)' in this case).  For
  764.      examples, search for `addcc' and `andcc' in `sparc.md'.
  765.  
  766. `(pc)'
  767.      This represents the machine's program counter.  It has no operands
  768.      and may not have a machine mode.  `(pc)' may be validly used only
  769.      in certain specific contexts in jump instructions.
  770.  
  771.      There is only one expression object of code `pc'; it is the value
  772.      of the variable `pc_rtx'.  Any attempt to create an expression of
  773.      code `pc' will return `pc_rtx'.
  774.  
  775.      All instructions that do not jump alter the program counter
  776.      implicitly by incrementing it, but there is no need to mention
  777.      this in the RTL.
  778.  
  779. `(mem:M ADDR)'
  780.      This RTX represents a reference to main memory at an address
  781.      represented by the expression ADDR.  M specifies how large a unit
  782.      of memory is accessed.
  783.  
  784. 
  785. File: gcc.info,  Node: Arithmetic,  Next: Comparisons,  Prev: Regs and Memory,  Up: RTL
  786.  
  787. RTL Expressions for Arithmetic
  788. ==============================
  789.  
  790.    Unless otherwise specified, all the operands of arithmetic
  791. expressions must be valid for mode M.  An operand is valid for mode M
  792. if it has mode M, or if it is a `const_int' or `const_double' and M is
  793. a mode of class `MODE_INT'.
  794.  
  795.    For commutative binary operations, constants should be placed in the
  796. second operand.
  797.  
  798. `(plus:M X Y)'
  799.      Represents the sum of the values represented by X and Y carried
  800.      out in machine mode M.
  801.  
  802. `(lo_sum:M X Y)'
  803.      Like `plus', except that it represents that sum of X and the
  804.      low-order bits of Y.  The number of low order bits is
  805.      machine-dependent but is normally the number of bits in a `Pmode'
  806.      item minus the number of bits set by the `high' code (*note
  807.      Constants::.).
  808.  
  809.      M should be `Pmode'.
  810.  
  811. `(minus:M X Y)'
  812.      Like `plus' but represents subtraction.
  813.  
  814. `(compare:M X Y)'
  815.      Represents the result of subtracting Y from X for purposes of
  816.      comparison.  The result is computed without overflow, as if with
  817.      infinite precision.
  818.  
  819.      Of course, machines can't really subtract with infinite precision.
  820.      However, they can pretend to do so when only the sign of the
  821.      result will be used, which is the case when the result is stored
  822.      in the condition code.   And that is the only way this kind of
  823.      expression may validly be used: as a value to be stored in the
  824.      condition codes.
  825.  
  826.      The mode M is not related to the modes of X and Y, but instead is
  827.      the mode of the condition code value.  If `(cc0)' is used, it is
  828.      `VOIDmode'.  Otherwise it is some mode in class `MODE_CC', often
  829.      `CCmode'.  *Note Condition Code::.
  830.  
  831.      Normally, X and Y must have the same mode.  Otherwise, `compare'
  832.      is valid only if the mode of X is in class `MODE_INT' and Y is a
  833.      `const_int' or `const_double' with mode `VOIDmode'.  The mode of X
  834.      determines what mode the comparison is to be done in; thus it must
  835.      not be `VOIDmode'.
  836.  
  837.      If one of the operands is a constant, it should be placed in the
  838.      second operand and the comparison code adjusted as appropriate.
  839.  
  840.      A `compare' specifying two `VOIDmode' constants is not valid since
  841.      there is no way to know in what mode the comparison is to be
  842.      performed; the comparison must either be folded during the
  843.      compilation or the first operand must be loaded into a register
  844.      while its mode is still known.
  845.  
  846. `(neg:M X)'
  847.      Represents the negation (subtraction from zero) of the value
  848.      represented by X, carried out in mode M.
  849.  
  850. `(mult:M X Y)'
  851.      Represents the signed product of the values represented by X and Y
  852.      carried out in machine mode M.
  853.  
  854.      Some machines support a multiplication that generates a product
  855.      wider than the operands.  Write the pattern for this as
  856.  
  857.           (mult:M (sign_extend:M X) (sign_extend:M Y))
  858.  
  859.      where M is wider than the modes of X and Y, which need not be the
  860.      same.
  861.  
  862.      Write patterns for unsigned widening multiplication similarly using
  863.      `zero_extend'.
  864.  
  865. `(div:M X Y)'
  866.      Represents the quotient in signed division of X by Y, carried out
  867.      in machine mode M.  If M is a floating point mode, it represents
  868.      the exact quotient; otherwise, the integerized quotient.
  869.  
  870.      Some machines have division instructions in which the operands and
  871.      quotient widths are not all the same; you should represent such
  872.      instructions using `truncate' and `sign_extend' as in,
  873.  
  874.           (truncate:M1 (div:M2 X (sign_extend:M2 Y)))
  875.  
  876. `(udiv:M X Y)'
  877.      Like `div' but represents unsigned division.
  878.  
  879. `(mod:M X Y)'
  880. `(umod:M X Y)'
  881.      Like `div' and `udiv' but represent the remainder instead of the
  882.      quotient.
  883.  
  884. `(smin:M X Y)'
  885. `(smax:M X Y)'
  886.      Represents the smaller (for `smin') or larger (for `smax') of X
  887.      and Y, interpreted as signed integers in mode M.
  888.  
  889. `(umin:M X Y)'
  890. `(umax:M X Y)'
  891.      Like `smin' and `smax', but the values are interpreted as unsigned
  892.      integers.
  893.  
  894. `(not:M X)'
  895.      Represents the bitwise complement of the value represented by X,
  896.      carried out in mode M, which must be a fixed-point machine mode.
  897.  
  898. `(and:M X Y)'
  899.      Represents the bitwise logical-and of the values represented by X
  900.      and Y, carried out in machine mode M, which must be a fixed-point
  901.      machine mode.
  902.  
  903. `(ior:M X Y)'
  904.      Represents the bitwise inclusive-or of the values represented by X
  905.      and Y, carried out in machine mode M, which must be a fixed-point
  906.      mode.
  907.  
  908. `(xor:M X Y)'
  909.      Represents the bitwise exclusive-or of the values represented by X
  910.      and Y, carried out in machine mode M, which must be a fixed-point
  911.      mode.
  912.  
  913. `(ashift:M X C)'
  914.      Represents the result of arithmetically shifting X left by C
  915.      places.  X have mode M, a fixed-point machine mode.  C be a
  916.      fixed-point mode or be a constant with mode `VOIDmode'; which mode
  917.      is determined by the mode called for in the machine description
  918.      entry for the left-shift instruction.  For example, on the Vax,
  919.      the mode of C is `QImode' regardless of M.
  920.  
  921. `(lshift:M X C)'
  922.      Like `ashift' but for logical left shift.  `ashift' and `lshift'
  923.      are identical operations; we customarily use `ashift' for both.
  924.  
  925. `(lshiftrt:M X C)'
  926. `(ashiftrt:M X C)'
  927.      Like `lshift' and `ashift' but for right shift.  Unlike the case
  928.      for left shift, these two operations are distinct.
  929.  
  930. `(rotate:M X C)'
  931. `(rotatert:M X C)'
  932.      Similar but represent left and right rotate.  If C is a constant,
  933.      use `rotate'.
  934.  
  935. `(abs:M X)'
  936.      Represents the absolute value of X, computed in mode M.
  937.  
  938. `(sqrt:M X)'
  939.      Represents the square root of X, computed in mode M.  Most often M
  940.      will be a floating point mode.
  941.  
  942. `(ffs:M X)'
  943.      Represents one plus the index of the least significant 1-bit in X,
  944.      represented as an integer of mode M.  (The value is zero if X is
  945.      zero.)  The mode of X need not be M; depending on the target
  946.      machine, various mode combinations may be valid.
  947.  
  948. 
  949. File: gcc.info,  Node: Comparisons,  Next: Bit Fields,  Prev: Arithmetic,  Up: RTL
  950.  
  951. Comparison Operations
  952. =====================
  953.  
  954.    Comparison operators test a relation on two operands and are
  955. considered to represent a machine-dependent nonzero value described by,
  956. but not necessarily equal to, `STORE_FLAG_VALUE' (*note Misc::.) if the
  957. relation holds, or zero if it does not.  The mode of the comparison
  958. operation is independent of the mode of the data being compared.  If
  959. the comparison operation is being tested (e.g., the first operand of an
  960. `if_then_else'), the mode must be `VOIDmode'.  If the comparison
  961. operation is producing data to be stored in some variable, the mode
  962. must be in class `MODE_INT'.  All comparison operations producing data
  963. must use the same mode, which is machine-specific.
  964.  
  965.    There are two ways that comparison operations may be used.  The
  966. comparison operators may be used to compare the condition codes `(cc0)'
  967. against zero, as in `(eq (cc0) (const_int 0))'.  Such a construct
  968. actually refers to the result of the preceding instruction in which the
  969. condition codes were set.  The instructing setting the condition code
  970. must be adjacent to the instruction using the condition code; only
  971. `note' insns may separate them.
  972.  
  973.    Alternatively, a comparison operation may directly compare two data
  974. objects.  The mode of the comparison is determined by the operands; they
  975. must both be valid for a common machine mode.  A comparison with both
  976. operands constant would be invalid as the machine mode could not be
  977. deduced from it, but such a comparison should never exist in RTL due to
  978. constant folding.
  979.  
  980.    In the example above, if `(cc0)' were last set to `(compare X Y)',
  981. the comparison operation is identical to `(eq X Y)'.  Usually only one
  982. style of comparisons is supported on a particular machine, but the
  983. combine pass will try to merge the operations to produce the `eq' shown
  984. in case it exists in the context of the particular insn involved.
  985.  
  986.    Inequality comparisons come in two flavors, signed and unsigned.
  987. Thus, there are distinct expression codes `gt' and `gtu' for signed and
  988. unsigned greater-than.  These can produce different results for the same
  989. pair of integer values: for example, 1 is signed greater-than -1 but not
  990. unsigned greater-than, because -1 when regarded as unsigned is actually
  991. `0xffffffff' which is greater than 1.
  992.  
  993.    The signed comparisons are also used for floating point values.
  994. Floating point comparisons are distinguished by the machine modes of
  995. the operands.
  996.  
  997. `(eq:M X Y)'
  998.      1 if the values represented by X and Y are equal, otherwise 0.
  999.  
  1000. `(ne:M X Y)'
  1001.      1 if the values represented by X and Y are not equal, otherwise 0.
  1002.  
  1003. `(gt:M X Y)'
  1004.      1 if the X is greater than Y.  If they are fixed-point, the
  1005.      comparison is done in a signed sense.
  1006.  
  1007. `(gtu:M X Y)'
  1008.      Like `gt' but does unsigned comparison, on fixed-point numbers
  1009.      only.
  1010.  
  1011. `(lt:M X Y)'
  1012. `(ltu:M X Y)'
  1013.      Like `gt' and `gtu' but test for "less than".
  1014.  
  1015. `(ge:M X Y)'
  1016. `(geu:M X Y)'
  1017.      Like `gt' and `gtu' but test for "greater than or equal".
  1018.  
  1019. `(le:M X Y)'
  1020. `(leu:M X Y)'
  1021.      Like `gt' and `gtu' but test for "less than or equal".
  1022.  
  1023. `(if_then_else COND THEN ELSE)'
  1024.      This is not a comparison operation but is listed here because it is
  1025.      always used in conjunction with a comparison operation.  To be
  1026.      precise, COND is a comparison expression.  This expression
  1027.      represents a choice, according to COND, between the value
  1028.      represented by THEN and the one represented by ELSE.
  1029.  
  1030.      On most machines, `if_then_else' expressions are valid only to
  1031.      express conditional jumps.
  1032.  
  1033. `(cond [TEST1 VALUE1 TEST2 VALUE2 ...] DEFAULT)'
  1034.      Similar to `if_then_else', but more general.  Each of TEST1,
  1035.      TEST2, ... is performed in turn.  The result of this expression is
  1036.      the VALUE corresponding to the first non-zero test, or DEFAULT if
  1037.      none of the tests are non-zero expressions.
  1038.  
  1039.      This is currently not valid for instruction patterns and is
  1040.      supported only for insn attributes.  *Note Insn Attributes::.
  1041.  
  1042. 
  1043. File: gcc.info,  Node: Bit Fields,  Next: Conversions,  Prev: Comparisons,  Up: RTL
  1044.  
  1045. Bit Fields
  1046. ==========
  1047.  
  1048.    Special expression codes exist to represent bit-field instructions.
  1049. These types of expressions are lvalues in RTL; they may appear on the
  1050. left side of an assignment, indicating insertion of a value into the
  1051. specified bit field.
  1052.  
  1053. `(sign_extract:M LOC SIZE POS)'
  1054.      This represents a reference to a sign-extended bit field contained
  1055.      or starting in LOC (a memory or register reference).  The bit field
  1056.      is SIZE bits wide and starts at bit POS.  The compilation option
  1057.      `BITS_BIG_ENDIAN' says which end of the memory unit POS counts
  1058.      from.
  1059.  
  1060.      If LOC is in memory, its mode must be a single-byte integer mode.
  1061.      If LOC is in a register, the mode to use is specified by the
  1062.      operand of the `insv' or `extv' pattern (*note Standard Names::.)
  1063.      and is usually a full-word integer mode.
  1064.  
  1065.      The mode of POS is machine-specific and is also specified in the
  1066.      `insv' or `extv' pattern.
  1067.  
  1068.      The mode M is the same as the mode that would be used for LOC if
  1069.      it were a register.
  1070.  
  1071. `(zero_extract:M LOC SIZE POS)'
  1072.      Like `sign_extract' but refers to an unsigned or zero-extended bit
  1073.      field.  The same sequence of bits are extracted, but they are
  1074.      filled to an entire word with zeros instead of by sign-extension.
  1075.  
  1076. 
  1077. File: gcc.info,  Node: Conversions,  Next: RTL Declarations,  Prev: Bit Fields,  Up: RTL
  1078.  
  1079. Conversions
  1080. ===========
  1081.  
  1082.    All conversions between machine modes must be represented by
  1083. explicit conversion operations.  For example, an expression which is
  1084. the sum of a byte and a full word cannot be written as `(plus:SI
  1085. (reg:QI 34) (reg:SI 80))' because the `plus' operation requires two
  1086. operands of the same machine mode.  Therefore, the byte-sized operand
  1087. is enclosed in a conversion operation, as in
  1088.  
  1089.      (plus:SI (sign_extend:SI (reg:QI 34)) (reg:SI 80))
  1090.  
  1091.    The conversion operation is not a mere placeholder, because there
  1092. may be more than one way of converting from a given starting mode to
  1093. the desired final mode.  The conversion operation code says how to do
  1094. it.
  1095.  
  1096.    For all conversion operations, X must not be `VOIDmode' because the
  1097. mode in which to do the conversion would not be known.  The conversion
  1098. must either be done at compile-time or X must be placed into a register.
  1099.  
  1100. `(sign_extend:M X)'
  1101.      Represents the result of sign-extending the value X to machine
  1102.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  1103.      a mode narrower than M.
  1104.  
  1105. `(zero_extend:M X)'
  1106.      Represents the result of zero-extending the value X to machine
  1107.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  1108.      a mode narrower than M.
  1109.  
  1110. `(float_extend:M X)'
  1111.      Represents the result of extending the value X to machine mode M.
  1112.      m must be a floating point mode and X a floating point value of a
  1113.      mode narrower than M.
  1114.  
  1115. `(truncate:M X)'
  1116.      Represents the result of truncating the value X to machine mode M.
  1117.      M must be a fixed-point mode and X a fixed-point value of a mode
  1118.      wider than M.
  1119.  
  1120. `(float_truncate:M X)'
  1121.      Represents the result of truncating the value X to machine mode M.
  1122.      M must be a floating point mode and X a floating point value of a
  1123.      mode wider than M.
  1124.  
  1125. `(float:M X)'
  1126.      Represents the result of converting fixed point value X, regarded
  1127.      as signed, to floating point mode M.
  1128.  
  1129. `(unsigned_float:M X)'
  1130.      Represents the result of converting fixed point value X, regarded
  1131.      as unsigned, to floating point mode M.
  1132.  
  1133. `(fix:M X)'
  1134.      When M is a fixed point mode, represents the result of converting
  1135.      floating point value X to mode M, regarded as signed.  How
  1136.      rounding is done is not specified, so this operation may be used
  1137.      validly in compiling C code only for integer-valued operands.
  1138.  
  1139. `(unsigned_fix:M X)'
  1140.      Represents the result of converting floating point value X to
  1141.      fixed point mode M, regarded as unsigned.  How rounding is done is
  1142.      not specified.
  1143.  
  1144. `(fix:M X)'
  1145.      When M is a floating point mode, represents the result of
  1146.      converting floating point value X (valid for mode M) to an
  1147.      integer, still represented in floating point mode M, by rounding
  1148.      towards zero.
  1149.  
  1150. 
  1151. File: gcc.info,  Node: RTL Declarations,  Next: Side Effects,  Prev: Conversions,  Up: RTL
  1152.  
  1153. Declarations
  1154. ============
  1155.  
  1156.    Declaration expression codes do not represent arithmetic operations
  1157. but rather state assertions about their operands.
  1158.  
  1159. `(strict_low_part (subreg:M (reg:N R) 0))'
  1160.      This expression code is used in only one context: as the
  1161.      destination operand of a `set' expression.  In addition, the
  1162.      operand of this expression must be a non-paradoxical `subreg'
  1163.      expression.
  1164.  
  1165.      The presence of `strict_low_part' says that the part of the
  1166.      register which is meaningful in mode N, but is not part of mode M,
  1167.      is not to be altered.  Normally, an assignment to such a subreg is
  1168.      allowed to have undefined effects on the rest of the register when
  1169.      M is less than a word.
  1170.  
  1171.