PPro patch for egcs

H.J. Lu hjl@lucon.org
Wed Jun 3 23:26:00 GMT 1998


> 
> >> 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.



More information about the Gcc mailing list