diff options
author | David Goodwin <david_goodwin@apple.com> | 2009-06-30 19:50:22 +0000 |
---|---|---|
committer | David Goodwin <david_goodwin@apple.com> | 2009-06-30 19:50:22 +0000 |
commit | c9a59b5960088f48c3be234bcc4c79a1ed915d73 (patch) | |
tree | 5d212cfe72142a9e7597c5153209511e7a5568f9 /lib/Target/ARM/ARMConstantIslandPass.cpp | |
parent | f0c3d023ae7ccd940bb595b5ce7ac74656fa47f6 (diff) | |
download | external_llvm-c9a59b5960088f48c3be234bcc4c79a1ed915d73.zip external_llvm-c9a59b5960088f48c3be234bcc4c79a1ed915d73.tar.gz external_llvm-c9a59b5960088f48c3be234bcc4c79a1ed915d73.tar.bz2 |
Improve Thumb-2 jump table support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantIslandPass.cpp')
-rw-r--r-- | lib/Target/ARM/ARMConstantIslandPass.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp index 50badff..19c311c 100644 --- a/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/lib/Target/ARM/ARMConstantIslandPass.cpp @@ -379,6 +379,8 @@ void ARMConstantIslands::InitialFunctionScan(MachineFunction &Fn, switch (Opc) { case ARM::tBR_JTr: case ARM::t2BR_JTr: + case ARM::t2BR_JTm: + case ARM::t2BR_JTadd: // A Thumb table jump may involve padding; for the offsets to // be right, functions containing these must be 4-byte aligned. AFI->setAlign(2U); @@ -766,7 +768,9 @@ void ARMConstantIslands::AdjustBBOffsetsAfter(MachineBasicBlock *BB, // following unconditional branches are removed by AnalyzeBranch. MachineInstr *ThumbJTMI = NULL; if ((prior(MBB->end())->getOpcode() == ARM::tBR_JTr) - || (prior(MBB->end())->getOpcode() == ARM::t2BR_JTr)) + || (prior(MBB->end())->getOpcode() == ARM::t2BR_JTr) + || (prior(MBB->end())->getOpcode() == ARM::t2BR_JTm) + || (prior(MBB->end())->getOpcode() == ARM::t2BR_JTadd)) ThumbJTMI = prior(MBB->end()); if (ThumbJTMI) { unsigned newMIOffset = GetOffsetOf(ThumbJTMI); |