[LLVMdev] question when -march=mips

Heyu Zhu zhu.heyu at gmail.com
Thu Jan 28 03:27:24 PST 2010


Hi everyone

The c code is like below

extern int function_0(int, int);

int main(){
  return function_0(8, 9);
}

I compile it as below

llvm-gcc    main.c -emit-llvm -c  -O3   -o main.bc
llc     main.bc -relocation-model=static  -march=mips -O0  -o main.s

It seems no argument is provided to function_0

        ...
       addiu $sp, $sp, -8
       sw     $ra, 0($sp)
       jal      function_0
       nop
        ...

What's the reason?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100128/56d216bc/attachment.html>


More information about the llvm-dev mailing list