From d784886d82b27fd421bb26d227d103c6dc9240f8 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 21 Aug 1995 13:29:16 -0400 Subject: [PATCH] (arithmetic_comparison_operator): New function. (print_operand): Take into account that overflow flag is not set the same as after a compare instruction. From-SVN: r10268 --- gcc/config/i386/i386.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f31ee1a5eaa..68aabfb8798 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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); +} /* 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 (); -- 2.30.2