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: cc register usage on i386/2.96


On Fri, 8 Sep 2000, Richard Henderson wrote:

> How irritating.  The thing is, I can't figure why setg tests
> the overflow flag at all.  Why doesn't it test zf==0 && sf==0?

Consider a compare (ie. subtract) of MAXINT with -1.  Result is MAXINT+1,
which has sf==1, yet clearly MAXINT > -1.

> Well, a similar test with subtract does seem to work, so you
> only need to diable CCmode add.

Yup.  Incidentally, sf and of are correctly set for the add, it's just
that "correctly set for an add" isn't right for comparing a signed
number against zero.

-- 
Linuxcare.  Support for the Revolution.


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