aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gnu.org>1993-01-19 21:03:05 +0000
committerTorbjorn Granlund <tege@gnu.org>1993-01-19 21:03:05 +0000
commitc85b8963694b31d041e7d5adc99ba25fff62ad7b (patch)
tree10a3bd0b939db5dbafd77c218af688305807068f /gcc
parent6f672dc06a7467f7edeff0316e8d6778becf5b20 (diff)
downloadgcc-c85b8963694b31d041e7d5adc99ba25fff62ad7b.zip
gcc-c85b8963694b31d041e7d5adc99ba25fff62ad7b.tar.gz
gcc-c85b8963694b31d041e7d5adc99ba25fff62ad7b.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.c88
1 files changed, 71 insertions, 17 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 0556532..40610b3 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -1954,7 +1954,7 @@ print_operand (file, x, code)
}
else
break;
- case 'C':
+ case 'C': /* Plain (C)ondition */
case 'X':
switch (GET_CODE (x))
{
@@ -1984,7 +1984,7 @@ print_operand (file, x, code)
abort ();
}
return;
- case 'N':
+ case 'N': /* Condition, (N)egated */
case 'Y':
switch (GET_CODE (x))
{
@@ -2014,6 +2014,75 @@ print_operand (file, x, code)
abort ();
}
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':
switch (GET_CODE (XEXP (x, 0)))
{
@@ -2623,20 +2692,6 @@ fmpysuboperands(operands)
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
operand) in an shadd instruction. Allow CONST_INT to work around
a reload bug. */
@@ -2672,4 +2727,3 @@ shadd_constant_p (val)
else
return 0;
}
-