(partial_ccmode_register_operand, even_relop)
authorRichard Stallman <rms@gnu.org>
Sun, 7 Nov 1993 04:28:00 +0000 (04:28 +0000)
committerRichard Stallman <rms@gnu.org>
Sun, 7 Nov 1993 04:28:00 +0000 (04:28 +0000)
(partial_ccmode_register_operand, even_relop)
(odd_relop): New functions, for support of CCEVENmode.
(print_operand, new case '!'): Revert following condition.

From-SVN: r6030

gcc/config/m88k/m88k.c

index 8a7420d2c65e0e7b548351bf116f4fca173991bd..695d655ba9d3038e3be9e00ee252ef34786eeb13 100644 (file)
@@ -1341,6 +1341,16 @@ real_or_0_operand (op, mode)
              && op == CONST0_RTX (mode)));
 }
 
+/* Return true if OP is valid to use in the context of logic aritmethic
+   on condition codes. */
+
+int partial_ccmode_register_operand(op,mode)
+     rtx op;
+     enum machine_mode mode;
+{
+  return (register_operand(op,CCmode) || register_operand(op,CCEVENmode));
+}
+
 /* Return true if OP is a relational operator.  */
 
 int
@@ -1366,6 +1376,40 @@ relop (op, mode)
     }
 }
 
+int even_relop(op,mode)
+     rtx op;
+     enum machine_mode mode;
+{
+  switch (GET_CODE(op))
+    {
+    case EQ:
+    case LT:
+    case GT:
+    case LTU:
+    case GTU:
+      return 1;
+    default:
+      return 0;
+    }
+}
+
+int odd_relop(op,mode)
+     rtx op;
+     enum machine_mode mode;
+{
+  switch (GET_CODE(op))
+    {
+    case NE:
+    case LE:
+    case GE:
+    case LEU:
+    case GEU:
+      return 1;
+    default:
+      return 0;
+    }
+}
+
 /* Return true if OP is a relational operator, and is not an unsigned
    relational operator.  */
 
@@ -2803,6 +2847,10 @@ print_operand (file, x, code)
             ? ".n\t" : "\t", file);
       return;
 
+    case '!': /* Reverse the following condition. */
+      sequencep++;
+      reversep=1;
+      return; 
     case 'R': /* reverse the condition of the next print_operand
                 if operand is a label_ref.  */
       sequencep++;