[LLVMdev] ARM Jump table pcrelative relaxation in clang / llc

Tim Northover t.p.northover at gmail.com
Tue Jul 7 08:06:13 PDT 2015


On 7 July 2015 at 06:06, Eric Bentura <ebentura at gmail.com> wrote:
> I have created a small ll file to reproduce the problem.
> I used the intrinsic function llvm.arm.space to introduce space between the
> beginning of the code and the jump table.

It does look like the value in @llvm.arm.space is interpreted
incorrectly if it's bigger than INT_MAX, but that's well outside its
intended range and could inevitably be used to break ConstantIslands
(the longest ARM immediate branch is 26-bits; no indivisible entity in
.text can be bigger than that). It's probably an unrelated issue.

Also, I know I said the backend should accept any size code, but 2GB
is definitely going to trigger more edge cases than average.

Cheers.

Tim.



More information about the llvm-dev mailing list