OSDN Git Service

* doc/tm.texi (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
[pf3gnuchains/gcc-fork.git] / gcc / doc / rtl.texi
index 2d95256..ba72b48 100644 (file)
 @cindex representation of RTL
 @cindex Register Transfer Language (RTL)
 
-Most of the work of the compiler is done on an intermediate representation
-called register transfer language.  In this language, the instructions to be
-output are described, pretty much one by one, in an algebraic form that
-describes what the instruction does.
+The last part of the compiler work is done on a low-level intermediate
+representation called Register Transfer Language.  In this language, the
+instructions to be output are described, pretty much one by one, in an
+algebraic form that describes what the instruction does.
 
 RTL is inspired by Lisp lists.  It has both an internal form, made up of
 structures that point at other structures, and a textual form that is used
@@ -882,6 +882,14 @@ Stored in the @code{volatil} field and printed as @samp{/v}.
 Most uses of @code{SYMBOL_REF_FLAG} are historic and may be subsumed
 by @code{SYMBOL_REF_FLAGS}.  Certainly use of @code{SYMBOL_REF_FLAGS}
 is mandatory if the target requires more than one bit of storage.
+
+@findex PREFETCH_SCHEDULE_BARRIER_P
+@cindex @code{prefetch} and @samp{/v}
+@cindex @code{volatile}, in @code{prefetch}
+@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
+In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
+No other INSNs will be moved over it.
+Stored in the @code{volatil} field and printed as @samp{/v}.
 @end table
 
 These are the fields to which the above macros refer:
@@ -1034,6 +1042,9 @@ In an @code{insn}, 1 means the insn has been deleted.
 In @code{label_ref} and @code{reg_label} expressions, 1 means a reference
 to a non-local label.
 
+In @code{prefetch} expressions, 1 means that the containing insn is a
+scheduling barrier.
+
 In an RTL dump, this flag is represented as @samp{/v}.
 @end table
 
@@ -1507,27 +1518,39 @@ Similarly, there is only one object for the integer whose value is
 @code{constm1_rtx} will point to the same object.
 
 @findex const_double
-@item (const_double:@var{m} @var{addr} @var{i0} @var{i1} @dots{})
+@item (const_double:@var{m} @var{i0} @var{i1} @dots{})
 Represents either a floating-point constant of mode @var{m} or an
 integer constant too large to fit into @code{HOST_BITS_PER_WIDE_INT}
 bits but small enough to fit within twice that number of bits (GCC
 does not provide a mechanism to represent even larger constants).  In
 the latter case, @var{m} will be @code{VOIDmode}.
 
+@findex CONST_DOUBLE_LOW
+If @var{m} is @code{VOIDmode}, the bits of the value are stored in
+@var{i0} and @var{i1}.  @var{i0} is customarily accessed with the macro
+@code{CONST_DOUBLE_LOW} and @var{i1} with @code{CONST_DOUBLE_HIGH}.
+
+If the constant is floating point (regardless of its precision), then
+the number of integers used to store the value depends on the size of
+@code{REAL_VALUE_TYPE} (@pxref{Floating Point}).  The integers
+represent a floating point number, but not precisely in the target
+machine's or host machine's floating point format.  To convert them to
+the precise bit pattern used by the target machine, use the macro
+@code{REAL_VALUE_TO_TARGET_DOUBLE} and friends (@pxref{Data Output}).
+
 @findex const_fixed
-@item (const_fixed:@var{m} @var{addr})
+@item (const_fixed:@var{m} @dots{})
 Represents a fixed-point constant of mode @var{m}.
-The data structure, which contains data with the size of two
-@code{HOST_BITS_PER_WIDE_INT} and the associated fixed-point mode,
-is access with the macro @code{CONST_FIXED_VALUE}.  The high part of data
-is accessed with @code{CONST_FIXED_VALUE_HIGH}; the low part is accessed
-with @code{CONST_FIXED_VALUE_LOW}.
+The operand is a data structure of type @code{struct fixed_value} and
+is accessed with the macro @code{CONST_FIXED_VALUE}.  The high part of
+data is accessed with @code{CONST_FIXED_VALUE_HIGH}; the low part is
+accessed with @code{CONST_FIXED_VALUE_LOW}.
 
 @findex const_vector
 @item (const_vector:@var{m} [@var{x0} @var{x1} @dots{}])
 Represents a vector constant.  The square brackets stand for the vector
 containing the constant elements.  @var{x0}, @var{x1} and so on are
-the @code{const_int} or @code{const_double} elements.
+the @code{const_int}, @code{const_double} or @code{const_fixed} elements.
 
 The number of units in a @code{const_vector} is obtained with the macro
 @code{CONST_VECTOR_NUNITS} as in @code{CONST_VECTOR_NUNITS (@var{v})}.
@@ -1537,44 +1560,6 @@ Individual elements in a vector constant are accessed with the macro
 where @var{v} is the vector constant and @var{n} is the element
 desired.
 
-@findex CONST_DOUBLE_MEM
-@findex CONST_DOUBLE_CHAIN
-@var{addr} is used to contain the @code{mem} expression that corresponds
-to the location in memory that at which the constant can be found.  If
-it has not been allocated a memory location, but is on the chain of all
-@code{const_double} expressions in this compilation (maintained using an
-undisplayed field), @var{addr} contains @code{const0_rtx}.  If it is not
-on the chain, @var{addr} contains @code{cc0_rtx}.  @var{addr} is
-customarily accessed with the macro @code{CONST_DOUBLE_MEM} and the
-chain field via @code{CONST_DOUBLE_CHAIN}.
-
-@findex CONST_DOUBLE_LOW
-If @var{m} is @code{VOIDmode}, the bits of the value are stored in
-@var{i0} and @var{i1}.  @var{i0} is customarily accessed with the macro
-@code{CONST_DOUBLE_LOW} and @var{i1} with @code{CONST_DOUBLE_HIGH}.
-
-If the constant is floating point (regardless of its precision), then
-the number of integers used to store the value depends on the size of
-@code{REAL_VALUE_TYPE} (@pxref{Floating Point}).  The integers
-represent a floating point number, but not precisely in the target
-machine's or host machine's floating point format.  To convert them to
-the precise bit pattern used by the target machine, use the macro
-@code{REAL_VALUE_TO_TARGET_DOUBLE} and friends (@pxref{Data Output}).
-
-@findex CONST0_RTX
-@findex CONST1_RTX
-@findex CONST2_RTX
-The macro @code{CONST0_RTX (@var{mode})} refers to an expression with
-value 0 in mode @var{mode}.  If mode @var{mode} is of mode class
-@code{MODE_INT}, it returns @code{const0_rtx}.  If mode @var{mode} is of
-mode class @code{MODE_FLOAT}, it returns a @code{CONST_DOUBLE}
-expression in mode @var{mode}.  Otherwise, it returns a
-@code{CONST_VECTOR} expression in mode @var{mode}.  Similarly, the macro
-@code{CONST1_RTX (@var{mode})} refers to an expression with value 1 in
-mode @var{mode} and similarly for @code{CONST2_RTX}.  The
-@code{CONST1_RTX} and @code{CONST2_RTX} macros are undefined
-for vector modes.
-
 @findex const_string
 @item (const_string @var{str})
 Represents a constant string with value @var{str}.  Currently this is
@@ -1605,6 +1590,7 @@ references is so that jump optimization can distinguish them.
 The @code{label_ref} contains a mode, which is usually @code{Pmode}.
 Usually that is the only mode for which a label is directly valid.
 
+@findex const
 @item (const:@var{m} @var{exp})
 Represents a constant that is the result of an assembly-time
 arithmetic computation.  The operand, @var{exp}, is an expression that
@@ -1627,6 +1613,20 @@ reference a global memory location.
 @var{m} should be @code{Pmode}.
 @end table
 
+@findex CONST0_RTX
+@findex CONST1_RTX
+@findex CONST2_RTX
+The macro @code{CONST0_RTX (@var{mode})} refers to an expression with
+value 0 in mode @var{mode}.  If mode @var{mode} is of mode class
+@code{MODE_INT}, it returns @code{const0_rtx}.  If mode @var{mode} is of
+mode class @code{MODE_FLOAT}, it returns a @code{CONST_DOUBLE}
+expression in mode @var{mode}.  Otherwise, it returns a
+@code{CONST_VECTOR} expression in mode @var{mode}.  Similarly, the macro
+@code{CONST1_RTX (@var{mode})} refers to an expression with value 1 in
+mode @var{mode} and similarly for @code{CONST2_RTX}.  The
+@code{CONST1_RTX} and @code{CONST2_RTX} macros are undefined
+for vector modes.
+
 @node Regs and Memory
 @section Registers and Memory
 @cindex RTL register expressions
@@ -2707,7 +2707,12 @@ regarded as unsigned, to floating point mode @var{m}.
 
 @findex fix
 @item (fix:@var{m} @var{x})
-When @var{m} is a fixed point mode, represents the result of
+When @var{m} is a floating-point mode, represents the result of
+converting floating point value @var{x} (valid for mode @var{m}) to an
+integer, still represented in floating point mode @var{m}, by rounding
+towards zero.
+
+When @var{m} is a fixed-point mode, represents the result of
 converting floating point value @var{x} to mode @var{m}, regarded as
 signed.  How rounding is done is not specified, so this operation may
 be used validly in compiling C code only for integer-valued operands.
@@ -2718,13 +2723,6 @@ Represents the result of converting floating point value @var{x} to
 fixed point mode @var{m}, regarded as unsigned.  How rounding is done
 is not specified.
 
-@findex fix
-@item (fix:@var{m} @var{x})
-When @var{m} is a floating point mode, represents the result of
-converting floating point value @var{x} (valid for mode @var{m}) to an
-integer, still represented in floating point mode @var{m}, by rounding
-towards zero.
-
 @findex fract_convert
 @item (fract_convert:@var{m} @var{x})
 Represents the result of converting fixed-point value @var{x} to
@@ -2930,9 +2928,12 @@ constituent instructions might not.
 When a @code{clobber} expression for a register appears inside a
 @code{parallel} with other side effects, the register allocator
 guarantees that the register is unoccupied both before and after that
-insn.  However, the reload phase may allocate a register used for one of
-the inputs unless the @samp{&} constraint is specified for the selected
-alternative (@pxref{Modifiers}).  You can clobber either a specific hard
+insn if it is a hard register clobber.  For pseudo-register clobber,
+the register allocator and the reload pass do not assign the same hard
+register to the clobber and the input operands if there is an insn
+alternative containing the @samp{&} constraint (@pxref{Modifiers}) for
+the clobber and the hard register is in register classes of the
+clobber in the alternative.  You can clobber either a specific hard
 register, a pseudo register, or a @code{scratch} expression; in the
 latter two cases, GCC will allocate a hard register that is available
 there for use as a temporary.
@@ -2960,7 +2961,7 @@ store a value in @var{x}.  @var{x} must be a @code{reg} expression.
 In some situations, it may be tempting to add a @code{use} of a
 register in a @code{parallel} to describe a situation where the value
 of a special register will modify the behavior of the instruction.
-An hypothetical example might be a pattern for an addition that can
+A hypothetical example might be a pattern for an addition that can
 either wrap around or use saturating addition depending on the value
 of a special control register:
 
@@ -3188,11 +3189,9 @@ represents @var{x} before @var{x} is modified.  @var{x} must be a
 @var{m} must be the machine mode for pointers on the machine in use.
 
 The expression @var{y} must be one of three forms:
-@table @code
 @code{(plus:@var{m} @var{x} @var{z})},
 @code{(minus:@var{m} @var{x} @var{z})}, or
 @code{(plus:@var{m} @var{x} @var{i})},
-@end table
 where @var{z} is an index register and @var{i} is a constant.
 
 Here is an example of its use:
@@ -3268,7 +3267,7 @@ mode @var{m1} is the mode of the sum @code{x+y}; @var{m2} is that of
 
 When an @code{asm} statement has multiple output values, its insn has
 several such @code{set} RTX's inside of a @code{parallel}.  Each @code{set}
-contains a @code{asm_operands}; all of these share the same assembler
+contains an @code{asm_operands}; all of these share the same assembler
 template and vectors, but each contains the constraint for the respective
 output operand.  They are also distinguished by the output-operand index
 number, which is 0, 1, @dots{} for successive output operands.
@@ -3692,7 +3691,7 @@ used, and flow optimization to build an accurate flow graph.
 
 @findex REG_LABEL_TARGET
 @item REG_LABEL_TARGET
-This insn is a @code{jump_insn} but not a @code{addr_vec} or
+This insn is a @code{jump_insn} but not an @code{addr_vec} or
 @code{addr_diff_vec}.  It uses @var{op}, a @code{code_label} as a
 direct or indirect jump target.  Its purpose is similar to that of
 @code{REG_LABEL_OPERAND}.  This note is only present if the insn has
@@ -3702,10 +3701,10 @@ insn-field) goes into the @code{JUMP_LABEL} field and does not have a
 
 @findex REG_CROSSING_JUMP
 @item REG_CROSSING_JUMP
-This insn is an branching instruction (either an unconditional jump or
+This insn is a branching instruction (either an unconditional jump or
 an indirect jump) which crosses between hot and cold sections, which
 could potentially be very far apart in the executable.  The presence
-of this note indicates to other optimizations that this this branching
+of this note indicates to other optimizations that this branching
 instruction should not be ``collapsed'' into a simpler branching
 construct.  It is used when the optimization to partition basic blocks
 into hot and cold sections is turned on.