Lines Matching +full:test2 +full:. +full:zeros
3 @c Free Software Foundation, Inc.
4 @c This is part of the GCC manual.
5 @c For copying conditions, see the file gcc.texi.
14 representation called Register Transfer Language. In this language, the
16 algebraic form that describes what the instruction does.
18 RTL is inspired by Lisp lists. It has both an internal form, made up of
20 in the machine description and in printed debugging dumps. The textual
21 form uses nested parentheses to indicate the pointers in the internal form.
24 * RTL Objects:: Expressions vs vectors vs strings vs integers.
25 * RTL Classes:: Categories of RTL expression objects, and their structure.
26 * Accessors:: Macros to access expression operands or vector elts.
27 * Special Accessors:: Macros to access specific annotations on RTL.
28 * Flags:: Other flags in an RTL expression.
29 * Machine Modes:: Describing the size and format of a datum.
30 * Constants:: Expressions with constant values.
31 * Regs and Memory:: Expressions representing register contents or memory.
32 * Arithmetic:: Expressions representing arithmetic on other expressions.
33 * Comparisons:: Expressions representing comparison of expressions.
34 * Bit-Fields:: Expressions representing bit-fields in memory or reg.
35 * Vector Operations:: Expressions involving vector datatypes.
36 * Conversions:: Extending, truncating, floating or fixing.
37 * RTL Declarations:: Declaring volatility, constancy, etc.
38 * Side Effects:: Expressions for storing in registers, etc.
39 * Incdec:: Embedded side-effects for autoincrement addressing.
40 * Assembler:: Representing @code{asm} with operands.
41 * Debug Information:: Expressions representing debugging information.
42 * Insns:: Expression types for entire insns.
43 * Calls:: RTL representation of function call insns.
44 * Sharing:: Some expressions are unique; others *must* be copied.
45 * Reading RTL:: Reading textual RTL from a file.
58 strings and vectors. Expressions are the most important ones. An RTL
61 @code{rtx}.
64 digits. A wide integer is an integral object whose type is
65 @code{HOST_WIDE_INT}; their written form uses decimal digits.
67 A string is a sequence of characters. In core it is represented as a
68 @code{char *} in usual C fashion, and it is written in C syntax as well.
69 However, strings in RTL may never be null. If you write an empty string in
71 than as a pointer to a null character. In certain contexts, these null
72 pointers instead of strings are valid. Within RTL code, strings are most
74 other contexts in the RTL expressions that make up machine descriptions.
77 quotes, as you would in C@. However, strings in machine descriptions may
79 constants are not concatenated as they are in C@. Any string constant
80 may be surrounded with a single set of parentheses. Sometimes this
81 makes the machine description easier to read.
84 code is embedded in a machine description. Wherever a string can
85 appear, it is also valid to write a C-style brace block. The entire
87 the string constant. Double quote characters inside the braces are not
88 special. Therefore, if you write string constants in the C code, you
89 need not escape each quote character with a backslash.
91 A vector contains an arbitrary number of pointers to expressions. The
92 number of elements in the vector is explicitly present in the vector.
95 whitespace separating them. Vectors of length zero are not created;
96 null pointers are used instead.
103 codes). The expression code is a name defined in @file{rtl.def}, which is
104 also (in uppercase) a C enumeration constant. The possible expression
105 codes and their meanings are machine-independent. The code of an RTX can
107 @code{PUT_CODE (@var{x}, @var{newcode})}.
110 and what kinds of objects they are. In RTL, unlike Lisp, you cannot tell
111 by looking at an operand what kind of object it is. Instead, you must know
112 from its context---from the expression code of the containing expression.
114 to be regarded as an expression and the second operand as an integer. In
116 are to be regarded as expressions. In a @code{symbol_ref} expression,
117 there is one operand, which is to be regarded as a string.
121 of the expression (separated by spaces).
124 but when they appear in C code they are written in uppercase. In this
125 manual, they are shown as follows: @code{const_int}.
130 wanted. The written form of this is @code{(nil)}.
140 which are represented by single characters. You can determine the class
141 of an RTX code with the macro @code{GET_RTX_CLASS (@var{code})}.
142 Currently, @file{rtl.def} defines these classes:
147 (@code{REG}) or a memory location (@code{MEM}, @code{SYMBOL_REF}).
149 @code{STRICT_LOW_PART} are not in this class, but in class @code{x}.
152 An RTX code that represents a constant object. @code{HIGH} is also
153 included in this class.
157 @code{LT}.
161 or @code{ORDERED}.
165 @code{NOT}, or @code{ABS}. This category also includes value extension
166 (sign or zero) and conversions between integer and floating point.
170 @code{AND}. @code{NE} and @code{EQ} are comparisons, so they have class
171 @code{<}.
175 @code{DIV}, or @code{ASHIFTRT}.
178 An RTX code for a bit-field operation. Currently only
179 @code{ZERO_EXTRACT} and @code{SIGN_EXTRACT}. These have three inputs
180 and are lvalues (so they can be used for insertion as well).
181 @xref{Bit-Fields}.
184 An RTX code for other three input operations. Currently only
186 @code{ZERO_EXTRACT}, and @code{FMA}.
190 @code{CALL_INSN}. @xref{Insns}.
194 @code{MATCH_DUP}. These only occur in machine descriptions.
198 @code{POST_INC}.
201 All other RTX codes. This category includes the remaining codes used
202 only in machine descriptions (@code{DEFINE_*}, etc.). It also includes
204 @code{CLOBBER}, etc.) and the non-insns that may appear on an insn
205 chain, such as @code{NOTE}, @code{BARRIER}, and @code{CODE_LABEL}.
206 @code{SUBREG} is also part of this class.
210 For each expression code, @file{rtl.def} specifies the number of
212 called the @dfn{format} of the expression code. For example,
213 the format of @code{subreg} is @samp{ei}.
220 An expression (actually a pointer to an expression).
223 An integer.
226 A wide integer.
229 A string.
232 A vector of expressions.
240 in debugging dumps. It is used for pointers to insns.
244 in debugging dumps. It is used for the line number or code number of a
245 @code{note} insn.
248 @samp{S} indicates a string which is optional. In the RTL objects in
250 from an @samp{md} file, the string value of this operand may be omitted.
251 An omitted string is taken to be the null string.
254 @samp{V} indicates a vector which is optional. In the RTL objects in
256 from an @samp{md} file, the vector value of this operand may be omitted.
257 An omitted vector is effectively the same as a vector of no elements.
260 @samp{B} indicates a pointer to basic block structure.
263 @samp{0} means a slot whose contents do not fit any normal category.
265 special ways by small parts of the compiler.
274 Number of operands of an RTX of code @var{code}.
278 The format of an RTX of code @var{code}, as a C string.
281 Some classes of RTX codes always have the same format. For example, it
282 is safe to assume that all comparison operations have format @code{ee}.
286 All codes of this class have format @code{e}.
291 All codes of these classes have format @code{ee}.
295 All codes of these classes have format @code{eee}.
298 All codes of this class have formats that begin with @code{iuueiee}.
299 @xref{Insns}. Note that not all RTL objects linked onto an insn chain
300 are of class @code{i}.
305 You can make no assumptions about the format of these codes.
319 @code{XINT}, @code{XWINT} and @code{XSTR}. Each of these macros takes
321 (counting from zero). Thus,
328 accesses operand 2 of expression @var{x}, as an expression.
335 accesses the same operand as an integer. @code{XSTR}, used in the same
336 fashion, would access it as a string.
338 Any operand can be accessed as an integer, as an expression or as a string.
340 stored in the operand. You would do this based on the expression code of
341 the containing expression. That is also how you would know how many
342 operands there are.
346 and @code{XINT (@var{x}, 1)}. If you did @code{XINT (@var{x}, 0)}, you
349 @code{(int) XEXP (@var{x}, 0)}. @code{XEXP (@var{x}, 1)} would also
352 accessed. Nothing stops you from writing @code{XEXP (@var{x}, 28)} either,
354 unpredictable results.
356 Access to operands which are vectors is more complicated. You can use the
359 vector.
364 Access the vector-pointer which is operand number @var{idx} in @var{exp}.
369 in operand number @var{idx} in @var{exp}. This value is an @code{int}.
374 in operand number @var{idx} in @var{exp}. This value is an RTX@.
377 and is less than @code{XVECLEN (@var{exp}, @var{idx})}.
382 to access them.
388 Some RTL nodes have special annotations associated with them.
395 If 0, @var{x} is not in any alias set, and may alias anything. Otherwise,
396 @var{x} can only alias @code{MEM}s in a conflicting alias set. This value
398 altered in the back-end. In some front-ends, these numbers may correspond
400 and the back-end makes no such assumptions.
401 These set numbers are tested with @code{alias_sets_conflict_p}.
406 declaration, this is that tree node. It may also be a
410 object associated with the reference.
414 True if the offset of the memory reference from @code{MEM_EXPR} is known.
415 @samp{MEM_OFFSET (@var{x})} provides the offset if so.
419 The offset from the start of @code{MEM_EXPR}. The value is only valid if
420 @samp{MEM_OFFSET_KNOWN_P (@var{x})} is true.
424 True if the size of the memory reference is known.
425 @samp{MEM_SIZE (@var{x})} provides its size if so.
429 The size in bytes of the memory reference.
431 the size is implied by the mode. The value is only valid if
432 @samp{MEM_SIZE_KNOWN_P (@var{x})} is true.
436 The known alignment in bits of the memory reference.
440 The address space of the memory reference. This will commonly be zero
441 for the generic address space.
450 register number.
455 declaration, this is that tree node.
460 declaration, this is the offset into that logical storage.
468 a @code{FUNCTION_DECL}, that tree is recorded here. If this value is
470 and there is no associated front end symbol table entry.
473 that is, some sort of constant. In this case, the @code{symbol_ref}
475 front end symbol table entry.
480 pool entry for @var{x}. It is null otherwise.
485 @code{SYMBOL_REF_CONSTANT}.
490 about the symbol. Some of these are common enough to be computed by
491 common code, some are specific to the target. The common bits are:
497 Set if the symbol refers to a function.
502 Set if the symbol is local to this ``module''.
503 See @code{TARGET_BINDS_LOCAL_P}.
508 Set if this symbol is not defined in this translation unit.
509 Note that this is not the inverse of @code{SYMBOL_FLAG_LOCAL}.
514 Set if the symbol is located in the small data section.
515 See @code{TARGET_IN_SMALL_DATA_P}.
521 to be used for a thread-local storage symbol. It returns zero for
522 non-thread-local symbols.
528 @code{SYMBOL_REF_BLOCK_OFFSET} fields.
534 Set if the symbol is used as a section anchor. ``Section anchors''
536 and that can be used to access nearby members of that block.
537 They are used to implement @option{-fsection-anchors}.
539 If this flag is set, then @code{SYMBOL_FLAG_HAS_BLOCK_INFO} will be too.
543 the target's use.
550 or @code{NULL} if it has not been assigned a block.
555 from the first object in @samp{SYMBOL_REF_BLOCK (@var{x})}. The value is
557 been given an offset within that block.
565 that are used in certain types of expression. Most often they
566 are accessed with the following macros, which expand into lvalues.
574 function's constant pool. For most targets these addresses are in a
575 @code{.rodata} section entirely separate from the function, but for
576 some targets the addresses are close to the beginning of the function.
578 perhaps with the help of base registers.
579 Stored in the @code{unchanging} field and printed as @samp{/u}.
586 const function. Stored in the @code{unchanging} field and printed as
587 @samp{/u}.
594 pure function. Stored in the @code{return_val} field and printed as
595 @samp{/i}.
601 @code{RTL_PURE_CALL_P} is true.
608 infinite looping call to a const or pure function. Stored in the
609 @code{call} field and printed as @samp{/c}. Only true if one of
610 @code{RTL_CONST_CALL_P} or @code{RTL_PURE_CALL_P} is true.
619 that the branch is an annulling one. See the discussion under
620 @code{sequence} below. Stored in the @code{unchanging} field and
621 printed as @samp{/u}.
634 nonzero if the insn has been deleted. Stored in the
635 @code{volatil} field and printed as @samp{/v}.
645 is from the target of the branch. If the branch insn has
647 the branch is taken. For annulled branches with
649 branch is not taken. When @code{INSN_ANNULLED_BRANCH_P} is not set,
650 this insn will always be executed. Stored in the @code{in_struct}
651 field and printed as @samp{/s}.
659 code or data not visible to the RTL of a given function.
660 Labels referenced by a non-local goto will have this bit set. Stored
661 in the @code{in_struct} field and printed as @samp{/s}.
669 a reference to a non-local label.
670 Stored in the @code{volatil} field and printed as @samp{/v}.
677 mem unchanged when we access a component. Set to 1, for example, when we
678 are already in a non-addressable component of an aggregate.
679 Stored in the @code{jump} field and printed as @samp{/j}.
688 nonzero for volatile memory references.
689 Stored in the @code{volatil} field and printed as @samp{/v}.
695 In @code{mem}, nonzero for memory references that will not trap.
696 Stored in the @code{call} field and printed as @samp{/c}.
702 Nonzero in a @code{mem} if the memory reference holds a pointer.
703 Stored in the @code{frame_related} field and printed as @samp{/f}.
710 value is going to be returned. (This happens only in a hard
711 register.) Stored in the @code{return_val} field and printed as
712 @samp{/i}.
718 Nonzero in a @code{reg} if the register holds a pointer. Stored in the
719 @code{frame_related} field and printed as @samp{/f}.
726 the user's source code. Zero for temporaries generated internally by
727 the compiler. Stored in the @code{volatil} field and printed as
728 @samp{/v}.
732 in this kind of use.
744 and sets the stack pointer, sets the frame pointer, or saves a register.
746 register to use in place of the frame pointer.
747 Stored in the @code{frame_related} field and printed as @samp{/f}.
751 save area directly from the stack pointer. In that case, a temporary
753 Canonical Frame Address, i.e., DWARF2's logical frame pointer, register
754 must (temporarily) be changed to be this temporary register. So, the
756 @code{RTX_FRAME_RELATED_P}.
761 instruction. This note should contain a simple expression of the
762 computation performed by this instruction, i.e., one that
763 @code{dwarf2out_frame_debug_expr} can handle.
766 prologues.
772 Nonzero in a @code{mem}, if the memory is statically allocated and read-only.
775 program, not necessarily in ROM or in write-disabled pages. A common
776 example of the later is a shared library's global offset table. This
779 application, this memory will never be subsequently modified.
781 Stored in the @code{unchanging} field and printed as @samp{/u}.
791 previous insn must be scheduled together with this insn. This is used to
794 a @code{call_insn} may not be separated from the @code{call_insn}.
795 Stored in the @code{in_struct} field and printed as @samp{/s}.
801 For a @code{set}, nonzero if it is for a return.
802 Stored in the @code{jump} field and printed as @samp{/j}.
808 For a @code{call_insn}, nonzero if the insn is a sibling call.
809 Stored in the @code{jump} field and printed as @samp{/j}.
816 string constant pool.
817 Stored in the @code{frame_related} field and printed as @samp{/f}.
827 extended some other way via the @code{ptr_extend} instruction.
829 field and @code{volatil} field, printed as @samp{/u} and @samp{/v}.
831 the value. Use @code{SUBREG_PROMOTED_UNSIGNED_SET} to change the value.
839 to reflect zero, sign, or other extension. If @code{volatil} is
841 zero means sign extension. If @code{volatil} is nonzero then some
842 other type of extension was done via the @code{ptr_extend} instruction.
850 description macro (@pxref{Storage Layout}). In this case, the mode of
852 @code{SUBREG_REG} is the mode of the register that holds the object.
854 mode on every assignment. Stored in the @code{in_struct} field and
855 printed as @samp{/s}.
860 In a @code{symbol_ref}, indicates that @var{x} has been used. This is
862 once. Stored in the @code{used} field.
868 In a @code{symbol_ref}, indicates that @var{x} has been declared weak.
869 Stored in the @code{return_val} field and printed as @samp{/i}.
875 In a @code{symbol_ref}, this is used as a flag for machine-specific purposes.
876 Stored in the @code{volatil} field and printed as @samp{/v}.
879 by @code{SYMBOL_REF_FLAGS}. Certainly use of @code{SYMBOL_REF_FLAGS}
880 is mandatory if the target requires more than one bit of storage.
886 In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
887 No other INSNs will be moved over it.
888 Stored in the @code{volatil} field and printed as @samp{/v}.
897 In a @code{mem}, 1 means that the memory reference will not trap.
900 infinite loop.
902 In an RTL dump, this flag is represented as @samp{/c}.
910 frame pointer.
912 In @code{reg} expressions, 1 means that the register holds a pointer.
914 In @code{mem} expressions, 1 means that the memory reference holds a pointer.
917 this function's string constant pool.
919 In an RTL dump, this flag is represented as @samp{/f}.
925 contained within the test expression of some loop.
928 an object that has had its mode promoted from a wider mode.
932 was found.
934 In @code{code_label} expressions, it is 1 if the label may never be deleted.
935 This is used for labels which are the target of non-local gotos. Such a
937 @code{NOTE_INSN_DELETED_LABEL}.
940 dead code.
944 1 means that this insn is from the target of the branch.
947 must be scheduled as part of a group together with the previous insn.
949 In an RTL dump, this flag is represented as @samp{/s}.
955 the value to be returned by the current function. On
958 uses.
960 In @code{symbol_ref} expressions, 1 means the referenced symbol is weak.
962 In @code{call} expressions, 1 means the call is pure.
964 In an RTL dump, this flag is represented as @samp{/i}.
970 mem unchanged when we access a component.
972 In a @code{set}, 1 means it is for a return.
974 In a @code{call_insn}, 1 means it is a sibling call.
976 In an RTL dump, this flag is represented as @samp{/j}.
982 that the value of the expression never changes.
985 unsigned object whose mode has been promoted to a wider mode.
988 instruction, 1 means an annulling branch should be used.
991 something in the per-function constant pool.
994 function.
996 In an RTL dump, this flag is represented as @samp{/u}.
1002 appears in insns. Expressions that appear more than once are copied,
1003 according to the rules for shared structure (@pxref{Sharing}).
1007 renumbered once.
1010 the symbol has already been written.
1018 reference is volatile. Volatile memory references may not be deleted,
1019 reordered or combined.
1022 purposes.
1024 In a @code{reg} expression, it is 1 if the value is a user-level variable.
1025 0 indicates an internal compiler temporary.
1027 In an @code{insn}, 1 means the insn has been deleted.
1030 to a non-local label.
1033 scheduling barrier.
1035 In an RTL dump, this flag is represented as @samp{/v}.
1044 for it. In the C code, machine modes are represented by an enumeration
1045 type, @code{enum machine_mode}, defined in @file{machmode.def}. Each RTL
1047 expressions (declarations and types, to be precise).
1051 them. The letters @samp{mode} which appear at the end of each machine mode
1052 name are omitted. For example, @code{(reg:SI 38)} is a @code{reg}
1053 expression with machine mode @code{SImode}. If the mode is
1054 @code{VOIDmode}, it is not written at all.
1056 Here is a table of machine modes. The term ``byte'' below refers to an
1057 object of @code{BITS_PER_UNIT} bits (@pxref{Storage Layout}).
1062 ``Bit'' mode represents a single bit, for predicate registers.
1066 ``Quarter-Integer'' mode represents a single byte treated as an integer.
1070 ``Half-Integer'' mode represents a two-byte integer.
1075 four bytes but which doesn't really use all four. On some machines,
1076 this is the right mode to use for pointers.
1080 ``Single Integer'' mode represents a four-byte integer.
1085 eight bytes but which doesn't really use all eight. On some machines,
1086 this is the right mode to use for certain pointers.
1090 ``Double Integer'' mode represents an eight-byte integer.
1094 ``Tetra Integer'' (?) mode represents a sixteen-byte integer.
1098 ``Octa Integer'' (?) mode represents a thirty-two-byte integer.
1103 floating point number.
1108 point number.
1113 (three byte) floating point number.
1117 ``Single Floating'' mode represents a four byte floating point number.
1121 single-precision VAX and IBM types.
1125 ``Double Floating'' mode represents an eight byte floating point number.
1127 this is a double-precision IEEE floating point number.
1132 number. This mode only has 80 meaningful bits (ten bytes). Some
1134 to sixteen; this mode is used for either.
1140 point).
1145 floating point number.
1150 floating point number all 128 of whose bits are meaningful.
1155 all 128 of whose bits are meaningful. One common use is the
1156 IEEE quad-precision format.
1161 fractional number. The default format is ``s.7''.
1165 ``Half-Fractional'' mode represents a two-byte signed fractional number.
1166 The default format is ``s.15''.
1170 ``Single Fractional'' mode represents a four-byte signed fractional number.
1171 The default format is ``s.31''.
1175 ``Double Fractional'' mode represents an eight-byte signed fractional number.
1176 The default format is ``s.63''.
1180 ``Tetra Fractional'' mode represents a sixteen-byte signed fractional number.
1181 The default format is ``s.127''.
1186 unsigned fractional number. The default format is ``.8''.
1191 number. The default format is ``.16''.
1196 number. The default format is ``.32''.
1201 fractional number. The default format is ``.64''.
1206 fractional number. The default format is ``.128''.
1210 ``Half-Accumulator'' mode represents a two-byte signed accumulator.
1211 The default format is ``s8.7''.
1215 ``Single Accumulator'' mode represents a four-byte signed accumulator.
1216 The default format is ``s16.15''.
1220 ``Double Accumulator'' mode represents an eight-byte signed accumulator.
1221 The default format is ``s32.31''.
1225 ``Tetra Accumulator'' mode represents a sixteen-byte signed accumulator.
1226 The default format is ``s64.63''.
1230 ``Unsigned Half-Accumulator'' mode represents a two-byte unsigned accumulator.
1231 The default format is ``8.8''.
1236 accumulator. The default format is ``16.16''.
1241 accumulator. The default format is ``32.32''.
1246 accumulator. The default format is ``64.64''.
1252 comparison operation. Other machine-specific modes may also be used for
1253 the condition code. These modes are not used on machines that use
1254 @code{cc0} (@pxref{Condition Code}).
1259 the other modes apply. In RTL, only memory references can have this mode,
1260 and only if they appear in string-move or vector instructions. On machines
1261 which have no such instructions, @code{BLKmode} will not appear in RTL@.
1265 Void mode means the absence of a mode or an unspecified mode.
1268 requires. In debugging dumps of RTL, @code{VOIDmode} is expressed by
1269 the absence of any mode.
1279 point values. The floating point values are in @code{QFmode},
1281 @code{TFmode}, respectively.
1291 values. The integer values are in @code{QImode}, @code{HImode},
1293 respectively.
1297 into the machine mode used for addresses. Normally this is the mode
1298 whose size is @code{BITS_PER_WORD}, @code{SImode} on 32-bit machines.
1302 @code{FLOAT_TYPE_SIZE} and @code{DOUBLE_TYPE_SIZE}.
1305 @code{MAX_FIXED_MODE_SIZE}. Alternatively, you can have the compiler
1306 use @code{TImode} for 16-byte structures and unions. Likewise, you can
1307 arrange for the C type @code{short int} to avoid using @code{HImode}.
1311 these few references will soon be removed. Instead, the machine modes
1312 are divided into mode classes. These are represented by the enumeration
1313 type @code{enum mode_class} defined in @file{machmode.h}. The possible
1319 Integer modes. By default these are @code{BImode}, @code{QImode},
1321 @code{OImode}.
1326 @code{PSImode} and @code{PDImode}.
1330 Floating point modes. By default these are @code{QFmode},
1332 @code{XFmode} and @code{TFmode}.
1336 Decimal floating point modes. By default these are @code{SDmode},
1337 @code{DDmode} and @code{TDmode}.
1341 Signed fractional modes. By default these are @code{QQmode}, @code{HQmode},
1342 @code{SQmode}, @code{DQmode} and @code{TQmode}.
1346 Unsigned fractional modes. By default these are @code{UQQmode}, @code{UHQmode},
1347 @code{USQmode}, @code{UDQmode} and @code{UTQmode}.
1351 Signed accumulator modes. By default these are @code{HAmode},
1352 @code{SAmode}, @code{DAmode} and @code{TAmode}.
1356 Unsigned accumulator modes. By default these are @code{UHAmode},
1357 @code{USAmode}, @code{UDAmode} and @code{UTAmode}.
1361 Complex integer modes. (These are not currently implemented).
1365 Complex floating point modes. By default these are @code{QCmode},
1367 @code{TCmode}.
1371 Algol or Pascal function variables including a static chain.
1372 (These are not currently implemented).
1376 Modes representing condition code values. These are @code{CCmode} plus
1377 any @code{CC_MODE} modes listed in the @file{@var{machine}-modes.def}.
1379 also see @ref{Condition Code}.
1384 classes. Currently @code{VOIDmode} and @code{BLKmode} are in
1385 @code{MODE_RANDOM}.
1393 Returns the machine mode of the RTX @var{x}.
1397 Alters the machine mode of the RTX @var{x} to be @var{newmode}.
1402 machine. This is one greater than the largest numeric value of any
1403 machine mode.
1407 Returns the name of mode @var{m} as a string.
1411 Returns the mode class of mode @var{m}.
1415 Returns the next wider natural mode. For example, the expression
1416 @code{GET_MODE_WIDER_MODE (QImode)} returns @code{HImode}.
1420 Returns the size in bytes of a datum of mode @var{m}.
1424 Returns the size in bits of a datum of mode @var{m}.
1428 Returns the number of integral bits of a datum of fixed-point mode @var{m}.
1432 Returns the number of fractional bits of a datum of fixed-point mode @var{m}.
1437 mode @var{m}. This macro can only be used for modes whose bitsize is
1438 less than or equal to @code{HOST_BITS_PER_INT}.
1442 Return the required alignment, in bits, for an object of mode @var{m}.
1446 Returns the size in bytes of the subunits of a datum of mode @var{m}.
1448 modes. For them, the unit size is the size of the real or imaginary
1449 part.
1453 Returns the number of units contained in a mode, i.e.,
1454 @code{GET_MODE_SIZE} divided by @code{GET_MODE_UNIT_SIZE}.
1458 Returns the narrowest mode in mode class @var{c}.
1465 @code{BITS_PER_UNIT} or @code{BITS_PER_WORD}, respectively. On 32-bit
1466 machines, these are @code{QImode} and @code{SImode}, respectively.
1473 The simplest RTL expressions are those that represent constant values.
1478 This type of expression represents the integer value @var{i}. @var{i}
1480 @code{INTVAL (@var{exp})}, which is equivalent to @code{XWINT (@var{exp}, 0)}.
1483 must be sign extended to full width (e.g., with @code{gen_int_mode}).
1490 the value of the variable @code{const0_rtx}. Likewise, the only
1494 @code{constm1_rtx}. Any attempt to create an expression of code
1497 @code{constm1_rtx} as appropriate.
1501 @code{STORE_FLAG_VALUE}. It is found in @code{const_true_rtx}. If
1503 @code{const1_rtx} will point to the same object. If
1505 @code{constm1_rtx} will point to the same object.
1512 does not provide a mechanism to represent even larger constants). In
1513 the latter case, @var{m} will be @code{VOIDmode}.
1517 @var{i0} and @var{i1}. @var{i0} is customarily accessed with the macro
1518 @code{CONST_DOUBLE_LOW} and @var{i1} with @code{CONST_DOUBLE_HIGH}.
1522 @code{REAL_VALUE_TYPE} (@pxref{Floating Point}). The integers
1524 machine's or host machine's floating point format. To convert them to
1526 @code{REAL_VALUE_TO_TARGET_DOUBLE} and friends (@pxref{Data Output}).
1530 Represents a fixed-point constant of mode @var{m}.
1532 is accessed with the macro @code{CONST_FIXED_VALUE}. The high part of
1534 accessed with @code{CONST_FIXED_VALUE_LOW}.
1538 Represents a vector constant. The square brackets stand for the vector
1539 containing the constant elements. @var{x0}, @var{x1} and so on are
1540 the @code{const_int}, @code{const_double} or @code{const_fixed} elements.
1543 @code{CONST_VECTOR_NUNITS} as in @code{CONST_VECTOR_NUNITS (@var{v})}.
1548 desired.
1552 Represents a constant string with value @var{str}. Currently this is
1554 strings in C are placed in memory.
1558 Represents the value of an assembler label for data. @var{symbol} is
1559 a string that describes the name of the assembler label. If it starts
1561 the @samp{*}. Otherwise, the label is @var{symbol}, usually prefixed
1562 with @samp{_}.
1564 The @code{symbol_ref} contains a mode, which is usually @code{Pmode}.
1565 Usually that is the only mode for which a symbol is directly valid.
1569 Represents the value of an assembler label for code. It contains one
1572 sequence to identify the place where the label should go.
1575 references is so that jump optimization can distinguish them.
1577 The @code{label_ref} contains a mode, which is usually @code{Pmode}.
1578 Usually that is the only mode for which a label is directly valid.
1583 arithmetic computation. The operand, @var{exp}, is an expression that
1586 @code{minus}. However, not all combinations are valid, since the
1587 assembler cannot do arbitrary arithmetic on relocatable symbols.
1589 @var{m} should be @code{Pmode}.
1594 @code{symbol_ref}. The number of bits is machine-dependent and is
1596 the high order bits of a register. It is used with @code{lo_sum} to
1598 reference a global memory location.
1600 @var{m} should be @code{Pmode}.
1607 value 0 in mode @var{mode}. If mode @var{mode} is of mode class
1608 @code{MODE_INT}, it returns @code{const0_rtx}. If mode @var{mode} is of
1610 expression in mode @var{mode}. Otherwise, it returns a
1611 @code{CONST_VECTOR} expression in mode @var{mode}. Similarly, the macro
1613 mode @var{mode} and similarly for @code{CONST2_RTX}. The
1615 for vector modes.
1623 registers and to main memory.
1632 register number @var{n}: a @dfn{hard register}. For larger values of
1633 @var{n}, it stands for a temporary value or @dfn{pseudo register}.
1636 registers or into memory references.
1638 @var{m} is the machine mode of the reference. It is necessary because
1639 machines can generally refer to each register in more than one mode.
1643 various precisions.
1646 the mode must always be specified.
1650 invariant characteristic of the machine. Note, however, that not
1651 all of the machine registers must be general registers. All the
1654 instructions or can hold only certain types of data.
1658 and is accessed only in that mode. When it is necessary to describe
1660 expression is used.
1663 one word of data may actually stand for several consecutive registers.
1666 with the specified one.
1669 represented by a unique @code{reg} expression.
1676 optimization phases. These represent locations in the stack frame that
1678 completed. The following virtual register numbers are defined:
1684 stack. Normally these arguments are placed there by the caller, but the
1686 registers.
1692 value of @code{FIRST_PARM_OFFSET}.
1698 to immediately above the first variable on the stack. Otherwise, it points
1699 to the first variable on the stack.
1705 @code{STARTING_FRAME_OFFSET}.
1711 memory desired.
1716 @code{STACK_POINTER_REGNUM} and the value @code{STACK_DYNAMIC_OFFSET}.
1722 push insns should always use @code{STACK_POINTER_REGNUM}).
1726 @code{STACK_POINTER_REGNUM} and the value @code{STACK_POINTER_OFFSET}.
1734 a multi-part @code{reg} that actually refers to several registers.
1736 Each pseudo register has a natural mode. If it is necessary to
1738 enclosed in a @code{subreg}.
1744 This is the most common case. Most @code{subreg}s have pseudo
1745 @code{reg}s as their first operand.
1749 are still supported. During the reload pass these are replaced by plain
1750 @code{mem}s. On machines that do not do instruction scheduling, use of
1752 recommended. Such @code{subreg}s are considered to be
1754 during reload. Because of this, the scheduling passes cannot properly
1756 that do scheduling, @code{subreg}s of @code{mem} should never be used.
1759 @code{INSN_SCHEDULING} is defined.
1762 that is not well understood and should be avoided. There is still some
1763 code in the compiler to support this, but this code has possibly rotted.
1765 supported in the future.
1769 registers would normally reduce to a single @code{reg} rtx. This use of
1770 @code{subreg}s is discouraged and may not be supported in the future.
1774 @code{subreg}s of @code{subreg}s are not supported. Using
1775 @code{simplify_gen_subreg} is the recommended way to avoid this problem.
1783 expression is called @dfn{paradoxical}. The canonical test for this
1790 Paradoxical @code{subreg}s can be used as both lvalues and rvalues.
1792 are stored in @var{reg} and the high-order bits are discarded.
1795 defined.
1802 can control how the high-order bits are defined.
1805 The upper bits are defined when @code{SUBREG_PROMOTED_VAR_P} is true.
1806 @code{SUBREG_PROMOTED_UNSIGNED_P} describes what the upper bits hold.
1808 and parameter pseudo variables that have been promoted to a wider mode.
1813 big-endian targets.
1822 2 bytes. A subsequent:
1830 false.
1834 expression is called @dfn{normal}.
1837 @var{reg}. There are two cases. If @var{m1} is smaller than a word,
1839 @dfn{lowpart}) of one word of @var{reg}. If @var{m1} is word-sized or
1840 greater, the @code{subreg} refers to one or more complete words.
1842 When used as an lvalue, @code{subreg} is a word-based accessor.
1845 alone.
1849 state. This laxity makes it easier to generate efficient code for
1850 such instructions. To represent an instruction that preserves all the
1852 or @code{zero_extract} around the @code{subreg}.
1856 laid out in memory order. The memory order of bytes is defined by
1864 significant word.
1870 significant byte within a word.
1875 @code{WORDS_BIG_ENDIAN}. However, most parts of the compiler treat
1877 values. This works because they handle them solely as a collection of
1878 integer values, with no particular numerical value. Only real.c and
1879 the runtime libraries care about @code{FLOAT_WORDS_BIG_ENDIAN}.
1893 on a little-endian, @samp{UNITS_PER_WORD == 4} target. Both
1894 @code{subreg}s access the lower two bytes of register @var{x}.
1900 number of undefined bits. For example:
1908 defined. If we assume @samp{UNITS_PER_WORD <= 4}, then the following
1917 @samp{(reg:DI 0)}. Both @code{subreg}s have an unknown number
1918 of undefined bits.
1928 of @samp{(reg:PSI 0)}. Storing to the first @code{subreg} does not
1929 affect the value of the second, and vice versa. @samp{(reg:PSI 0)}
1937 value @samp{(reg:HI 4)}.
1940 The rules above apply to both pseudo @var{reg}s and hard @var{reg}s.
1943 must ensure that those combinations are never used. For example:
1949 must be true for every class @var{class} that includes @var{reg}.
1955 accessed with the @code{SUBREG_BYTE} macro.
1959 been tested. Anyone wishing to support such a platform in the future
1960 may be confronted with code rot.
1966 execution of a single instruction and not used subsequently. It is
1968 the reload pass.
1971 (@pxref{Side Effects}).
1976 This refers to the machine's condition code register. It has no
1977 operands and may not have a machine mode. There are two ways to use it:
1981 To stand for a complete set of condition code flags. This is best on
1982 most machines, where each comparison sets the entire series of flags.
1987 (@code{const_int} with value zero; that is to say, @code{const0_rtx}).
1990 To stand for a single flag that is the result of a single condition.
1992 which comparison instructions must specify the condition to test.
1997 first operand of @code{if_then_else} (in a conditional branch).
2002 value of the variable @code{cc0_rtx}. Any attempt to create an
2003 expression of code @code{cc0} will return @code{cc0_rtx}.
2005 Instructions can set the condition code implicitly. On many machines,
2007 they compute or store. It is not necessary to record these actions
2010 the macro @code{NOTICE_UPDATE_CC}). @xref{Condition Code}. Only
2012 instructions that use the condition code, need mention @code{(cc0)}.
2015 and a @code{reg} is used instead of @code{(cc0)}. This is usually the
2017 condition code. Other machines store condition codes in general
2018 registers; in such cases a pseudo register should be used.
2022 condition code. This is best handled by normally generating the
2025 (which would not be @code{(cc0)} in this case). For examples, search
2026 for @samp{addcc} and @samp{andcc} in @file{sparc.md}.
2031 This represents the machine's program counter. It has no operands and
2032 may not have a machine mode. @code{(pc)} may be validly used only in
2033 certain specific contexts in jump instructions.
2037 of the variable @code{pc_rtx}. Any attempt to create an expression of
2038 code @code{pc} will return @code{pc_rtx}.
2041 by incrementing it, but there is no need to mention this in the RTL@.
2046 represented by the expression @var{addr}. @var{m} specifies how large
2047 a unit of memory is accessed. @var{alias} specifies an alias set for the
2048 reference. In general two items are in different alias sets if they cannot
2049 reference the same memory address.
2052 other memories. Thus it may be used as a memory barrier in epilogue
2053 stack deallocation patterns.
2057 This RTX represents the concatenation of two other RTXs. This is used
2058 for complex values. It should only appear in the RTL attached to
2059 declarations and during RTL generation. It should not appear in the
2060 ordinary insn chain.
2065 single value. Like @code{concat}, this should only appear in
2066 declarations, and not in the insn chain.
2076 must be valid for mode @var{m}. An operand is valid for mode @var{m}
2078 @code{const_double} and @var{m} is a mode of class @code{MODE_INT}.
2081 second operand.
2097 @var{m}. They differ in their behavior on overflow of integer modes.
2100 @code{us_plus} saturates at the maximum unsigned value.
2108 of @var{y}. It is used with @code{high} (@pxref{Constants}) to
2110 to reference a global memory location.
2114 bits set by @code{high}.
2116 @var{m} should be @code{Pmode}.
2130 from @var{x}, carried out in mode @var{M}. Behavior on overflow is
2131 the same as for the three variants of @code{plus} (see above).
2137 of comparison. The result is computed without overflow, as if with
2138 infinite precision.
2140 Of course, machines can't really subtract with infinite precision.
2143 code. And that is the @emph{only} way this kind of expression may
2145 @code{(cc0)} or a register. @xref{Comparisons}.
2148 instead is the mode of the condition code value. If @code{(cc0)} is
2149 used, it is @code{VOIDmode}. Otherwise it is some mode in class
2150 @code{MODE_CC}, often @code{CCmode}. @xref{Condition Code}. If @var{m}
2153 can be applied to the result of the @code{COMPARE} operation. For other
2155 this information.
2157 Normally, @var{x} and @var{y} must have the same mode. Otherwise,
2160 @code{const_double} with mode @code{VOIDmode}. The mode of @var{x}
2162 be @code{VOIDmode}.
2165 second operand and the comparison code adjusted as appropriate.
2171 still known.
2183 the value represented by @var{x}, carried out in mode @var{m}. They
2184 differ in the behavior on overflow of integer modes. In the case of
2186 in mode @var{m}, in which case it is truncated to @var{m}. @code{ss_neg}
2188 maximum or minimum signed or unsigned value.
2201 @var{y} carried out in machine mode @var{m}.
2203 saturates to the maximum or minimum signed or unsigned value.
2206 than the operands. Write the pattern for this as
2213 not be the same.
2216 @code{zero_extend} instead of @code{sign_extend}.
2222 adding to@var{z} without doing an intermediate rounding step.
2233 carried out in machine mode @var{m}. If @var{m} is a floating point
2235 quotient.
2237 or minimum signed value.
2253 Like @code{div} but represents unsigned division.
2255 or minimum unsigned value.
2264 the quotient.
2273 @var{x} and @var{y}, interpreted as signed values in mode @var{m}.
2274 When used with floating point, if both operands are zeros, or if either
2276 is returned as the result.
2284 integers.
2291 carried out in mode @var{m}, which must be a fixed-point machine mode.
2299 a fixed-point machine mode.
2307 fixed-point mode.
2315 fixed-point mode.
2329 left by @var{c} places. They differ in their behavior on overflow of integer
2330 modes. An @code{ashift} operation is a plain shift with no special behavior
2333 shifted out differs from the final sign bit.
2335 @var{x} have mode @var{m}, a fixed-point machine mode. @var{c}
2338 entry for the left-shift instruction. For example, on the VAX, the mode
2339 of @var{c} is @code{QImode} regardless of @var{m}.
2346 Like @code{ashift} but for right shift. Unlike the case for left shift,
2347 these two operations are distinct.
2356 Similar but represent left and right rotate. If @var{c} is a constant,
2357 use @code{rotate}.
2364 Represents the absolute value of @var{x}, computed in mode @var{m}.
2366 maximum signed value.
2372 Represents the square root of @var{x}, computed in mode @var{m}.
2373 Most often @var{m} will be a floating point mode.
2378 @var{x}, represented as an integer of mode @var{m}. (The value is
2379 zero if @var{x} is zero.) The mode of @var{x} must be @var{m}
2380 or @code{VOIDmode}.
2386 significant bit position. This is one less than the number of leading
2387 sign bits (either 0 or 1), with no special cases. The mode of @var{x}
2388 must be @var{m} or @code{VOIDmode}.
2393 integer of mode @var{m}, starting at the most significant bit position.
2395 @code{CLZ_DEFINED_VALUE_AT_ZERO} (@pxref{Misc}). Note that this is one of
2396 the few expressions that is not invariant under widening. The mode of
2397 @var{x} must be @var{m} or @code{VOIDmode}.
2402 integer of mode @var{m}, starting at the least significant bit position.
2404 @code{CTZ_DEFINED_VALUE_AT_ZERO} (@pxref{Misc}). Except for this case,
2405 @code{ctz(x)} is equivalent to @code{ffs(@var{x}) - 1}. The mode of
2406 @var{x} must be @var{m} or @code{VOIDmode}.
2411 mode @var{m}. The mode of @var{x} must be @var{m} or @code{VOIDmode}.
2416 integer of mode @var{m}. The mode of @var{x} must be @var{m} or
2417 @code{VOIDmode}.
2422 in mode @var{m}, which must be a fixed-point machine mode.
2423 The mode of @var{x} must be @var{m} or @code{VOIDmode}.
2438 if the relation holds, or of zeros if it does not, for comparison operators
2439 that return vector results.
2441 of the data being compared. If the comparison operation is being tested
2442 (e.g., the first operand of an @code{if_then_else}), the mode must be
2443 @code{VOIDmode}.
2446 There are two ways that comparison operations may be used. The
2448 @code{(cc0)} against zero, as in @code{(eq (cc0) (const_int 0))}. Such
2450 in which the condition codes were set. The instruction setting the
2452 code; only @code{note} insns may separate them.
2455 objects. The mode of the comparison is determined by the operands; they
2456 must both be valid for a common machine mode. A comparison with both
2459 constant folding.
2463 identical to @code{(eq @var{x} @var{y})}. Usually only one style
2466 in case it exists in the context of the particular insn involved.
2468 Inequality comparisons come in two flavors, signed and unsigned. Thus,
2470 unsigned greater-than. These can produce different results for the same
2473 @code{0xffffffff} which is greater than 1.
2475 The signed comparisons are also used for floating point values. Floating
2476 point comparisons are distinguished by the machine modes of the operands.
2483 are equal, otherwise 0.
2489 are not equal, otherwise 0.
2494 @code{STORE_FLAG_VALUE} if the @var{x} is greater than @var{y}. If they
2495 are fixed-point, the comparison is done in a signed sense.
2501 Like @code{gt} but does unsigned comparison, on fixed-point numbers only.
2509 Like @code{gt} and @code{gtu} but test for ``less than''.
2517 Like @code{gt} and @code{gtu} but test for ``greater than or equal''.
2525 Like @code{gt} and @code{gtu} but test for ``less than or equal''.
2530 always used in conjunction with a comparison operation. To be
2531 precise, @var{cond} is a comparison expression. This expression
2533 represented by @var{then} and the one represented by @var{else}.
2536 to express conditional jumps.
2539 @item (cond [@var{test1} @var{value1} @var{test2} @var{value2} @dots{}] @var{default})
2540 Similar to @code{if_then_else}, but more general. Each of @var{test1},
2541 @var{test2}, @dots{} is performed in turn. The result of this expression is
2543 none of the tests are nonzero expressions.
2546 for insn attributes. @xref{Insn Attributes}.
2553 Special expression codes exist to represent bit-field instructions.
2560 starting in @var{loc} (a memory or register reference). The bit-field
2561 is @var{size} bits wide and starts at bit @var{pos}. The compilation
2563 @var{pos} counts from.
2565 If @var{loc} is in memory, its mode must be a single-byte integer mode.
2569 which is the default if none is specified.
2572 in the @code{insv} or @code{extv} pattern.
2575 @var{loc} if it were a register.
2578 in RTL.
2583 bit-field. The same sequence of bits are extracted, but they
2584 are filled to an entire word with zeros instead of by sign-extension.
2588 insertion of a value into the specified bit-field.
2596 interpreted as operating on each part of the vector independently.
2598 operations.
2603 This describes a merge operation between two vectors. The result is a vector
2605 @var{vec2}. Which elements are selected is described by @var{items}, which
2608 a set bit indicates it is taken from @var{vec1}.
2612 This describes an operation that selects parts of a vector. @var{vec1} is
2615 number of the source subpart that should be stored into it.
2618 with that element submode (if multiple subparts are selected).
2622 Describes a vector concat operation. The result is a concatenation of the
2624 the two inputs.
2629 input values. The output vector mode must have the same submodes as the
2631 of the number of input parts.
2641 explicit conversion operations. For example, an expression
2644 operation requires two operands of the same machine mode.
2654 to the desired final mode. The conversion operation code says how
2655 to do it.
2658 because the mode in which to do the conversion would not be known.
2660 must be placed into a register.
2666 to machine mode @var{m}. @var{m} must be a fixed-point mode
2667 and @var{x} a fixed-point value of a mode narrower than @var{m}.
2672 to machine mode @var{m}. @var{m} must be a fixed-point mode
2673 and @var{x} a fixed-point value of a mode narrower than @var{m}.
2678 to machine mode @var{m}. @var{m} must be a floating point mode
2679 and @var{x} a floating point value of a mode narrower than @var{m}.
2684 to machine mode @var{m}. @var{m} must be a fixed-point mode
2685 and @var{x} a fixed-point value of a mode wider than @var{m}.
2691 overflow. Both @var{m} and the mode of @var{x} must be fixed-point
2692 modes.
2698 overflow. Both @var{m} and the mode of @var{x} must be fixed-point
2699 modes.
2704 to machine mode @var{m}. @var{m} must be a floating point mode
2705 and @var{x} a floating point value of a mode wider than @var{m}.
2710 regarded as signed, to floating point mode @var{m}.
2715 regarded as unsigned, to floating point mode @var{m}.
2722 towards zero.
2726 signed. How rounding is done is not specified, so this operation may
2727 be used validly in compiling C code only for integer-valued operands.
2732 fixed point mode @var{m}, regarded as unsigned. How rounding is done
2733 is not specified.
2741 regarded as signed, or fixed-point value @var{x} to floating-point mode @var{m}.
2742 When overflows or underflows happen, the results are undefined.
2749 fixed-point mode @var{m}.
2751 maximum or the minimum.
2757 fixed-point mode @var{m}.
2758 When overflows or underflows happen, the results are undefined.
2763 fixed-point mode @var{m}.
2765 maximum or the minimum.
2774 but rather state assertions about their operands.
2781 @code{set} expression. In addition, the operand of this expression
2782 must be a non-paradoxical @code{subreg} expression.
2786 mode @var{m}, is not to be altered. Normally, an assignment to such
2788 register when @var{m} is less than a word.
2795 The expression codes described so far represent values, not actions.
2797 only for their side effects on the state of the machine. Special
2798 expression codes are used to represent side effects.
2802 the operands of these.
2808 represented by @var{lval}. @var{lval} must be an expression
2811 @code{parallel}, or @code{cc0}.
2814 machine mode; then @var{x} must be valid for that mode.
2819 rest of the register receives an undefined value. Likewise, if
2822 an undefined way.
2826 given the value @var{x} and the rest of the register is not changed.
2831 bit-field is not changed. Note that @code{sign_extract} can not
2832 appear in @var{lval}.
2835 be either a @code{compare} expression or a value that may have any mode.
2836 The latter case represents a ``test'' instruction. The expression
2838 @code{(set (cc0) (compare (reg:@var{m} @var{n}) (const_int 0)))}.
2839 Use the former expression to save space during the compilation.
2842 a function returning a structure in multiple registers. Each element
2846 corresponds. The first element may be null to indicate that the structure
2847 is also passed partly in memory.
2852 possibilities for @var{x} are very limited. It may be a
2853 @code{label_ref} expression (unconditional jump). It may be an
2857 (for the case which does jump). @var{x} may also be a @code{mem} or
2860 branch tables.
2864 valid for the mode of @var{lval}.
2869 @var{x} with the @code{SET_SRC} macro.
2875 instruction, such as VAXen. On machines where a multi-instruction
2878 the @code{return} expression code is never used.
2881 placed in @code{pc} to return to the caller.
2884 @code{(set (pc) (return))}, but the latter form is never used.
2890 of the function epilogue. Like @code{(return)}, this may also occur in
2891 conditional jumps.
2895 Represents a function call. @var{function} is a @code{mem} expression
2896 whose address is the address of the function to be called.
2899 others, it represents the number of argument registers.
2902 have. The machine description defines macro @code{FUNCTION_MODE} to
2903 expand into the requisite mode name. The purpose of this mode is to
2906 addressed.
2912 @code{scratch}, @code{parallel} or @code{mem} expression.
2915 values into particular hard registers. It may not be worth the
2918 attempt to keep data in them across the string instruction.
2922 locations must be presumed clobbered. If @var{x} is a @code{parallel},
2923 it has the same meaning as a @code{parallel} in a @code{set} expression.
2926 ``call-clobbered''. All function call instructions are assumed by
2928 @code{clobber} expressions to indicate this fact. Also, each function
2930 unless the function is declared @code{const}.
2936 has constructed when doing so will cause a pattern to be matched.
2940 add-accumulate instruction that does clobber the MQ register. Similarly,
2942 constituent instructions might not.
2947 insn if it is a hard register clobber. For pseudo-register clobber,
2952 clobber in the alternative. You can clobber either a specific hard
2955 there for use as a temporary.
2959 combiner phase to add the @code{clobber} when required. You do this by
2960 coding (@code{clobber} (@code{match_scratch} @dots{})). If you do
2962 a new one each time. Otherwise, you may confuse CSE@.
2966 clobbered by the insn. In this case, using the same pseudo register in
2967 the clobber and elsewhere in the insn produces the expected results.
2971 Represents the use of the value of @var{x}. It indicates that the
2973 it may not be apparent why this is so. Therefore, the compiler will
2975 store a value in @var{x}. @var{x} must be a @code{reg} expression.
2979 of a special register will modify the behavior of the instruction.
2995 if register 1 changes in between.
2998 that the register is live. You should think twice before adding
3000 instead. The @code{use} RTX is most commonly useful to describe that
3001 a fixed register is implicitly used in an insn. It is also safe to use
3004 @samp{call} patterns.
3007 can carry a reg_equal note. These @code{use} insns will be deleted
3008 before the reload phase exits.
3010 During the delayed branch scheduling phase, @var{x} may be an insn.
3012 code and its data dependencies need to be taken into account. These
3014 phase exits.
3018 Represents several side effects performed in parallel. The square
3020 vector of expressions. @var{x0}, @var{x1} and so on are individual
3022 @code{return}, @code{simple_return}, @code{clobber} or @code{use}.
3026 performed. For example,
3035 location addressed by it are interchanged. In both places where
3037 in register 1 @emph{before} the execution of the insn.
3040 expect the result of one @code{set} to be available for the next one.
3055 new value that is set by this instruction.
3061 assembler code---often @code{reg}, @code{mem} or constant expressions.
3063 but it is ok then because no further optimization remains to be done.
3065 any, must deal with such insns if you define any peephole optimizations.
3069 Represents a conditionally executed expression. The @var{expr} is
3070 executed only if the @var{cond} is nonzero. The @var{cond} expression
3072 side-effects.
3076 Represents a sequence of insns. Each of the @var{insns} that appears
3079 @code{code_label}, @code{barrier} or @code{note}.
3082 generation. It represents the sequence of insns that result from a
3084 @code{emit_insn} to insert them in the chain of insns. When actually
3086 @code{sequence} is forgotten.
3089 reside in its delay slots are grouped together into a @code{sequence}.
3091 subsequent insns are to be placed in the delay slot.
3095 the effect of the insns in the delay slots. In such a case,
3098 the insn should be executed only if the branch is not taken.
3099 @xref{Delay Slots}.
3109 Represents literal assembler code as described by the string @var{s}.
3115 Represents a machine-specific operation on @var{operands}. @var{index}
3116 selects between multiple machine-specific operations.
3118 that may trap; @code{unspec} is used for other operations.
3121 insn, inside a @code{parallel}, or inside an expression.
3125 Represents a table of jump addresses. The vector elements @var{lr0},
3126 etc., are @code{label_ref} expressions. The mode @var{m} specifies
3128 @code{Pmode}.
3133 @var{base}. The vector elements @var{lr0}, etc., are @code{label_ref}
3134 expressions and so is @var{base}. The mode @var{m} specifies how much
3135 space is given to each address-difference. @var{min} and @var{max}
3137 maximum address, respectively. @var{flags} indicates the relative
3139 and of @var{min} and @var{max} to @var{base}. See rtl.def for details.
3143 Represents prefetch of memory at address @var{addr}.
3146 prefetch.
3149 targets that do not support locality hints should ignore this.
3152 cache before it is accessed. It should use only non-faulting data prefetch
3153 instructions.
3163 Six special side-effect expression codes appear as memory addresses.
3170 decremented. @var{x} must be a @code{reg} or @code{mem}, but most
3171 machines allow only a @code{reg}. @var{m} must be the machine mode
3172 for pointers on the machine in use. The amount @var{x} is decremented
3174 reference of which this expression serves as the address. Here is an
3183 value and use the result to address a @code{DFmode} value.
3187 Similar, but specifies incrementing @var{x} instead of decrementing it.
3192 value. The value represented here is the value @var{x} has @i{before}
3193 being decremented.
3197 Similar, but specifies incrementing @var{x} instead of decrementing it.
3203 represents @var{x} before @var{x} is modified. @var{x} must be a
3204 @code{reg} or @code{mem}, but most machines allow only a @code{reg}.
3205 @var{m} must be the machine mode for pointers on the machine in use.
3211 where @var{z} is an index register and @var{i} is a constant.
3221 register 48 to it, after the use of what ever 42 points to.
3225 Similar except side effects happen before the use.
3228 These embedded side effect expressions must be used with care. Instruction
3229 patterns may not use them. Until the @samp{flow} pass of the compiler,
3230 they may occur only to represent pushes onto the stack. The @samp{flow}
3233 then transformed to use pre- or post-increment or -decrement.
3236 another address in an insn, the original value of the register is used.
3240 as ambiguous and disallowed.
3244 @code{set} to describe how the address register is altered. This is not
3246 allow them wherever a memory address is called for. Describing them as
3248 in the machine description.
3256 user-specified assembler instruction. It is used to represent
3257 an @code{asm} statement with arguments. An @code{asm} statement with
3280 operand RTX's, and a vector of input-operand modes and constraints. The
3282 @code{*z}.
3285 several such @code{set} RTX's inside of a @code{parallel}. Each @code{set}
3288 output operand. They are also distinguished by the output-operand index
3289 number, which is 0, 1, @dots{} for successive output operands.
3297 references refer to.
3300 to variables that live at fixed locations (e.g., addressable
3301 variables, global non-automatic variables). For variables whose
3302 location may vary, it relies on the following types of notes.
3308 expression. It appears only in @code{NOTE_INSN_VAR_LOCATION} and
3309 @code{DEBUG_INSN}s, with slightly different meanings. @var{mode}, if
3311 modeless expression. @var{stat} is only meaningful in notes,
3313 uninitialized.
3319 @code{VAR_LOCATION} nodes.
3328 chain of objects called @dfn{insns}. Insns are expressions with
3329 special codes that are used for no other purpose. Some insns are
3332 declarative information.
3340 insns. These three fields occupy the same position in every insn,
3341 independent of the expression code of the insn. They could be accessed
3348 Accesses the unique id of insn @var{i}.
3352 Accesses the chain pointer to the insn preceding @var{i}.
3353 If @var{i} is the first insn, this is a null pointer.
3357 Accesses the chain pointer to the insn following @var{i}.
3358 If @var{i} is the last insn, this is a null pointer.
3364 last insn is the result of calling @code{get_last_insn}. Within the
3381 is always true.
3384 @code{sequence} expressions, which contain a vector of insns. The value
3388 which it is contained. Similar rules apply for @code{PREV_INSN}.
3391 inside @code{sequence} expressions. Specifically, if @var{insn} is the
3395 insn in the @code{sequence} expression. You can use these expressions
3396 to find the containing @code{sequence} expression.
3404 and do not do function calls. @code{sequence} expressions are always
3406 should jump or do function calls.
3409 mandatory ones listed above. These four are described in a table below.
3415 which @code{pc} can be set in that instruction). If there is an
3417 @code{jump_insn}.
3422 @code{JUMP_LABEL} which is defined once jump optimization has completed.
3426 branch. In a more complex jump, @code{JUMP_LABEL} records one of the
3428 as @code{REG_LABEL_TARGET} notes. The exception is @code{addr_vec}
3431 insn.
3434 labels, their @code{JUMP_LABEL} is @code{NULL_RTX}.
3439 function calls. It is important to distinguish these instructions because
3441 unpredictably.
3449 clobbered by the called function.
3453 TARGET_PASS_BY_REFERENCE}) are stored. If the argument is
3457 @code{MEM} may point to addresses that are not stack slots.
3460 @code{CALL_USED_REGISTERS} (@pxref{Register Basics}).
3466 to. It contains two special fields of data in addition to the three
3467 standard ones. @code{CODE_LABEL_NUMBER} is used to hold the @dfn{label
3469 labels in the compilation (not just in the current function).
3472 the label number.
3476 the label, as a number.
3479 @code{note} of type @code{NOTE_INSN_DELETED_LABEL}.
3483 phase is completed. It contains the number of times this label is
3484 referenced in the current function.
3492 @code{LABEL_GLOBAL_ENTRY}, and @code{LABEL_WEAK_ENTRY}. The only labels
3494 points} to the current function. These may be static (visible only in
3497 same name).
3499 Much of the compiler treats all four kinds of label identically. Some
3501 for this purpose, the macro @code{LABEL_ALT_ENTRY_P} is provided. It is
3502 equivalent to testing whether @samp{LABEL_KIND (label) == LABEL_NORMAL}.
3506 @file{final.c}.
3508 To set the kind of a label, use the @code{SET_LABEL_KIND} macro.
3513 past them. They are placed after unconditional jump instructions to
3515 @code{volatile} functions, which do not return (e.g., @code{exit}).
3516 They contain no information beyond the three standard fields.
3523 declarative information. They contain two nonstandard fields, an
3525 string accessed with @code{NOTE_SOURCE_FILE}.
3529 that the line came from. These notes control generation of line
3530 number data in the assembler output.
3539 Such a note is completely ignorable. Some passes of the compiler
3540 delete insns by altering them into notes of this kind.
3546 code jumps to it.
3553 of a level of scoping of variable names. They control the output
3554 of debugging information.
3561 level of scoping for exception handling. @code{NOTE_BLOCK_NUMBER}
3563 @code{NOTE_INSN_DELETED_LABEL} is associated with the given region.
3570 of a @code{while} or @code{for} loop. They enable the loop optimizer
3571 to find loops quickly.
3575 Appears at the place in a loop that @code{continue} statements jump to.
3580 those loops in which the exit test has been duplicated. This position
3582 invariants.
3587 prologue.
3592 This note is used to generate variable location debugging information.
3597 variable.
3601 These codes are printed symbolically when they appear in debugging dumps.
3608 (see @option{-fvar-tracking-assignments} option). They are the RTL
3612 @code{value} in the corresponding statement. A @code{DEBUG_EXPR} in
3614 @code{DEBUG_EXPR_DECL}.
3618 treatment and adjustments that regular instructions would. It is the
3624 (ranges, actually) in the program as possible.
3629 point before an overriding @code{VAR_LOCATION} is encountered. E.g.,
3635 point in which the register is modified.
3643 phases use the mode for various purposes.
3647 been processed.
3651 instruction begins an issue group. That is, when the instruction
3652 cannot issue simultaneously with the previous. This may be relied on
3653 by later passes, in particular machine-dependent reorg.
3661 An expression for the side effect performed by this insn. This must
3666 @code{parallel}, @code{cond_exec}, or @code{sequence}. If it is a
3670 @code{parallel} expression.
3675 this insn, or @minus{}1 if the matching has not yet been attempted.
3679 @code{asm_input}, @code{addr_vec} or @code{addr_diff_vec} expression.
3683 statement. These contain at least one @code{asm_operands} expression.
3685 such insns.
3689 file as some small positive or negative offset from a named pattern.
3694 dependencies between instructions within a basic block. Neither a jump
3695 nor a label may come between the related insns. These are only used by
3696 the schedulers and by combine. This is a deprecated data structure.
3697 Def-use and use-def chains are now preferred.
3702 giving miscellaneous information about the insn. It is often
3703 information pertaining to the registers used in this insn.
3707 expressions. Each of these has two operands: the first is an insn,
3709 the chain). The last @code{insn_list} in the chain has a null pointer
3710 as second operand. The significant thing about the chain is which
3712 expressions). Their order is not significant.
3715 pointer until then. Flow only adds links for those data dependencies
3716 which can be used for instruction combination. For each insn, the flow
3718 that are used for the first time in this insn.
3722 addition to @code{insn_list} expressions. There are several kinds of
3724 register note is really understood as being an @code{enum reg_note}.
3726 the kind of note.
3731 register note. Its counterpart, the macro @code{PUT_REG_NOTE_KIND
3733 @var{newkind}.
3737 they may create a linkage between two insns. There are also a set
3738 of values that are only used in @code{LOG_LINKS}.
3747 of the program.
3750 this insn since @var{op} is not necessarily modified by this insn.
3751 Rather, no subsequent instruction uses the contents of @var{op}.
3756 subsequent insn. This differs from a @code{REG_DEAD} note, which
3757 indicates that the value in an input will not be used subsequently.
3759 register.
3764 there is no distinction) by an embedded side effect inside this insn.
3766 @code{post_dec} or @code{pre_dec} expression.
3771 insn is reached. This is used so that decrement and branch until zero
3772 instructions, such as the m68k dbra, can be matched.
3775 description has a @samp{decrement_and_branch_until_zero} pattern.
3782 operand. The label may still eventually be a jump target, but if so
3783 in an indirect jump in a subsequent insn. The presence of this note
3785 used, and flow optimization to build an accurate flow graph.
3790 @code{addr_diff_vec}. It uses @var{op}, a @code{code_label} as a
3791 direct or indirect jump target. Its purpose is similar to that of
3792 @code{REG_LABEL_OPERAND}. This note is only present if the insn has
3795 @code{REG_LABEL_TARGET} note. @xref{Insns, JUMP_LABEL}.
3801 could potentially be very far apart in the executable. The presence
3804 construct. It is used when the optimization to partition basic blocks
3805 into hot and cold sections is turned on.
3810 related function.
3822 scope of this equivalence differs between the two types of notes. The
3824 different from @var{op}, but they will be equal at run time. If the
3827 of the @code{subreg} expression.
3831 occurrences by @var{op}. (``Validly'' here refers to the data flow of
3832 the program; simple replacement may make some insns invalid.) For
3834 assigned any other value, this kind of note is used.
3838 slot where the parameter was passed. Although in this case the register
3840 by the stack slot throughout the function.
3844 there is a stack slot where that parameter could be stored. Although
3849 well. This is used on machines for which the calling convention
3850 allocates stack space for register parameters. See
3851 @code{REG_PARM_STACK_SPACE} in @ref{Stack Arguments}.
3855 necessarily elsewhere in the function. In this case, @var{op}
3856 is typically an arithmetic expression. For example, when a sequence of
3859 final value.
3861 These two notes are used in different ways by the compiler passes.
3864 to think of that value. @code{REG_EQUIV} notes are used by register
3868 insufficient registers are available.
3875 @code{REG_EQUAL} note. In the early stages of register allocation, a
3878 destination register.
3882 need only check for @code{REG_EQUIV} notes.
3885 These notes describe linkages between insns. They occur in pairs: one
3887 the inverse note pointing back to the first insn.
3895 set and use @code{cc0} are adjacent. However, when branch delay slot
3896 filling is done, this may no longer be true. In this case a
3900 @code{cc0}.
3904 the type of dependency that each link represents. Links which indicate
3907 descriptive text.
3912 This indicates a true dependence (a read after write dependence).
3916 This indicates an output dependence (a write after write dependence).
3920 This indicates an anti dependence (a write after read dependence).
3924 These notes describe information gathered from gcov profile data. They
3926 @code{expr_list}.
3932 branch insn according to the profile data. The value is stored as a
3934 probability that the branch will be taken.
3939 has taken place. They indicate both the direction and the likelihood
3940 of the JUMP@. The format is a bitmask of ATTR_FLAG_* values.
3945 is used in place of the actual insn pattern. This is done in cases where
3946 the pattern is either complex or misleading.
3950 @code{expr_list} is printed using these symbolic codes in debugging dumps.
3958 ordinary way as an expression.
3966 Insns that call subroutines have the RTL expression code @code{call_insn}.
3968 RTL expression code, @code{call}.
3982 subroutine.
3986 also contain @code{use} or @code{clobber} expressions.
3990 the value is returned in a hard register. If this register's number is
4000 appropriate register receives a useful value in this insn.
4003 passing to the subroutine the address of a place to store the value.
4005 same RTL form as a call that returns nothing.
4008 for example to contain the return address. @code{call_insn} insns
4011 expressions that indicate which registers are destroyed. Similarly,
4014 subexpression should mention that register.
4019 calls, to modify all of memory.
4023 function. Similarly, if registers other than those in
4026 indicate which registers.
4034 there do not exist two distinct objects representing the same value.
4037 containing structure.
4042 no RTL objects are common to two functions.
4048 and therefore only a single machine mode.
4054 referring to it.
4058 All @code{const_int} expressions with equal values are shared.
4062 There is only one @code{pc} expression.
4066 There is only one @code{cc0} expression.
4071 each floating point mode. Likewise for values 1 and 2.
4076 each vector mode, be it an integer or a double constant vector.
4084 or @code{scratch} is seen it is distinct from all others that are seen.
4090 the places they appear. However, separate but equal objects for these
4091 variables are occasionally made.
4096 distinct @code{asm_operands} expression is made for each output operand.
4098 operands. This sharing is used later on to test whether two
4101 vector at all.
4105 except as described above. Many passes of the compiler rely on this
4107 side-effects on other insns.
4111 During initial RTL generation, shared structure is freely introduced.
4113 structure is copied by @code{unshare_all_rtl} in @file{emit-rtl.c},
4114 after which the above rules are guaranteed to be followed.
4119 temporarily. However, the shared structure is copied before the
4120 combiner is finished with the insn. This is done by calling
4122 @code{unshare_all_rtl}.
4128 To read an RTL object from a file, call @code{read_rtx}. It takes one
4129 argument, a stdio stream, and returns a single RTL object. This routine
4130 is defined in @file{read-rtl.c}. It is not available in the compiler
4132 from the machine description.
4135 an interface between a language front end and the bulk of GCC@. This
4136 idea is not feasible.
4138 GCC was designed to use RTL internally only. Correct RTL for a given
4139 program is very dependent on the particular target machine. And the RTL
4140 does not contain all the information about the program.
4143 the ``tree'' data structure, described in the files @file{tree.h} and
4144 @file{tree.def}. The documentation for this structure (@pxref{GENERIC})
4145 is incomplete.