[PATCH] D23931: [XRay] ARM 32-bit no-Thumb support in LLVM

Serge Rogatch via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 05:39:58 PDT 2016


rSerge marked an inline comment as done.
rSerge added a comment.

In https://reviews.llvm.org/D23931#531853, @rengolin wrote:

> In https://reviews.llvm.org/D23931#531728, @rSerge wrote:
>
> > > Do you mean not supported in the Sled code, or inserting ARM Sled code into Thumb functions?
> >
> >
> > Neither is supported. I estimated that Thumb support requires substantial additional effort.
>
>
> My gut feeling is that this should mostly work already, since you're using BLX instructions.


`BLX r12` instruction has different machine code for ARM and Thumb. It is 4 byte long on ARM and 2 byte long on Thumb.  Furthermore, the rest of machine code in a sled contains 32-bit ARM instructions. Thumb may need different machine code, or even sequence of instructions because not everything is available in Thumb. To avoid changing trampoline assembly code, the trampoline can be called with `BLX` indicating that the destination is in ARM assembly.

> But I agree, let's not get ahead of ourselves.

> 

> Limit support for ARMv7A, non-Windows (which forces Thumb2). Something like:

> 

>   if (!SubTarget->hasV7Ops() || SubTarget->isWindows())

>     return Forgerabarit.

>    


Ok.


https://reviews.llvm.org/D23931





More information about the llvm-commits mailing list