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

           Summary: [mips] insufficient stack space reserved
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: ASSIGNED
          Keywords: ABI
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=4154)
 --> (http://llvm.org/bugs/attachment.cgi?id=4154)
will report "Illegal instruction"

The file below will report "Illegal instruction", the ll file is attached.

#include<stdio.h>
void f(){
        printf("Hi in f\n");
}
int main()
{
        f();
        printf("Hi\n");
}

Examine the assembly, we see 

f:
        .frame  $fp,8,$ra
                    ~~ O32 ABI requires at least 16 bytes reserved for outgoing
arguments
        .mask   0xC0000000,-4
        .fmask  0x00000000,0
        .set    noreorder
        .cpload $25
        .set    nomacro
        addiu   $sp, $sp, -8
        sw      $ra, 4($sp)
        sw      $fp, 0($sp)
        addu    $fp, $sp, $zero
        .cprestore      16
         ~~~~~~~~~~~~~~~~~~ this accesses 16($sp), which is out of range.
...


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to