This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 cleanup and fix
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: i386 cleanup and fix
- From: Richard Henderson <rth at redhat dot com>
- Date: Thu, 11 Jan 2001 13:58:31 -0800
- Cc: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- References: <20010111105041.L744@atrey.karlin.mff.cuni.cz>
On Thu, Jan 11, 2001 at 10:50:41AM +0100, Jan Hubicka wrote:
> * i386.c (ix86_expand_fp_compare): Fix ordered/unordered confussion.
Ok.
There's nothing wrong with the code as written, but I do wonder if
> + case LT:
> + case UNLT:
> + if (code == LT && TARGET_IEEE_FP)
> + {
> + emit_insn (gen_andqi_ext_0 (scratch, scratch, GEN_INT (0x45)));
> emit_insn (gen_cmpqi_ext_3 (scratch, GEN_INT (0x01)));
> intcmp_mode = CCmode;
> code = EQ;
> ! }
> ! else
> ! {
> ! emit_insn (gen_testqi_ext_ccno_0 (scratch, GEN_INT (0x01)));
> ! code = NE;
> ! }
> ! break;
is better written as
case LT:
if (TARGET_IEEE_FP)
{
emit_insn (gen_andqi_ext_0 (scratch, scratch, GEN_INT (0x45)));
emit_insn (gen_cmpqi_ext_3 (scratch, GEN_INT (0x01)));
intcmp_mode = CCmode;
code = EQ;
break;
}
/* FALLTHRU */
case UNLT:
emit_insn (gen_testqi_ext_ccno_0 (scratch, GEN_INT (0x01)));
code = NE;
break;
I guess this is simply a matter of taste.
r~