OSDN Git Service

ARM: fix WoA PEI instruction selection
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 7 May 2014 03:03:27 +0000 (03:03 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 7 May 2014 03:03:27 +0000 (03:03 +0000)
commit0029e2d665d3b0de6864c96ff964a23a7705610e
tree469e95c966109a0182fc7df0b2d9c6c191cebca9
parentffb8718ee5864bbc55ddc02448d2b7083579a4a7
ARM: fix WoA PEI instruction selection

The ARM::BLX instruction is an ARM mode instruction.  The Windows on ARM target
is limited to Thumb instructions.  Correctly use the thumb mode tBLXr
instruction.  This would manifest as an errant write into the object file as the
instruction is 4-bytes in length rather than 2.  The result would be a corrupted
object file that would eventually result in an executable that would crash at
runtime.

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