Next: Standard Names, Previous: Predicates, Up: Machine Desc [Contents][Index]
Each match_operand
in an instruction pattern can specify
constraints for the operands allowed. The constraints allow you to
fine-tune matching within the set of operands allowed by the
predicate.
Constraints can say whether
an operand may be in a register, and which kinds of register; whether the
operand can be a memory reference, and which kinds of address; whether the
operand may be an immediate constant, and which possible values it may
have. Constraints can also require two operands to match.
Side-effects aren’t allowed in operands of inline asm
, unless
‘<’ or ‘>’ constraints are used, because there is no guarantee
that the side-effects will happen exactly once in an instruction that can update
the addressing register.
• Simple Constraints: | Basic use of constraints. | |
• Multi-Alternative: | When an insn has two alternative constraint-patterns. | |
• Class Preferences: | Constraints guide which hard register to put things in. | |
• Modifiers: | More precise control over effects of constraints. | |
• Machine Constraints: | Existing constraints for some particular machines. | |
• Disable Insn Alternatives: | Disable insn alternatives using attributes. | |
• Define Constraints: | How to define machine-specific constraints. | |
• C Constraint Interface: | How to test constraints from C code. |