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

Anton Korobeynikov anton at korobeynikov.info
Wed Jun 22 04:13:39 PDT 2011


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.

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University




More information about the llvm-dev mailing list