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 | 13d2f4e87ae6b295ce49d6fba72237b351f59de6 (patch) | |
tree | 5d212cfe72142a9e7597c5153209511e7a5568f9 /lib/Target/ARM/ARMCodeEmitter.cpp | |
parent | 6b75fca68f5c58a32eec246ef4729fe6c4948421 (diff) | |
download | external_llvm-13d2f4e87ae6b295ce49d6fba72237b351f59de6.tar.gz external_llvm-13d2f4e87ae6b295ce49d6fba72237b351f59de6.tar.bz2 external_llvm-13d2f4e87ae6b295ce49d6fba72237b351f59de6.zip |
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/ARMCodeEmitter.cpp')
-rw-r--r-- | lib/Target/ARM/ARMCodeEmitter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMCodeEmitter.cpp b/lib/Target/ARM/ARMCodeEmitter.cpp index 8424c2eaed..f29576148b 100644 --- a/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/lib/Target/ARM/ARMCodeEmitter.cpp @@ -1155,16 +1155,17 @@ void Emitter<CodeEmitter>::emitMiscBranchInstruction(const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); // Handle jump tables. - if (TID.Opcode == ARM::BR_JTr || TID.Opcode == ARM::BR_JTadd) { + if (TID.Opcode == ARM::BR_JTr || TID.Opcode == ARM::BR_JTadd || + TID.Opcode == ARM::t2BR_JTr || TID.Opcode == ARM::t2BR_JTadd) { // First emit a ldr pc, [] instruction. emitDataProcessingInstruction(MI, ARM::PC); // Then emit the inline jump table. - unsigned JTIndex = (TID.Opcode == ARM::BR_JTr) + unsigned JTIndex = (TID.Opcode == ARM::BR_JTr || TID.Opcode == ARM::t2BR_JTr) ? MI.getOperand(1).getIndex() : MI.getOperand(2).getIndex(); emitInlineJumpTable(JTIndex); return; - } else if (TID.Opcode == ARM::BR_JTm) { + } else if (TID.Opcode == ARM::BR_JTm || TID.Opcode == ARM::t2BR_JTm) { // First emit a ldr pc, [] instruction. emitLoadStoreInstruction(MI, ARM::PC); |