[LLVMdev] question when -march=mips

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Sat Jan 30 09:36:48 PST 2010


Hi Heyu,

On Thu, Jan 28, 2010 at 9:27 AM, Heyu Zhu <zhu.heyu at gmail.com> wrote:
> 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?

This not happens using llvm TOT (svn trunk).

Best Regards,

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc




More information about the llvm-dev mailing list