[Bug rtl-optimization/21329] optimize i386 block copy
vda at port dot imtp dot ilyichevsk dot odessa dot ua
gcc-bugzilla@gcc.gnu.org
Mon May 2 09:04:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list