Commit c85b8963 by Torbjorn Granlund

(print_operand): Handle 'S' and 'B' for conditions.

Handle 'I' for printing 'i' when CONST_INT.
Handle 'k' for ones-complement of CONST_INT.
(incscc_operator): Remove.

From-SVN: r3279
parent 6f672dc0
...@@ -1954,7 +1954,7 @@ print_operand (file, x, code) ...@@ -1954,7 +1954,7 @@ print_operand (file, x, code)
} }
else else
break; break;
case 'C': case 'C': /* Plain (C)ondition */
case 'X': case 'X':
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
...@@ -1984,7 +1984,7 @@ print_operand (file, x, code) ...@@ -1984,7 +1984,7 @@ print_operand (file, x, code)
abort (); abort ();
} }
return; return;
case 'N': case 'N': /* Condition, (N)egated */
case 'Y': case 'Y':
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
...@@ -2014,6 +2014,75 @@ print_operand (file, x, code) ...@@ -2014,6 +2014,75 @@ print_operand (file, x, code)
abort (); abort ();
} }
return; return;
case 'S': /* Condition, operands are (S)wapped. */
switch (GET_CODE (x))
{
case EQ:
fprintf (file, "="); break;
case NE:
fprintf (file, "<>"); break;
case GT:
fprintf (file, "<"); break;
case GE:
fprintf (file, "<="); break;
case GEU:
fprintf (file, "<<="); break;
case GTU:
fprintf (file, "<<"); break;
case LT:
fprintf (file, ">"); break;
case LE:
fprintf (file, ">="); break;
case LEU:
fprintf (file, ">>="); break;
case LTU:
fprintf (file, ">>"); break;
default:
printf ("Can't grok '%c' operator:\n", code);
debug_rtx (x);
abort ();
}
return;
case 'B': /* Condition, (B)oth swapped and negate. */
switch (GET_CODE (x))
{
case EQ:
fprintf (file, "<>"); break;
case NE:
fprintf (file, "="); break;
case GT:
fprintf (file, ">="); break;
case GE:
fprintf (file, ">"); break;
case GEU:
fprintf (file, ">>"); break;
case GTU:
fprintf (file, ">>="); break;
case LT:
fprintf (file, "<="); break;
case LE:
fprintf (file, "<"); break;
case LEU:
fprintf (file, "<<"); break;
case LTU:
fprintf (file, "<<="); break;
default:
printf ("Can't grok '%c' operator:\n", code);
debug_rtx (x);
abort ();
}
return;
case 'k':
if (GET_CODE (x) == CONST_INT)
{
fprintf (file, "%d", ~INTVAL (x));
return;
}
abort();
case 'I':
if (GET_CODE (x) == CONST_INT)
fputs ("i", file);
return;
case 'M': case 'M':
switch (GET_CODE (XEXP (x, 0))) switch (GET_CODE (XEXP (x, 0)))
{ {
...@@ -2623,20 +2692,6 @@ fmpysuboperands(operands) ...@@ -2623,20 +2692,6 @@ fmpysuboperands(operands)
return 1; return 1;
} }
/* Return 1 iff OP is a valid operator to use in an incscc
instruction. Adding or subtracting the condition code
to/from another operand is valid on the PA, so return 1
for PLUS or MINUS. */
int
incscc_operator (op, mode)
rtx op;
enum machine_mode mode;
{
return (GET_CODE (op) == PLUS || GET_CODE (op) == MINUS);
}
/* Return 1 if OP is suitable for the second add operand (the unshifed /* Return 1 if OP is suitable for the second add operand (the unshifed
operand) in an shadd instruction. Allow CONST_INT to work around operand) in an shadd instruction. Allow CONST_INT to work around
a reload bug. */ a reload bug. */
...@@ -2672,4 +2727,3 @@ shadd_constant_p (val) ...@@ -2672,4 +2727,3 @@ shadd_constant_p (val)
else else
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment