diff options
author | Owen Anderson <resistor@mac.com> | 2010-12-13 22:29:52 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-12-13 22:29:52 +0000 |
commit | e8d02539d7981c07d301d91a6a5b6ad34099b510 (patch) | |
tree | 98cf73472c721ea7d854068977b4e6ec11062ed5 /lib/Target/ARM/ARMExpandPseudoInsts.cpp | |
parent | 4dedddce93ffb4476fb269caddb10da60a0a8d84 (diff) | |
download | external_llvm-e8d02539d7981c07d301d91a6a5b6ad34099b510.zip external_llvm-e8d02539d7981c07d301d91a6a5b6ad34099b510.tar.gz external_llvm-e8d02539d7981c07d301d91a6a5b6ad34099b510.tar.bz2 |
Make Thumb2 LEA-like instruction into pseudos, which map down to ADR. Provide correct fixups for Thumb2 ADR,
which is _of course_ different from ARM ADR fixups, or any other Thumb2 fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMExpandPseudoInsts.cpp')
-rw-r--r-- | lib/Target/ARM/ARMExpandPseudoInsts.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/lib/Target/ARM/ARMExpandPseudoInsts.cpp index 2714dd2..109ec0c 100644 --- a/lib/Target/ARM/ARMExpandPseudoInsts.cpp +++ b/lib/Target/ARM/ARMExpandPseudoInsts.cpp @@ -763,6 +763,21 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) { break; } + case ARM::t2LEApcrel: + case ARM::t2LEApcrelJT: { + bool DstIsDead = MI.getOperand(0).isDead(); + MachineInstrBuilder MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), + TII->get(ARM::t2ADR)) + .addReg(MI.getOperand(0).getReg(), + RegState::Define | getDeadRegState(DstIsDead)) // Dst reg + .addOperand(MI.getOperand(1)) // Label + .addOperand(MI.getOperand(2)) // Pred + .addOperand(MI.getOperand(3)); + TransferImpOps(MI, MIB, MIB); + MI.eraseFromParent(); + return MIB; + } + case ARM::MOVi32imm: case ARM::MOVCCi32imm: case ARM::t2MOVi32imm: |