* pa.c (shadd_operand): New function.
(print_operand): Handle "%O" for shadd patterns.
From-SVN: r3867
return;
}
abort();
+ case 'O':
+ if (GET_CODE (x) == CONST_INT && exact_log2 (INTVAL (x)) >= 0)
+ {
+ fprintf (file, "%d", exact_log2 (INTVAL (x)));
+ return;
+ }
+ abort();
case 'P':
if (GET_CODE (x) == CONST_INT)
{
else
return 0;
}
+
+/* Return 1 if OP is a CONST_INT with the value 2, 4, or 8. These are
+ the valid constant for shadd instructions. */
+int
+shadd_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ return (GET_CODE (op) == CONST_INT && shadd_constant_p (INTVAL (op)));
+}