------- Additional Comments From vda at port dot imtp dot ilyichevsk dot odessa dot ua 2005-05-02 09:10 ------- BTW, see above comment: gcc -O2 allocated 24 bytes on stack and never uset them. ?!
Now, unoptimized compilation comparison: --- t.s Mon May 2 11:41:20 2005 +++ t-new.s Mon May 2 11:39:40 2005 @@ -32,8 +32,8 @@ movl $t21, %edi movl $w21, %esi cld - movl $9, %ecx - rep + movsl + movsl movsb popl %esi popl %edi @@ -50,9 +50,9 @@ movl $t22, %edi movl $w22, %esi cld - movl $10, %ecx - rep - movsb + movsl + movsl + movsw popl %esi popl %edi leave @@ -68,8 +68,9 @@ movl $t23, %edi movl $w23, %esi cld - movl $11, %ecx - rep + movsl + movsl + movsw movsb popl %esi popl %edi @@ -86,9 +87,8 @@ movl $t30, %edi movl $w30, %esi cld - movl $3, %eax - movl %eax, %ecx - rep + movsl + movsl movsl popl %esi popl %edi @@ -105,9 +105,9 @@ movl $t40, %edi movl $w40, %esi cld - movl $4, %eax - movl %eax, %ecx - rep + movsl + movsl + movsl movsl popl %esi popl %edi @@ -168,34 +168,34 @@ movl $t21, %edi movl $w21, %esi cld - movl $9, %ecx - rep + movsl + movsl movsb movl $t22, %edi movl $w22, %esi cld - movl $10, %ecx - rep - movsb + movsl + movsl + movsw movl $t23, %edi movl $w23, %esi cld - movl $11, %ecx - rep + movsl + movsl + movsw movsb movl $t30, %edi movl $w30, %esi cld - movl $3, %eax - movl %eax, %ecx - rep + movsl + movsl movsl movl $t40, %edi movl $w40, %esi cld - movl $4, %eax - movl %eax, %ecx - rep + movsl + movsl + movsl movsl movl $t50, %edi movl $w50, %esi -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21329