(print_operand): Support unsigned codes for %D, %c, and %d.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 18 Sep 1996 21:53:25 +0000 (17:53 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 18 Sep 1996 21:53:25 +0000 (17:53 -0400)
From-SVN: r12744

gcc/config/alpha/alpha.c

index b8e581b3992537d227d161b30bcc75dadc0385b8..33a6fe6dfca6c6ca91ee3da080c06b854be8d513 100644 (file)
@@ -1420,43 +1420,28 @@ print_operand (file, x, code)
       fprintf (file, "%ld", (64 - INTVAL (x)) / 8);
       break;
 
-    case 'C':
+    case 'C': case 'D': case 'c': case 'd':
       /* Write out comparison name.  */
-      if (GET_RTX_CLASS (GET_CODE (x)) != '<')
-       output_operand_lossage ("invalid %%C value");
-
-      if (GET_CODE (x) == LEU)
-       fprintf (file, "ule");
-      else if (GET_CODE (x) == LTU)
-       fprintf (file, "ult");
-      else
-       fprintf (file, "%s", GET_RTX_NAME (GET_CODE (x)));
-      break;
-
-    case 'D':
-      /* Similar, but write reversed code.  We can't get an unsigned code
-        here.  */
-      if (GET_RTX_CLASS (GET_CODE (x)) != '<')
-       output_operand_lossage ("invalid %%D value");
-
-      fprintf (file, "%s", GET_RTX_NAME (reverse_condition (GET_CODE (x))));
-      break;
-
-    case 'c':
-      /* Similar to `c', but swap.  We can't get unsigned here either.  */
-      if (GET_RTX_CLASS (GET_CODE (x)) != '<')
-       output_operand_lossage ("invalid %%D value");
-
-      fprintf (file, "%s", GET_RTX_NAME (swap_condition (GET_CODE (x))));
-      break;
-
-    case 'd':
-      /* Similar, but reverse and swap.  We can't get unsigned here either.  */
-      if (GET_RTX_CLASS (GET_CODE (x)) != '<')
-       output_operand_lossage ("invalid %%D value");
-
-      fprintf (file, "%s",
-              GET_RTX_NAME (swap_condition (reverse_condition ((GET_CODE (x))))));
+      {
+       enum rtx_code c = GET_CODE (x);
+
+        if (GET_RTX_CLASS (c) != '<')
+         output_operand_lossage ("invalid %%C value");
+
+       if (code == 'D')
+         c = reverse_condition (c);
+       else if (code == 'c')
+         c = swap_condition (c);
+       else if (code == 'd')
+         c = swap_condition (reverse_condition (c));
+
+        if (c == LEU)
+         fprintf (file, "ule");
+        else if (c == LTU)
+         fprintf (file, "ult");
+        else
+         fprintf (file, "%s", GET_RTX_NAME (c));
+      }
       break;
 
     case 'E':