This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PPro patch for egcs


> In message <m0yhQH5-000268C@ocean.lucon.org>you write:
> > > 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.
> Yup.  HJ is right.  This comes up once in a while on ports that
> use cc0.

Ahhh,

I think I'm starting to see the light. :-)  Looking at the code suggests
that LT and GE are also relevant ... the magic is that they are handled
in put_condition_code by changing the condition suffix to check the sign
bit.  There is no eqivalent change that can be done for GT and LE which
is why the comparison needs to be restored.

Does final.c only remove tests / comparisons against zero?

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]