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 target/31985] Wide operations (i.e. adddi3) are split too late



------- Comment #2 from ubizjak at gmail dot com  2007-09-26 08:53 -------
The testcase from comment #1 is fixed:

test_c:
        subl    $16, %esp
        movl    24(%esp), %eax
        mull    20(%esp)
        movl    %eax, 8(%esp)
        movl    %edx, 12(%esp)
        addl    $16, %esp
        ret

test_asm:
        subl    $16, %esp
        movl    20(%esp), %eax
#APP
        mull 24(%esp)
#NO_APP
        movl    %eax, 8(%esp)
        movl    %edx, 12(%esp)
        addl    $16, %esp
        ret

and the testcase from the description is much better:

test_c:
        pushl   %ebx
        subl    $16, %esp
        movl    36(%esp), %eax
        movl    28(%esp), %ecx    <<<<
        movl    24(%esp), %ebx
        movl    32(%esp), %edx    <<<<
(*)     addl    %ecx, %eax
        movl    %eax, 8(%esp)
(*)     adcl    %ebx, %edx
        movl    %edx, 12(%esp)
        addl    $16, %esp
        popl    %ebx
        ret

Still, addl and adcl could use memory input operand, removing two movs.


-- 


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


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