------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2005-06-02 08:01 ------- Subject: Re: openssl is slower when compiled with gcc 4.0 than 3.3
The assembler attributed to 4.0 was produced by mainline (or some patched version of 4.0), wasn't it? Otherwise I cannot imagine why the inner loop would be unrolled. For plain 4.0, we get the following code, which seems just fine and equivalent to the one obtained with 3.4 (one of the memory references is strength reduced, but since we still fit into registers, this is OK). I don't just now see what/whether there is some problem with the code produced by 4.1, but I also don't see anything related to addressing mode selection there. .L21: movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl (%edx), %eax movl %eax, (%edx) movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl 4(%edx), %eax movl %eax, 4(%edx) movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl 8(%edx), %eax movl %eax, 8(%edx) movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl 12(%edx), %eax movl %eax, 12(%edx) movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl 16(%edx), %eax movl %eax, 16(%edx) movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl 20(%edx), %eax movl %eax, 20(%edx) movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl 24(%edx), %eax movl %eax, 24(%edx) movl [EMAIL PROTECTED](%ebx,%eax,4), %eax xorl 28(%edx), %eax movl %eax, 28(%edx) addl $32, %edx leal -12(%ebp), %esi cmpl %esi, %edx jne .L21 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19923