[llvm-dev] Arm: disabling/disallowing Thumb instructions

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 16 09:37:10 PDT 2015


On 16 September 2015 at 09:17, Erik de Castro Lopo via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> However, I am messing about with the Glasgow Haskell Compiler (GHC)
> which generates LLVM IR code directly and then calls `opt` and `llc` on
> that IR code. The generated IR code currently has:
>
>     target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32"
>     target triple = "armv6-unknown-linux-gnueabihf"
>
> in the header, but the generated assembly uses both Arm and Thumb
> instructions.

That shouldn't be happening. The "armv6" ought to imply ARM mode. What
Thumb instructions are you seeing, and do you have a .ll file that
reproduces the issue with standard tools or is it just the way GHC is
driving LLVM?

Cheers.

Tim.


More information about the llvm-dev mailing list