Question about arm thumb2 code generation

Hi all,

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

Best Regards

Seb

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

Thanks andrew for the answer.

I would like to generate code for Cortex-A9 that don’t use neon for fp computation but vfpv3 –d16. I’ve tried some combination of –mattr=+neon,-neonfp,+vfp3,+d16 but couldn’t get “.fpu vfpv3-d16” directive generated in assembly file. Do you know how to make it happen ?

Best Regards

Seb

You can pass -mfpu=vfp3 to the assembler; that was the simplest solution I
found when I needed to do that.