if genpreds.c would put an additional switch statement before the user
code. Well, maybe in this case it is not that much more readable
(maybe
the opposite is true), but in many predicates the third argument to
define_predicate would be superfluous, as in
+;; Return 1 if OP refers to a symbol.
+(define_predicate "symbolic_operand" "symbol_ref,const,label_ref"
+{
+ switch (GET_CODE (op))
+ {
+ case CONST:
+ case SYMBOL_REF:
+ case LABEL_REF:
+ return 1;
+
+ default:
+ break;
+ }
+ return 0;
+})
and that argument could be made optional (defaulting to "return 1;").
Does this make sense?