OSDN Git Service

(arithmetic_comparison_operator): New function.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Aug 1995 17:29:16 +0000 (17:29 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Aug 1995 17:29:16 +0000 (17:29 +0000)
(print_operand): Take into account that overflow flag is not set the
same as after a compare instruction.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10268 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/i386/i386.c

index f31ee1a..68aabfb 100644 (file)
@@ -1400,6 +1400,25 @@ expander_call_insn_operand (op, mode)
     return 1;
   return 0;
 }
+
+/* Return 1 if OP is a comparison operator that can use the condition code
+   generated by an arithmetic operation. */
+
+int
+arithmetic_comparison_operator (op, mode)
+     register rtx op;
+     enum machine_mode mode;
+{
+  enum rtx_code code;
+
+  if (mode != VOIDmode && mode != GET_MODE (op))
+    return 0;
+  code = GET_CODE (op);
+  if (GET_RTX_CLASS (code) != '<')
+    return 0;
+
+  return (code != GT && code != LE);
+}
 \f
 /* Returns 1 if OP contains a symbol reference */
 
@@ -2380,13 +2399,13 @@ print_operand (file, x, code)
            case NE:  fputs ("jne", file); return;
            case EQ:  fputs ("je",  file); return;
            case GE:  fputs ("jns", file); return;
-           case GT:  fputs ("jg",  file); return;
-           case LE:  fputs ("jle", file); return;
            case LT:  fputs ("js",  file); return;
-           case GEU: fputs ("jae", file); return;
-           case GTU: fputs ("ja",  file); return;
-           case LEU: fputs ("jbe", file); return;
-           case LTU: fputs ("jb",  file); return;
+           case GEU: fputs ("jmp", file); return;
+           case GTU: fputs ("jne",  file); return;
+           case LEU: fputs ("je", file); return;
+           case LTU: fputs ("#branch never",  file); return;
+
+           /* no matching branches for GT nor LE */
            }
          abort ();