Re: GCC-generated code and i386 condition codes behavior

2005-11-05 Thread Robert Dewar
Paolo Bonzini wrote: Paolo, who made the first paid computer work on Realia COBOL well that is fun ... quite a while ago :-)

Re: GCC-generated code and i386 condition codes behavior

2005-11-04 Thread Robert Dewar
Andi Kleen wrote: Robert Dewar <[EMAIL PROTECTED]> writes: I must say I am a bit surprised that gcc never takes advantage of the fact that inc and dec do not destroy the carry flag, this is quite significant for some loops. A lot of this old wisdom is no longer true. inc and dec are to be g

Re: GCC-generated code and i386 condition codes behavior

2005-11-04 Thread Paolo Bonzini
I must say I am a bit surprised that gcc never takes advantage of the fact that inc and dec do not destroy the carry flag, this is quite significant for some loops. And which is extremely bad on Pentium II and newer. Paolo, who made the first paid computer work on Realia COBOL

Re: GCC-generated code and i386 condition codes behavior

2005-11-04 Thread Andi Kleen
Robert Dewar <[EMAIL PROTECTED]> writes: > > I must say I am a bit surprised that gcc never takes advantage > of the fact that inc and dec do not destroy the carry flag, this > is quite significant for some loops. A lot of this old wisdom is no longer true. inc and dec are to be generally avoide

Re: GCC-generated code and i386 condition codes behavior

2005-11-04 Thread Robert Dewar
My question: does GCC-generated code ever actually depend on this aspect of the x86 architecture - i.e., on instructions that architecturally change some but not all condition codes _not_ changing those bits that they're not supposed to change? No. An interesting anecdote from decades ago. W

Re: GCC-generated code and i386 condition codes behavior

2005-11-04 Thread Bryan Ford
Hi Richard, On Wednesday 26 October 2005 00:30, Richard Henderson wrote: > On Mon, Oct 24, 2005 at 03:39:53PM -0500, Bryan Ford wrote: > > My question: does GCC-generated code ever actually depend on this aspect > > of the x86 architecture - i.e., on instructions that architecturally > > change so

Re: GCC-generated code and i386 condition codes behavior

2005-10-25 Thread Richard Henderson
On Mon, Oct 24, 2005 at 03:39:53PM -0500, Bryan Ford wrote: > My question: does GCC-generated code ever actually depend on this aspect of > the x86 architecture - i.e., on instructions that architecturally change some > but not all condition codes _not_ changing those bits that they're not > sup

GCC-generated code and i386 condition codes behavior

2005-10-24 Thread Bryan Ford
I have a question about GCC's handling of the condition codes (specifically the CF, ZF, NF, OF, PF bits in bits in EFLAGS) on the i386 that will hopefully be trivial to anyone familiar with the implementation of the i386 target. My impression is that GCC generally treats the i386 condition code