Previous: Machine-Independent Predicates, Up: Predicates  16.7.2
Defining Machine-Specific Predicates  Many machines have
requirements for their operands that cannot be expressed
precisely using the generic predicates. You can define
additional predicates using define_predicate and
define_special_predicate expressions. These expressions have
three operands:  The program genrecog scans define_predicate and
define_special_predicate expressions to determine which RTX
codes are possibly allowed. You should always make this explicit
in the RTL predicate expression, using MATCH_OPERAND and
MATCH_CODE.  Here is an example of a simple predicate
definition, from the IA64 machine description:       ;; True if
op is a SYMBOL_REF which refers to the sdata section.
(define_predicate "small_addr_symbolic_operand"        (and
(match_code "symbol_ref")             (match_test
"SYMBOL_REF_SMALL_ADDR_P (op)")))  And here is another, showing
the use of the C block.       ;; True if op is a register
operand that is (or coul