Both of these activities are controlled by special expression types that direct matching and substitution of the operands. This expression is a placeholder for operand number n of the insn. When constructing an insn, operand number n will be substituted at this point. Operand numbers must be chosen consecutively counting from zero in each instruction pattern. If it returns zero, this instruction pattern fails to match.
People are often unclear on the difference between the constraint and the predicate.
The predicate helps decide whether a given insn matches the pattern. This function checks that the putative operand is either a constant, a register or a memory reference, and that it is valid for mode m . On RISC machines, it is usually most efficient to allow predicate to accept only objects that the constraints allow. If the constraints allow only constants, but the predicate allows something else, the compiler will crash when that case arises. This expression is also a placeholder for operand number n and indicates that operand must be a scratch or reg expression.