[LLVMdev] Question about arm thumb2 code generation

Andrew Trick atrick at apple.com
Fri Jul 27 17:46:16 PDT 2012


On Jul 27, 2012, at 9:04 AM, Sebastien DELDON-GNB <sebastien.deldon at st.com> wrote:

> Hi all,
>  
> Does llc –march=thumb –mcpu=cortex-a9 enable generation of thumb2 code for armv7 ?

That's how I usually do it.  Somewhere in the target description we associate a9 with -mattr=+thumb2.

There are plenty of other ways to get the same result, and it's all very confusing and opaque. Don't ask me what triples are valid. I usually verify that I have the right command line by staring at the disassembly until I'm convinced.

One good thing about llc (unlike other drivers... *cough*) is that the option values are actually discoverable!

llc --version gives you -march= values.
llc -mcpu=help
llc -mattr=help

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120727/31aa4f5b/attachment.html>


More information about the llvm-dev mailing list