This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PPro patch for egcs
- To: john at feith dot com (John Wehle)
- Subject: Re: PPro patch for egcs
- From: hjl at lucon dot org (H.J. Lu)
- Date: Wed, 3 Jun 1998 20:01:07 -0700 (PDT)
- Cc: law at cygnus dot com, egcs at cygnus dot com
>
> >> Please describe the special cases.
> >>
> >> > if ((code == GT || code == LE)
> >> > && (cc_prev_status.flags & CC_NO_OVERFLOW))
> >> > return NULL_PTR;
> >>
> >> It's not clear to me that this is correct. The general form for
> >
> >That is very tricky.
>
> Not to be completely thick .... but why are only GT and LE relevant?
>
That is because of how CC works on x86. I believe you can find the
answer in x86 reference manual. You can do
# cd gcc/config/i386
# grep CC_NO_OVERFLOW i386.c i386.h
to see how it is used. Basically, we have to duplicate its usage
for integer conditional moves.
> It also occurs to me that there may be a problem with the floating
> point conditional move instructions which (I just noticed) do not
> support checking the overflow flag.
>
There is no overflow in floating point on x86. You have Inf and
FP exception. But we do have to handle unordered comparison for FP.
My patch fixes it. Please do
# cd gcc/config/i386
# grep CC_FCOMI i386.c i386.h i386.md
and check PPro/II reference manual.
H.J.