This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fixes some of PR 18463 and 17647, i386 address mode notbeing generated


Hello Andrew!

Even without your patch applied, gcc somehow gets lost in the L4 loop:

LU_copy_matrix:
        pushl %ebp
        movl %esp, %ebp
        pushl %edi
        pushl %esi
        pushl %ebx
        subl $4, %esp
        movl 8(%ebp), %ecx
        testl %ecx, %ecx
        jle .L9
        movl 20(%ebp), %edi
        movl 16(%ebp), %esi
        movl $0, -16(%ebp)
        .p2align 4,,15
.L4:
        movl 12(%ebp), %edx
        testl %edx, %edx
        jle .L7
        movl (%esi), %ebx
        movl $1, %edx		<= (1)
        movl (%edi), %ecx
        jmp .L6
        .p2align 4,,7
.L5:
        movl %eax, %edx
.L6:
        leal 0(,%edx,8), %eax	<= (2)
        cmpl %edx, 12(%ebp)	<= (3)
        fldl -8(%ecx,%eax)	<= (4)
        fstpl -8(%ebx,%eax)	<= (4)
        leal 1(%edx), %eax	<= (5)
        jg .L5			<= (3)
.L7:
        incl -16(%ebp)
        addl $4, %edi
        addl $4, %esi
        movl -16(%ebp), %eax
        cmpl %eax, 8(%ebp)
        jg .L4
.L9:
        popl %eax
        popl %ebx
        popl %esi
        popl %edi
        popl %ebp
        ret

Please look at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17647 for gcc-3.2 produced code. The big differences are:

(1): %eax should be cleared to zero here.
(2): not needed
(3):    cmpl    %eax, 12(%ebp)
	jl	.L5
(4):    fldl    (%ecx,%eax,8)
        fstpl   (%ebx,%eax,8)
(5):    addl    $1, %eax

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]