This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/31985] Wide operations (i.e. adddi3) are split too late
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2007 08:53:41 -0000
- Subject: [Bug target/31985] Wide operations (i.e. adddi3) are split too late
- References: <bug-31985-1649@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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