]> granicus.if.org Git - llvm/commit
[ARM] GlobalISel: Support global variables for RWPI
authorDiana Picus <diana.picus@linaro.org>
Tue, 5 Sep 2017 07:57:41 +0000 (07:57 +0000)
committerDiana Picus <diana.picus@linaro.org>
Tue, 5 Sep 2017 07:57:41 +0000 (07:57 +0000)
commitcd919a1d282445b10716e13b335ca7bb6ba15afb
treecec01d756ace1c2a8805706d8f7fb418ffd0258d
parent109ad3532633b5f0ff883dfc959dd2d193a0f9ef
[ARM] GlobalISel: Support global variables for RWPI

In RWPI code, globals that are not read-only are accessed relative to
the SB register (R9). This is achieved by explicitly generating an ADD
instruction between SB and an offset that we either load from a constant
pool or movw + movt into a register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312521 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstructionSelector.cpp
test/CodeGen/ARM/GlobalISel/arm-isel-globals-ropi-rwpi.ll
test/CodeGen/ARM/GlobalISel/arm-select-globals-ropi-rwpi.mir
test/CodeGen/ARM/GlobalISel/arm-unsupported.ll