These are the generic predicates available to all back ends. They are defined in recog.c. The first category of predicates allow only constant, or immediate, operands.
This predicate allows any sort of constant that fits in mode. It is an appropriate choice for instructions that take operands that must be constant.
This predicate allows any
CONST_INTexpression that fits in mode. It is an appropriate choice for an immediate operand that does not allow a symbol or label.
This predicate accepts any
CONST_DOUBLEexpression that has exactly mode. If mode is
VOIDmode, it will also accept
CONST_INT. It is intended for immediate floating point constants.
The second category of predicates allow only some kind of machine register.
This predicate allows any
SUBREGexpression that is valid for mode. It is often suitable for arithmetic instruction operands on a RISC machine.
This is a slight variant on
register_operandwhich works around a limitation in the machine-description reader.(match_operand n "pmode_register_operand" constraint)
means exactly what(match_operand:P n "register_operand" constraint)
would mean, if the machine-description reader accepted `:P' mode suffixes. Unfortunately, it cannot, because
Pmodeis an alias for some other mode, and might vary with machine-specific options. See Misc.
This predicate allows hard registers and
SCRATCHexpressions, but not pseudo-registers. It is used internally by
match_scratch; it should not be used directly.
The third category of predicates allow only some kind of memory reference.
This predicate allows any valid reference to a quantity of mode mode in memory, as determined by the weak form of
GO_IF_LEGITIMATE_ADDRESS(see Addressing Modes).
This predicate is a little unusual; it allows any operand that is a valid expression for the address of a quantity of mode mode, again determined by the weak form of
GO_IF_LEGITIMATE_ADDRESS. To first order, if `(mem:mode (exp))' is acceptable to
memory_operand, then exp is acceptable to
address_operand. Note that exp does not necessarily have the mode mode.
This is a stricter form of
memory_operandwhich allows only memory references with a
general_operandas the address expression. New uses of this predicate are discouraged, because
general_operandis very permissive, so it's hard to tell what an
indirect_operanddoes or does not allow. If a target has different requirements for memory operands for different instructions, it is better to define target-specific predicates which enforce the hardware's requirements explicitly.
This predicate allows a memory reference suitable for pushing a value onto the stack. This will be a
MEMwhich refers to
stack_pointer_rtx, with a side-effect in its address expression (see Incdec); which one is determined by the
STACK_PUSH_CODEmacro (see Frame Layout).
This predicate allows a memory reference suitable for popping a value off the stack. Again, this will be a
stack_pointer_rtx, with a side-effect in its address expression. However, this time
The fourth category of predicates allow some combination of the above operands.
This predicate allows any immediate or register operand valid for mode.
This predicate allows any register or memory operand valid for mode.
This predicate allows any immediate, register, or memory operand valid for mode.
Finally, there is one generic operator predicate.