ARM: partially handle 32-bit relocations for WoA
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 30 Apr 2014 04:54:58 +0000 (04:54 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 30 Apr 2014 04:54:58 +0000 (04:54 +0000)
commit745fff806db257b9a2eebc290df3f1cdf93a49dd
tree61c43d65e1635df27ecd6ca0007743224bc60e93
parentc8556d725f6b3575a45c9e7b9dab1468126882ad
ARM: partially handle 32-bit relocations for WoA

IMAGE_REL_ARM_MOV32T relocations require that the movw/movt pair-wise
relocation is not split up and reordered. When expanding the mov32imm
pseudo-instruction, create a bundle if the machine operand is referencing an
address.  This helps ensure that the relocatable address load is not reordered
by subsequent passes.

Unfortunately, this only partially handles the case as the Constant Island Pass
occurs after the instructions are unbundled and does not properly handle
bundles.  That is a more fundamental issue with the pass itself and beyond the
scope of this change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207608 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMExpandPseudoInsts.cpp
test/CodeGen/ARM/Windows/movw-movt-relocations.ll [new file with mode: 0644]