This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: spurious asm movl with gcc 3.0 -fno-gcse
- To: Denys dot Duchier at ps dot uni-sb dot de (Denys Duchier)
- Subject: Re: spurious asm movl with gcc 3.0 -fno-gcse
- From: Joern Rennecke <amylaar at cambridge dot redhat dot com>
- Date: Tue, 13 Mar 2001 20:02:36 +0000 (GMT)
- Cc: gcc at gcc dot gnu dot org
> I am very grateful to Brad Lucier for the hint to use -fno-gcse for
> our bytecode emulator loop. However, going over the assembly code I
> noticed an oddly spurious movl which isn't there with -fgcse:
>
> PUTLISTX:
>
> movl $8,%eax
> shrl $1,%eax
> movl _10FL_Manager.smmal(%eax),%ebx
> movl (%ebx),%edx
> movl %edx,_10FL_Manager.smmal(%eax)
> testl %edx,%edx
> jne .L7563
> call refill__10FL_Manager
> .L7563:
> movl %ebx,%edx <<<<====== HERE
> movl 4(%ebp),%eax
> leal 3(%edx),%edi
> addl $8,%ebp
> movl %edi,(%eax)
> movl %edx,448(%esp)
> jmp *(%ebp)
> .p2align 4,,7
This looks like vanilla inefficiency in register allocation.
This tends to pop up pseudo-randomly depending on the optimizations you
enable, the order of statements in a completely different part of the
function, and their alignment to the phase of the moon...