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

Damjan Marion damjan.marion at gmail.com
Wed Jun 22 04:28:15 PDT 2011

On Jun 22, 2011, at 1:13 PM, Anton Korobeynikov wrote:

> Hi
>> I just realized that clang produces Thumb-2 instruction in code even when older CPU type which doesn't suport Thumb-2 is specified.
>> Here is output:
>> # /opt/llvm/bin/clang -S -ccc-host-triple arm-unknown-freebsd -mcpu=arm926ej-s -mfloat-abi=soft -v -o rrx.S rrx.c
>> clang version 3.0 (http://llvm.org/git/clang.git 98138cdfdee05c0afbab2b209ce8cfe4a52474e1)
>> Target: arm-unknown-freebsd
>> Thread model: posix
>>  "/opt/llvm/bin/clang" -cc1 -triple armv5e-unknown-freebsd
> It seems you're generating arm, not thumb code.

Exactly i want to generate ARM code and I got "RRX r0,r0" which is Thumb-2.

More information about the llvm-dev mailing list