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]

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

why is this second sequence performing "movl %ebx,%edx" instead of
just using %ebx?  If this is somehow due to turning off global common
subexpresion elimination with -fno-gcse, then perhaps a finer level of
tuning would be a good idea :-) or, perhaps, this simple, probably
common case, ought to be recognized and dealt with in the obvious
way.

Cheers,

-- 
Dr. Denys Duchier			Denys.Duchier@ps.uni-sb.de
Forschungsbereich Programmiersysteme	(Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45	http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50			Phone: +49 681 302 5618
66041 Saarbruecken, Germany		Fax:   +49 681 302 5615


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