[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs

Renato Golin renato.golin at arm.com
Wed Jun 22 06:16:46 PDT 2011


On 22 June 2011 11:49, Damjan Marion <damjan.marion at gmail.com> wrote:
> # /opt/llvm/bin/clang -S -ccc-host-triple arm-unknown-freebsd -mcpu=arm926ej-s -mfloat-abi=soft -v -o rrx.S rrx.c

Even though you specified cpu as arm9, it's probably generating
generic ARM IR (use -emit-llvm -S and see), which defaults to ARM
instructions.

If you want thumb, use triple = thumb-unknown-freebsd, but still, that
will have problems. You can do it in two steps (clang -> IR, llc ->
ASM) and specify all options on both steps, or wait until the clang
patch for cross-compilation is reviewed and applied.

cheers,
--renato



More information about the llvm-dev mailing list