egcs 1.0.2 success and problem
Jeffrey A Law
law@cygnus.com
Sat Oct 31 05:02:00 GMT 1998
In message <199804052121.AAA00146@hadar.wisdom.weizmann.ac.il>you write:
> I successfully compiled egcs 1.0.2 on RedHat 5.0 (no surprise I'm sure)
> I haven't included config.guess if you want it just ask.
>
> I noticed an optimization problem with gcc 2.7.2 and it is still present
> in egcs 1.0.2 (I specifically wanted to test this problem). I have pared
> down the sources a fair bit, if I need to do more I will try.
I believe if you try the current sources in the egcs CVS tree you'll find that
the second (and more important) loop in your testcase is optimized noticably
better now.
Here's what you were getting:
> .L11:
> movl 8(%ebp),%edx
> movl (%edx),%edx
> movl %edx,%eax
> xorl %edx,%edx
> movl %eax,-16(%ebp)
> movl %edx,-12(%ebp)
> movl 8(%ebp),%edx
> movl 4(%edx),%esi
> movl 12(%edx),%ebx
> movl 12(%ebp),%eax
> movl (%ebx,%esi,4),%ecx
> mull %ecx
> movl %eax,-8(%ebp)
> movl %edx,-4(%ebp)
> pushl -12(%ebp)
> pushl -16(%ebp)
> pushl -4(%ebp)
> pushl -8(%ebp)
> call __umoddi3
> movl %eax,-16(%ebp)
> movl %edx,-12(%ebp)
> addl $16,%esp
> movl -16(%ebp),%edx
> movl 8(%ebp),%eax
> incl %edi
> movl %edx,(%ebx,%esi,4)
> cmpl %edi,4(%eax)
> ja .L11
Here's what I get with the current sources:
.L11:
movl -4(%ebp),%ebx
movl 12(%ebp),%eax
movl (%ebx,%edi,4),%ecx
mull %ecx
movl 8(%ebp),%ecx
movl %eax,-12(%ebp)
movl %edx,-8(%ebp)
movl (%ecx),%eax
xorl %edx,%edx
pushl %edx
pushl %eax
movl -12(%ebp),%eax
movl -8(%ebp),%edx
pushl %edx
pushl %eax
call __umoddi3
movl 8(%ebp),%edx
addl $16,%esp
movl %eax,(%ebx,%edi,4)
incl %esi
movl 4(%edx),%eax
movl %eax,%edi
cmpl %edi,%esi
jb .L11
More information about the Gcc
mailing list