This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC Floating Point compare bug?
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: PowerPC Floating Point compare bug?
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 17 May 2001 01:37:51 -0700
- CC: gcc at gcc dot gnu dot org
- References: <200105170306.XAA23024@makai.watson.ibm.com>
David Edelsohn <dje@watson.ibm.com> writes:
> >>>>> Geoff Keating writes:
>
> Geoff> Yes. Specifically, it's the code sequence fsel/fneg/fsel that gets
> Geoff> emitted for a comparison; GCC is emitting it wrongly.
>
> If it was right, there wouldn't be a bug :^).
>
> The fsel code should be selecting between operands of the same
> mode, though the test can be of a different mode. The code is from the
> PowerPC Processor Book appendix. The bug most likely is some requirement
> about the operands that is not being met. I'll trace down the
> transitions.
I think the code simply has the wrong expansion in the movsfcc
define_expand for this (rare) case---the operands need to be
interchanged.
That code is bad in other ways, too, it doesn't allow for overflow and
NaNs and such.
--
- Geoffrey Keating <geoffk@geoffk.org>