Scimark 2.0 LU.c regression - matrices

Uros Bizjak uros@kss-loka.si
Thu Sep 23 16:11:00 GMT 2004


Hello!

Comparing asm code from LU.c source (scimark-2.0):

With  "GCC: (GNU) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)" the inner loop 
of LU_copy_matrix() function looks like:

.L59:
    xorl    %eax, %eax
    cmpl    %esi, %eax
    jge    .L63
    movl    16(%ebp), %edi
    movl    (%edi,%ebx,4), %ecx
    movl    20(%ebp), %edi
    movl    (%edi,%ebx,4), %edx
.L58:
    fldl    (%edx,%eax,8)
    fstpl    (%ecx,%eax,8)
    addl    $1, %eax
    cmpl    %esi, %eax
    jl    .L58
.L63:
    addl    $1, %ebx
    cmpl    8(%ebp), %ebx
    jl    .L59


and with "GCC: (GNU) 4.0.0 20040923 (experimental)":

.L6:
    movl    12(%ebp), %eax
    testl    %eax, %eax
    jle    .L8
    movl    (%esi), %ecx
    movl    (%ebx), %edx
    xorl    %eax, %eax
.L7:
    fldl    (%ecx)
    fstpl    (%edx)
    addl    $1, %eax
    addl    $8, %ecx
    addl    $8, %edx
    cmpl    %eax, 12(%ebp)
    jg    .L7
.L8:
    addl    $1, %edi
    addl    $4, %esi
    addl    $4, %ebx
    cmpl    %edi, 8(%ebp)
    jg    .L6

There is something wrong with memory references in gcc-4.0.0 code. Look 
at .L7 loop in gcc-4.0's asm and corresponding .L58 in gcc-3.2's asm, 
movl, fldl and fstpl instructions.

Uros.



More information about the Gcc mailing list