Hi.

> From: Hans-Peter.
> Date: 5 Nov 2011 г., 5:24:20:

>> +(define_constraint "S"
>> +  "PIC-constructs for symbols."
>> +  (and (match_test "flag_pic")
>> +       (match_code "const")
>> +       (match_test "cris_valid_pic_const (op, false)")))

> Can you really have other than two operands to the RTL "and"
> these days?  (I guess that's changed to "yes"; if not, the gen*
> programs should have alerted.  Unless there's some bug.)

Yes, it is possible.

de facto - code of satisfies_constraint_S function is math with 
define_constraint "S".

static inline bool
satisfies_constraint_S (rtx op)
{
  return (
#line 155 "../../gcc/gcc/config/cris/constraints.md"
(flag_pic)) && ((GET_CODE (op) == CONST) && (
#line 157 "../../gcc/gcc/config/cris/constraints.md"
(cris_valid_pic_const (op, false))));
}

de jure:

16.8.7 Defining Machine-Specific Constraints
....
define_constraint name docstring exp
... exp is an RTL expression, obeying the same rules as the RTL
expressions in predicate definitions. See Section 16.7.2 [Defining Predicates],
page 302, for details. ....

16.7.2 Defining Machine-Specific Predicates
....
  AND
  IOR
  NOT
  IF_THEN_ELSE
  ... As in Common Lisp, you may give an AND or IOR expression
  an arbitrary number of arguments; this has exactly the same effect as
  writing a chain of two-argument AND or IOR expressions.

Anatoly.

Reply via email to