This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 fix
> On Sat, Jan 06, 2001 at 10:52:53PM +0100, Jan Hubicka wrote:
> > * i386.c (ix86_expand_int_movcc): Take care to reverse fp conditions
> > properly.
>
> I'm not fond of this because in principal it causes ix86_fp_compare_mode
> to return incorrect results. Except that there's a hack at the end of
> that function that hides the lossage.
>
> Namely, when UNGE is reversed to LT, we *still* need to use CCFPUmode.
Currently, we always use CCFPUmode when -ffast-math is off.
The relevant bit is near the end of ix86_fp_compare_mode:
/* ??? If we knew whether invalid-operand exceptions were masked,
we could rely on fcom to raise an exception and take care of
NaNs. But we don't. We could know this from c99 math pragmas. */
if (TARGET_IEEE_FP)
unordered = 1;
return unordered ? CCFPUmode : CCFPmode;
so this transformation is corret with current code. I agree this situation is ill
and I would like to eliminate it in future few patches, but still I would like
to install this bit - currently it will prevent gcc from crashing when
trying to construct setcc based on isgreater builtin and in future it will
be correct too, if I finish my transformation.
Honza
>
>
> r~