[LLVMbugs] [Bug 6071] New: MIPS backend error, missing argument passing in generated code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jan 18 03:04:16 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6071

           Summary: MIPS backend error, missing argument passing in
                    generated code
           Product: libraries
           Version: 2.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Archive library
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ihusar at fit.vutbr.cz
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=4071)
 --> (http://llvm.org/bugs/attachment.cgi?id=4071)
C code

Please, assign this to the the correct component, in the backends in bugzilla,
there is no MIPS present.
For C code from some benchmark that calculates CRC compiled with web-site demo
frontend with no optimizations and then with llc -march=mips, incorrect code is
generated. (llvm v. 2.6).

Call in C code (crc.c):

crc = crc32buf(buf, 4);

is translated correctly to IR:

%1 = call i32 @crc32buf(i32* getelementptr ([4 x i32]* @buf, i32 0, i32 0), i32
4) nounwind         

but then the MIPS backend generates following code:

main:
        .frame  $sp,48,$ra
        .mask   0x80000000,-8
        .fmask  0x00000000,0

        .set    noreorder
        .cpload $25
        .set    nomacro
        addiu   $sp, $sp, -48
        sw      $ra, 40($sp)
        .cprestore      16

        sw      $4, 20($sp)
        sw      $5, 24($sp)
        sw      $zero, 32($sp)
        lw      $4, %got(buf)($gp)
        nop
        lw      $25, %call16(crc32buf)($gp)
        nop
        jalr    $25 #call - buf poiter is in $4, value 4 should be in $5, but 
                    #this assignement was not made
        nop
         ...


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list