[LLVMdev] How to get MIPS from clang + llvm ?

reed kotler rkotler at mips.com
Thu Nov 10 18:49:13 PST 2011


There are some new patches that make the Clang driver work better for a 
MIPS native
hosted compiler. We are working on the patches for the cross compiler.

There is also an alternate Clang driver which works well for MIPS cross at:
http://code.google.com/p/alternate-clang-driver/

Some patches are being checked in now to support direct .o generation 
but it's very experimental.

On 11/10/2011 04:24 PM, janarbek wrote:
> I was told that I can use clang + llvm to get MIPS instructions on my 
> x86 machine.
>
> I did following command and got error below. Does anyone have any idea 
> ? or can someone suggest me how to get MIPS instructions easily from llvm.
>
> clang -ccc-host-triple mips-unknown-linux -ccc-clang-archs mips helllo.c
>
> clang: warning: unknown platform, assuming -mfloat-abi=soft
> '+' is not a recognized feature for this target (ignoring feature)
> /tmp/cc-9SOWh0.s: Assembler messages:
> /tmp/cc-9SOWh0.s:8: Error: unknown pseudo-op: `.ent'
> /tmp/cc-9SOWh0.s:10: Error: unknown pseudo-op: `.frame'
> /tmp/cc-9SOWh0.s:11: Error: unknown pseudo-op: `.mask'
> /tmp/cc-9SOWh0.s:12: Error: unknown pseudo-op: `.fmask'
> /tmp/cc-9SOWh0.s:13: Error: expected comma after "noreorder"
> /tmp/cc-9SOWh0.s:14: Error: expected comma after "nomacro"
> /tmp/cc-9SOWh0.s:15: Error: no such instruction: `addiu $sp,$sp,-48'
> /tmp/cc-9SOWh0.s:16: Error: no such instruction: `sw $ra,44($sp)'
> /tmp/cc-9SOWh0.s:17: Error: no such instruction: `sw $fp,40($sp)'
> /tmp/cc-9SOWh0.s:18: Error: no such instruction: `addu $fp,$sp,$zero'
> /tmp/cc-9SOWh0.s:19: Error: no such instruction: `sw $zero,32($fp)'
> /tmp/cc-9SOWh0.s:20: Error: no such instruction: `lui $2,%hi($.str)'
> /tmp/cc-9SOWh0.s:21: Error: no such instruction: `addiu $4,$2,%lo($.str)'
> /tmp/cc-9SOWh0.s:22: Error: suffix or operands invalid for `ja'
> /tmp/cc-9SOWh0.s:24: Error: no such instruction: `sw $2,36($fp)'
> /tmp/cc-9SOWh0.s:25: Error: no such instruction: `addiu $2,$zero,0'
> /tmp/cc-9SOWh0.s:26: Error: no such instruction: `addu $sp,$fp,$zero'
> /tmp/cc-9SOWh0.s:27: Error: no such instruction: `lw $fp,40($sp)'
> /tmp/cc-9SOWh0.s:29: Error: no such instruction: `lw $ra,44($sp)'
> /tmp/cc-9SOWh0.s:31: Error: no such instruction: `addiu $sp,$sp,48'
> /tmp/cc-9SOWh0.s:32: Error: no such instruction: `jr $ra'
> /tmp/cc-9SOWh0.s:34: Error: expected comma after "macro"
> /tmp/cc-9SOWh0.s:35: Error: expected comma after "reorder"
> clang: error: assembler command failed with exit code 1 (use -v to see 
> invocation)
> jmatai at ubuntu:~/Work/llvm2.9/projects/hw_mips$
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111110/e03ae62b/attachment.html>


More information about the llvm-dev mailing list