10.7 Constant Expression Types
- This type of expression represents the integer value i. i
is customarily accessed with the macro
), which is equivalent to
Constants generated for modes with fewer bits than
HOST_WIDE_INTmust be sign extended to full width (e.g., with
There is only one expression object for the integer value zero; it is the value of the variable
const0_rtx. Likewise, the only expression for integer value one is found in
const1_rtx, the only expression for integer value two is found in
const2_rtx, and the only expression for integer value negative one is found in
constm1_rtx. Any attempt to create an expression of code
const_intand value zero, one, two or negative one will return
Similarly, there is only one object for the integer whose value is
STORE_FLAG_VALUE. It is found in
const1_rtxwill point to the same object. If
constm1_rtxwill point to the same object.
(const_double:m i0 i1
- Represents either a floating-point constant of mode m or an
integer constant too large to fit into
HOST_BITS_PER_WIDE_INTbits but small enough to fit within twice that number of bits (GCC does not provide a mechanism to represent even larger constants). In the latter case, m will be
If the constant is floating point (regardless of its precision), then the number of integers used to store the value depends on the size of
REAL_VALUE_TYPE(see Floating Point). The integers represent a floating point number, but not precisely in the target machine's or host machine's floating point format. To convert them to the precise bit pattern used by the target machine, use the macro
REAL_VALUE_TO_TARGET_DOUBLEand friends (see Data Output).
- Represents a fixed-point constant of mode m.
The operand is a data structure of type
struct fixed_valueand is accessed with the macro
CONST_FIXED_VALUE. The high part of data is accessed with
CONST_FIXED_VALUE_HIGH; the low part is accessed with
- Represents a vector constant. The square brackets stand for the vector
containing the constant elements. x0, x1 and so on are
The number of units in a
const_vectoris obtained with the macro
Individual elements in a vector constant are accessed with the macro
)where v is the vector constant and n is the element desired.
- Represents a constant string with value str. Currently this is used only for insn attributes (see Insn Attributes) since constant strings in C are placed in memory.
- Represents the value of an assembler label for data. symbol is
a string that describes the name of the assembler label. If it starts
with a *, the label is the rest of symbol not including
the *. Otherwise, the label is symbol, usually prefixed
symbol_refcontains a mode, which is usually
Pmode. Usually that is the only mode for which a symbol is directly valid.
- Represents the value of an assembler label for code. It contains one
operand, an expression, which must be a
NOTE_INSN_DELETED_LABELthat appears in the instruction sequence to identify the place where the label should go.
The reason for using a distinct expression type for code label references is so that jump optimization can distinguish them.
label_refcontains a mode, which is usually
Pmode. Usually that is the only mode for which a label is directly valid.
- Represents a constant that is the result of an assembly-time
arithmetic computation. The operand, exp, is an expression that
contains only constants (
label_refexpressions) combined with
minus. However, not all combinations are valid, since the assembler cannot do arbitrary arithmetic on relocatable symbols.
m should be
- Represents the high-order bits of exp, usually a
symbol_ref. The number of bits is machine-dependent and is normally the number of bits specified in an instruction that initializes the high order bits of a register. It is used with
lo_sumto represent the typical two-instruction sequence used in RISC machines to reference a global memory location.
m should be
) refers to an expression with
value 0 in mode mode. If mode mode is of mode class
MODE_INT, it returns
const0_rtx. If mode mode is of
MODE_FLOAT, it returns a
expression in mode mode. Otherwise, it returns a
CONST_VECTOR expression in mode mode. Similarly, the macro
) refers to an expression with value 1 in
mode mode and similarly for
CONST2_RTX macros are undefined
for vector modes.