Current status of MIPS support (some basic questions)

I am curious- what is the current status of the MIPS support in LLVM? I have a mipsel device and was wondering if I could compile code for it with clang.

Would I have to implement a backend setup myself?

Is there also an option to compile w/ clang on an x86 for Mipsel?

Thanks in advance.

Hi Carter,

I am curious- what is the current status of the MIPS support in LLVM? I have a mipsel device and was wondering if I could compile code for it with clang.

It's experimental, but patches are always welcome :slight_smile:

Would I have to implement a backend setup myself?

Is there also an option to compile w/ clang on an x86 for Mipsel?

I never tried with clang and I think you would need to add the support.

A normal build of clang includes limited cross-compile support by
passing in the "-ccc-host-triple" option, although it's still a bit of
a work-in-progress. Nobody has added support for any Mips targets,
but it's really easy to patch clang/lib/Basic/Targets.cpp to add a new
target. Please continue any discussion of this on cfe-dev.

-Eli

Thanks both for the replies. I am primarily considering using clang to test the backend modifications I may need to make to the experimental code generator to get it to work on my Mipsel device. I suspect the current backend may need to be extended to accommodate my needs in this case. Reading the comments in the backend seems to suggest it support MIPS1-2 and O32 to some extent whereas I need something along the lines of 64bit MIPS3 support and N32.