This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug rtl-optimization/17236] inefficient code for long long multiply on x86



------- Comment #8 from bonzini at gnu dot org  2007-12-18 07:53 -------
For -mregparm=2 the code is this:

        pushl   %ebx
        movl    8(%esp), %ebx
        movl    12(%esp), %ecx
        imull   %ebx, %edx
        imull   %eax, %ecx
        addl    %edx, %ecx
        mull    %ebx
        popl    %ebx
        leal    (%ecx,%edx), %edx
        ret

It is better only for luck: the low part of "a" is already in %eax, so that
regclass decides for the "right" preference.

  Register 64 pref AREG, else GENERAL_REGS

Paolo


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17236


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