X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;ds=sidebyside;f=gcc%2Fdoc%2Frtl.texi;h=fb38f7f3430ee58cdfa783ac6602a09edbd53d15;hb=c559c63952b78aea6494c690ed141783fff55e25;hp=1f9372ebdd5fbae342a5bbd09a50d4d87d5d2cca;hpb=b012e613100d33f9621f1a9594086450864cad13;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 1f9372ebdd5..fb38f7f3430 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi @@ -1,5 +1,5 @@ @c Copyright (C) 1988, 1989, 1992, 1994, 1997, 1998, 1999, 2000, 2001, 2002, -@c 2003, 2004, 2005 +@c 2003, 2004, 2005, 2006, 2007 @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -138,7 +138,7 @@ wanted. The written form of this is @code{(nil)}. The various expression codes are divided into several @dfn{classes}, which are represented by single characters. You can determine the class of an RTX code with the macro @code{GET_RTX_CLASS (@var{code})}. -Currently, @file{rtx.def} defines these classes: +Currently, @file{rtl.def} defines these classes: @table @code @item RTX_OBJ @@ -455,6 +455,16 @@ that is, some sort of constant. In this case, the @code{symbol_ref} is an entry in the per-file constant pool; again, there is no associated front end symbol table entry. +@findex SYMBOL_REF_CONSTANT +@item SYMBOL_REF_CONSTANT (@var{x}) +If @samp{CONSTANT_POOL_ADDRESS_P (@var{x})} is true, this is the constant +pool entry for @var{x}. It is null otherwise. + +@findex SYMBOL_REF_DATA +@item SYMBOL_REF_DATA (@var{x}) +A field of opaque type used to store @code{SYMBOL_REF_DECL} or +@code{SYMBOL_REF_CONSTANT}. + @findex SYMBOL_REF_FLAGS @item SYMBOL_REF_FLAGS (@var{x}) In a @code{symbol_ref}, this is used to communicate various predicates @@ -491,11 +501,41 @@ See @code{TARGET_IN_SMALL_DATA_P}. This is a multi-bit field accessor that returns the @code{tls_model} to be used for a thread-local storage symbol. It returns zero for non-thread-local symbols. + +@findex SYMBOL_REF_HAS_BLOCK_INFO_P +@findex SYMBOL_FLAG_HAS_BLOCK_INFO +@item SYMBOL_FLAG_HAS_BLOCK_INFO +Set if the symbol has @code{SYMBOL_REF_BLOCK} and +@code{SYMBOL_REF_BLOCK_OFFSET} fields. + +@findex SYMBOL_REF_ANCHOR_P +@findex SYMBOL_FLAG_ANCHOR +@cindex @option{-fsection-anchors} +@item SYMBOL_FLAG_ANCHOR +Set if the symbol is used as a section anchor. ``Section anchors'' +are symbols that have a known position within an @code{object_block} +and that can be used to access nearby members of that block. +They are used to implement @option{-fsection-anchors}. + +If this flag is set, then @code{SYMBOL_FLAG_HAS_BLOCK_INFO} will be too. @end table Bits beginning with @code{SYMBOL_FLAG_MACH_DEP} are available for the target's use. @end table + +@findex SYMBOL_REF_BLOCK +@item SYMBOL_REF_BLOCK (@var{x}) +If @samp{SYMBOL_REF_HAS_BLOCK_INFO_P (@var{x})}, this is the +@samp{object_block} structure to which the symbol belongs, +or @code{NULL} if it has not been assigned a block. + +@findex SYMBOL_REF_BLOCK_OFFSET +@item SYMBOL_REF_BLOCK_OFFSET (@var{x}) +If @samp{SYMBOL_REF_HAS_BLOCK_INFO_P (@var{x})}, this is the offset of @var{x} +from the first object in @samp{SYMBOL_REF_BLOCK (@var{x})}. The value is +negative if @var{x} has not yet been assigned to a block, or it has not +been given an offset within that block. @end table @node Flags @@ -568,14 +608,6 @@ branch is not taken. When @code{INSN_ANNULLED_BRANCH_P} is not set, this insn will always be executed. Stored in the @code{in_struct} field and printed as @samp{/s}. -@findex LABEL_OUTSIDE_LOOP_P -@cindex @code{label_ref} and @samp{/s} -@cindex @code{in_struct}, in @code{label_ref} -@item LABEL_OUTSIDE_LOOP_P (@var{x}) -In @code{label_ref} expressions, nonzero if this is a reference to a -label that is outside the innermost loop containing the reference to the -label. Stored in the @code{in_struct} field and printed as @samp{/s}. - @findex LABEL_PRESERVE_P @cindex @code{code_label} and @samp{/i} @cindex @code{note} and @samp{/i} @@ -1081,12 +1113,118 @@ number. This mode only has 80 meaningful bits (ten bytes). Some processors require such numbers to be padded to twelve bytes, others to sixteen; this mode is used for either. +@findex SDmode +@item SDmode +``Single Decimal Floating'' mode represents a four byte decimal +floating point number (as distinct from conventional binary floating +point). + +@findex DDmode +@item DDmode +``Double Decimal Floating'' mode represents an eight byte decimal +floating point number. + +@findex TDmode +@item TDmode +``Tetra Decimal Floating'' mode represents a sixteen byte decimal +floating point number all 128 of whose bits are meaningful. + @findex TFmode @item TFmode ``Tetra Floating'' mode represents a sixteen byte floating point number all 128 of whose bits are meaningful. One common use is the IEEE quad-precision format. +@findex QQmode +@item QQmode +``Quarter-Fractional'' mode represents a single byte treated as a signed +fractional number. The default format is ``s.7''. + +@findex HQmode +@item HQmode +``Half-Fractional'' mode represents a two-byte signed fractional number. +The default format is ``s.15''. + +@findex SQmode +@item SQmode +``Single Fractional'' mode represents a four-byte signed fractional number. +The default format is ``s.31''. + +@findex DQmode +@item DQmode +``Double Fractional'' mode represents an eight-byte signed fractional number. +The default format is ``s.63''. + +@findex TQmode +@item TQmode +``Tetra Fractional'' mode represents a sixteen-byte signed fractional number. +The default format is ``s.127''. + +@findex UQQmode +@item UQQmode +``Unsigned Quarter-Fractional'' mode represents a single byte treated as an +unsigned fractional number. The default format is ``.8''. + +@findex UHQmode +@item UHQmode +``Unsigned Half-Fractional'' mode represents a two-byte unsigned fractional +number. The default format is ``.16''. + +@findex USQmode +@item USQmode +``Unsigned Single Fractional'' mode represents a four-byte unsigned fractional +number. The default format is ``.32''. + +@findex UDQmode +@item UDQmode +``Unsigned Double Fractional'' mode represents an eight-byte unsigned +fractional number. The default format is ``.64''. + +@findex UTQmode +@item UTQmode +``Unsigned Tetra Fractional'' mode represents a sixteen-byte unsigned +fractional number. The default format is ``.128''. + +@findex HAmode +@item HAmode +``Half-Accumulator'' mode represents a two-byte signed accumulator. +The default format is ``s8.7''. + +@findex SAmode +@item SAmode +``Single Accumulator'' mode represents a four-byte signed accumulator. +The default format is ``s16.15''. + +@findex DAmode +@item DAmode +``Double Accumulator'' mode represents an eight-byte signed accumulator. +The default format is ``s32.31''. + +@findex TAmode +@item TAmode +``Tetra Accumulator'' mode represents a sixteen-byte signed accumulator. +The default format is ``s64.63''. + +@findex UHAmode +@item UHAmode +``Unsigned Half-Accumulator'' mode represents a two-byte unsigned accumulator. +The default format is ``8.8''. + +@findex USAmode +@item USAmode +``Unsigned Single Accumulator'' mode represents a four-byte unsigned +accumulator. The default format is ``16.16''. + +@findex UDAmode +@item UDAmode +``Unsigned Double Accumulator'' mode represents an eight-byte unsigned +accumulator. The default format is ``32.32''. + +@findex UTAmode +@item UTAmode +``Unsigned Tetra Accumulator'' mode represents a sixteen-byte unsigned +accumulator. The default format is ``64.64''. + @findex CCmode @item CCmode ``Condition Code'' mode represents the value of a condition code, which @@ -1173,6 +1311,31 @@ Floating point modes. By default these are @code{QFmode}, @code{HFmode}, @code{TQFmode}, @code{SFmode}, @code{DFmode}, @code{XFmode} and @code{TFmode}. +@findex MODE_DECIMAL_FLOAT +@item MODE_DECIMAL_FLOAT +Decimal floating point modes. By default these are @code{SDmode}, +@code{DDmode} and @code{TDmode}. + +@findex MODE_FRACT +@item MODE_FRACT +Signed fractional modes. By default these are @code{QQmode}, @code{HQmode}, +@code{SQmode}, @code{DQmode} and @code{TQmode}. + +@findex MODE_UFRACT +@item MODE_UFRACT +Unsigned fractional modes. By default these are @code{UQQmode}, @code{UHQmode}, +@code{USQmode}, @code{UDQmode} and @code{UTQmode}. + +@findex MODE_ACCUM +@item MODE_ACCUM +Signed accumulator modes. By default these are @code{HAmode}, +@code{SAmode}, @code{DAmode} and @code{TAmode}. + +@findex MODE_UACCUM +@item MODE_UACCUM +Unsigned accumulator modes. By default these are @code{UHAmode}, +@code{USAmode}, @code{UDAmode} and @code{UTAmode}. + @findex MODE_COMPLEX_INT @item MODE_COMPLEX_INT Complex integer modes. (These are not currently implemented). @@ -1191,7 +1354,8 @@ Algol or Pascal function variables including a static chain. @findex MODE_CC @item MODE_CC Modes representing condition code values. These are @code{CCmode} plus -any modes listed in the @code{EXTRA_CC_MODES} macro. @xref{Jump Patterns}, +any @code{CC_MODE} modes listed in the @file{@var{machine}-modes.def}. +@xref{Jump Patterns}, also see @ref{Condition Code}. @findex MODE_RANDOM @@ -1239,6 +1403,14 @@ Returns the size in bytes of a datum of mode @var{m}. @item GET_MODE_BITSIZE (@var{m}) Returns the size in bits of a datum of mode @var{m}. +@findex GET_MODE_IBIT +@item GET_MODE_IBIT (@var{m}) +Returns the number of integral bits of a datum of fixed-point mode @var{m}. + +@findex GET_MODE_FBIT +@item GET_MODE_FBIT (@var{m}) +Returns the number of fractional bits of a datum of fixed-point mode @var{m}. + @findex GET_MODE_MASK @item GET_MODE_MASK (@var{m}) Returns a bitmask containing 1 for all bits in a word that fit within @@ -1504,9 +1676,9 @@ value of @code{FIRST_PARM_OFFSET}. @findex VIRTUAL_STACK_VARS_REGNUM @cindex @code{FRAME_GROWS_DOWNWARD} and virtual registers @item VIRTUAL_STACK_VARS_REGNUM -If @code{FRAME_GROWS_DOWNWARD} is defined, this points to immediately -above the first variable on the stack. Otherwise, it points to the -first variable on the stack. +If @code{FRAME_GROWS_DOWNWARD} is defined to a nonzero value, this points +to immediately above the first variable on the stack. Otherwise, it points +to the first variable on the stack. @cindex @code{STARTING_FRAME_OFFSET} and virtual registers @cindex @code{FRAME_POINTER_REGNUM} and virtual registers @@ -1720,6 +1892,19 @@ is always @code{Pmode}. If there are any @code{addressof} expressions left in the function after CSE, @var{reg} is forced into the stack and the @code{addressof} expression is replaced with a @code{plus} expression for the address of its stack slot. + +@findex concat +@item (concat@var{m} @var{rtx} @var{rtx}) +This RTX represents the concatenation of two other RTXs. This is used +for complex values. It should only appear in the RTL attached to +declarations and during RTL generation. It should not appear in the +ordinary insn chain. + +@findex concatn +@item (concatn@var{m} [@var{rtx} ...]) +This RTX represents the concatenation of all the @var{rtx} to make a +single value. Like @code{concat}, this should only appear in +declarations, and not in the insn chain. @end table @node Arithmetic @@ -1827,9 +2012,18 @@ or the first operand must be loaded into a register while its mode is still known. @findex neg +@findex ss_neg +@cindex negation +@cindex negation with signed saturation @item (neg:@var{m} @var{x}) -Represents the negation (subtraction from zero) of the value represented -by @var{x}, carried out in mode @var{m}. +@itemx (ss_neg:@var{m} @var{x}) +These two expressions represent the negation (subtraction from zero) of +the value represented by @var{x}, carried out in mode @var{m}. They +differ in the behavior on overflow of integer modes. In the case of +@code{neg}, the negation of the operand may be a number not representable +in mode @var{m}, in which case it is truncated to @var{m}. @code{ss_neg} +ensures that an out-of-bounds result saturates to the maximum or minimum +representable value. @findex mult @cindex multiplication @@ -1936,12 +2130,21 @@ and @var{y}, carried out in machine mode @var{m}, which must be a fixed-point mode. @findex ashift +@findex ss_ashift @cindex left shift @cindex shift @cindex arithmetic shift +@cindex arithmetic shift with signed saturation @item (ashift:@var{m} @var{x} @var{c}) -Represents the result of arithmetically shifting @var{x} left by @var{c} -places. @var{x} have mode @var{m}, a fixed-point machine mode. @var{c} +@itemx (ss_ashift:@var{m} @var{x} @var{c}) +These two expressions represent the result of arithmetically shifting @var{x} +left by @var{c} places. They differ in their behavior on overflow of integer +modes. An @code{ashift} operation is a plain shift with no special behavior +in case of a change in the sign bit; @code{ss_ashift} saturates to the minimum +or maximum representable value if any of the bits shifted out differs from the +final sign bit. + +@var{x} have mode @var{m}, a fixed-point machine mode. @var{c} be a fixed-point mode or be a constant with mode @code{VOIDmode}; which mode is determined by the mode called for in the machine description entry for the left-shift instruction. For example, on the VAX, the mode @@ -2012,6 +2215,11 @@ mode @var{m}. The mode of @var{x} will usually be an integer mode. Represents the number of 1-bits modulo 2 in @var{x}, represented as an integer of mode @var{m}. The mode of @var{x} will usually be an integer mode. + +@findex bswap +@item (bswap:@var{m} @var{x}) +Represents the value @var{x} with the order of bytes reversed, carried out +in mode @var{m}, which must be a fixed-point machine mode. @end table @node Comparisons @@ -2969,14 +3177,7 @@ TARGET_PASS_BY_REFERENCE}) are stored. If the argument is caller-copied (@pxref{Register Arguments, TARGET_CALLEE_COPIES}), the stack slot will be mentioned in @code{CLOBBER} and @code{USE} entries; if it's callee-copied, only a @code{USE} will appear, and the -@code{MEM} may point to addresses that are not stack slots. These -@code{MEM}s are used only in libcalls, because, unlike regular function -calls, @code{CONST_CALL}s (which libcalls generally are, @pxref{Flags, -CONST_CALL_P}) aren't assumed to read and write all memory, so flow -would consider the stores dead and remove them. Note that, since a -libcall must never return values in memory (@pxref{Aggregate Return, -RETURN_IN_MEMORY}), there will never be a @code{CLOBBER} for a memory -address holding a return value. +@code{MEM} may point to addresses that are not stack slots. @code{CLOBBER}ed registers in this list augment registers specified in @code{CALL_USED_REGISTERS} (@pxref{Register Basics}). @@ -3104,17 +3305,10 @@ becomes another virtual start of the loop when considering loop invariants. @findex NOTE_INSN_FUNCTION_BEG -@item NOTE_INSN_FUNCTION_END +@item NOTE_INSN_FUNCTION_BEG Appears at the start of the function body, after the function prologue. -@findex NOTE_INSN_FUNCTION_END -@item NOTE_INSN_FUNCTION_END -Appears near the end of the function body, just before the label that -@code{return} statements jump to (on machine where a single instruction -does not suffice for returning). This note may be deleted by jump -optimization. - @end table These codes are printed symbolically when they appear in debugging dumps. @@ -3174,7 +3368,9 @@ file as some small positive or negative offset from a named pattern. @item LOG_LINKS (@var{i}) A list (chain of @code{insn_list} expressions) giving information about dependencies between instructions within a basic block. Neither a jump -nor a label may come between the related insns. +nor a label may come between the related insns. These are only used by +the schedulers and by combine. This is a deprecated data structure. +Def-use and use-def chains are now prefered. @findex REG_NOTES @item REG_NOTES (@var{i}) @@ -3195,13 +3391,7 @@ This list is originally set up by the flow analysis pass; it is a null pointer until then. Flow only adds links for those data dependencies which can be used for instruction combination. For each insn, the flow analysis pass adds a link to insns which store into registers values -that are used for the first time in this insn. The instruction -scheduling pass adds extra links so that every dependence will be -represented. Links represent data dependencies, antidependencies and -output dependencies; the machine mode of the link distinguishes these -three types: antidependencies have mode @code{REG_DEP_ANTI}, output -dependencies have mode @code{REG_DEP_OUTPUT}, and data dependencies have -mode @code{VOIDmode}. +that are used for the first time in this insn. The @code{REG_NOTES} field of an insn is a chain similar to the @code{LOG_LINKS} field but it includes @code{expr_list} expressions in @@ -3424,13 +3614,18 @@ they simply have mode @code{VOIDmode}, and are printed without any descriptive text. @table @code -@findex REG_DEP_ANTI -@item REG_DEP_ANTI -This indicates an anti dependence (a write after read dependence). +@findex REG_DEP_TRUE +@item REG_DEP_TRUE +This indicates a true dependence (a read after write dependence). @findex REG_DEP_OUTPUT @item REG_DEP_OUTPUT This indicates an output dependence (a write after write dependence). + +@findex REG_DEP_ANTI +@item REG_DEP_ANTI +This indicates an anti dependence (a write after read dependence). + @end table These notes describe information gathered from gcov profile data. They @@ -3456,6 +3651,12 @@ of the JUMP@. The format is a bitmask of ATTR_FLAG_* values. This is used on an RTX_FRAME_RELATED_P insn wherein the attached expression is used in place of the actual insn pattern. This is done in cases where the pattern is either complex or misleading. + +@findex REG_LIBCALL_ID +@item REG_LIBCALL_ID +This is used to specify that an insn is part of a libcall. Each libcall +in a function has a unique id, and all the insns that are part of that +libcall will have a REG_LIBCALL_ID note attached with the same ID. @end table For convenience, the machine mode in an @code{insn_list} or