Next: Accessors, Previous: RTL Objects, Up: RTL
The various expression codes are divided into several classes,
which are represented by single characters. You can determine the class
of an RTX code with the macro GET_RTX_CLASS (code).
Currently, rtl.def defines these classes:
RTX_OBJREG) or a memory location (MEM, SYMBOL_REF).
LO_SUM) is also included; instead, SUBREG and
STRICT_LOW_PART are not in this class, but in class x.
RTX_CONST_OBJHIGH is also
included in this class.
RTX_COMPAREGEU or
LT.
RTX_COMM_COMPAREEQ
or ORDERED.
RTX_UNARYNEG,
NOT, or ABS. This category also includes value extension
(sign or zero) and conversions between integer and floating point.
RTX_COMM_ARITHPLUS or
AND. NE and EQ are comparisons, so they have class
<.
RTX_BIN_ARITHMINUS,
DIV, or ASHIFTRT.
RTX_BITFIELD_OPSZERO_EXTRACT and SIGN_EXTRACT. These have three inputs
and are lvalues (so they can be used for insertion as well).
See Bit-Fields.
RTX_TERNARYIF_THEN_ELSE and VEC_MERGE.
RTX_INSNINSN, JUMP_INSN, and
CALL_INSN. See Insns.
RTX_MATCHMATCH_DUP. These only occur in machine descriptions.
RTX_AUTOINCPOST_INC.
RTX_EXTRADEFINE_*, etc.). It also includes
all the codes describing side effects (SET, USE,
CLOBBER, etc.) and the non-insns that may appear on an insn
chain, such as NOTE, BARRIER, and CODE_LABEL.
SUBREG is also part of this class.
For each expression code, rtl.def specifies the number of
contained objects and their kinds using a sequence of characters
called the format of the expression code. For example,
the format of subreg is ‘ei’.
These are the most commonly used format characters:
eiwsEA few other format characters are used occasionally:
unnote insn.
SVB0There are macros to get the number of operands and the format of an expression code:
GET_RTX_LENGTH (code)GET_RTX_FORMAT (code)Some classes of RTX codes always have the same format. For example, it
is safe to assume that all comparison operations have format ee.
1e.
<c2ee.
b3eee.
iiuueiee.
See Insns. Note that not all RTL objects linked onto an insn chain
are of class i.
omx