This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cc register usage on i386/2.96
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: cc register usage on i386/2.96
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sat, 9 Sep 2000 14:11:17 +1100 (EST)
- cc: Jan Hubicka <jh at suse dot cz>, Andi Kleen <ak at suse dot de>, gcc-patches at gcc dot gnu dot org
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.