This is the mail archive of the gcc@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: spurious asm movl with gcc 3.0 -fno-gcse


> 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...


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