This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/21329] optimize i386 block copy
- From: "vda at port dot imtp dot ilyichevsk dot odessa dot ua" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2005 09:04:01 -0000
- Subject: [Bug rtl-optimization/21329] optimize i386 block copy
- References: <20050502085919.21329.vda@port.imtp.ilyichevsk.odessa.ua>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From vda at port dot imtp dot ilyichevsk dot odessa dot ua 2005-05-02 09:04 -------
Comparison between old and new code (-O2):
--- tO2.s Mon May 2 11:49:24 2005
+++ tO2-new.s Mon May 2 11:50:03 2005
@@ -35,8 +35,7 @@
movl $t21, %edi
movl $w21, %esi
cld
- movl $2, %ecx
- rep
+ movsl
movsl
movsb
popl %esi
@@ -55,8 +54,7 @@
movl $t22, %edi
movl $w22, %esi
cld
- movl $2, %ecx
- rep
+ movsl
movsl
movsw
popl %esi
@@ -75,8 +73,7 @@
movl $t23, %edi
movl $w23, %esi
cld
- movl $2, %ecx
- rep
+ movsl
movsl
movsw
movsb
@@ -96,8 +93,8 @@
movl $t30, %edi
movl $w30, %esi
cld
- movl $3, %ecx
- rep
+ movsl
+ movsl
movsl
popl %esi
popl %edi
@@ -115,8 +112,9 @@
movl $t40, %edi
movl $w40, %esi
cld
- movl $4, %ecx
- rep
+ movsl
+ movsl
+ movsl
movsl
popl %esi
popl %edi
@@ -169,7 +167,6 @@
movl %esp, %ebp
pushl %edi
pushl %esi
- subl $24, %esp
movl w10, %eax
movl %eax, t10
movl w20, %eax
@@ -179,36 +176,34 @@
movl $t21, %edi
movl $w21, %esi
cld
- movl $2, %ecx
- rep
+ movsl
movsl
movsb
movl $t22, %edi
movl $w22, %esi
- movb $2, %cl
- rep
+ movsl
movsl
movsw
movl $t23, %edi
movl $w23, %esi
- movb $2, %cl
- rep
+ movsl
movsl
movsw
movsb
movl $t30, %edi
movl $w30, %esi
- movb $3, %cl
- rep
+ movsl
+ movsl
movsl
movl $t40, %edi
movl $w40, %esi
- movb $4, %cl
- rep
+ movsl
+ movsl
+ movsl
movsl
movl $t50, %edi
movl $w50, %esi
- movb $5, %cl
+ movl $5, %ecx
rep
movsl
movl $t60, %edi
@@ -216,7 +211,6 @@
movb $6, %cl
rep
movsl
- addl $24, %esp
popl %esi
popl %edi
leave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21329