Constraint codes common to AArch32 state and AArch64 state
The following constraint codes are common to both AArch32 state and AArch64 state.
- A constant integer, or the address of a global variable or function.
- A constant integer.
NoteThe immediate constraints only check that their operand is constant after optimizations have been applied. Therefore it is possible to write code that you can only compile at higher optimization levels. Arm recommends that you test your code at multiple optimization levels to ensure it compiles.
- A memory reference. This constraint causes a general-purpose register to
be allocated to hold the address of the value instead of the value
itself. By default, this register is printed as the name of the register
surrounded by square brackets, suitable for use as a memory operand. For
[x7]. In AArch32 state only, you can print the register without the surrounding square brackets by using the
mtemplate modifier. See Template modifiers for AArch32 state.
- If the operand is a constant after optimizations have been performed,
this constraint is equivalent to the
iconstraint. Otherwise, it is equivalent to the
wconstraints, depending on the type of the operand.
NoteArm recommends that you use more precise constraints where possible. The
Xconstraint does not perform any of the range checking or register restrictions that the other constraints perform.