aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-08-07 05:45:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-08-07 05:45:07 +0000
commit53c67c0218d8420234dd71bf2d9df3388909af77 (patch)
tree96f8c630c42616e0745976a2f9d1917e3f5fcc3c /lib/Target
parent85019e15eb88c16da801337df74920404b2bea98 (diff)
downloadexternal_llvm-53c67c0218d8420234dd71bf2d9df3388909af77.zip
external_llvm-53c67c0218d8420234dd71bf2d9df3388909af77.tar.gz
external_llvm-53c67c0218d8420234dd71bf2d9df3388909af77.tar.bz2
tBfar is bl, which clobbers LR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp3
-rw-r--r--lib/Target/ARM/ARMInstrThumb.td1
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index 782765a..2f74133 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -1221,7 +1221,8 @@ bool
ARMConstantIslands::FixUpUnconditionalBr(MachineFunction &MF, ImmBranch &Br) {
MachineInstr *MI = Br.MI;
MachineBasicBlock *MBB = MI->getParent();
- assert(isThumb && !isThumb2 && "Expected a Thumb1 function!");
+ if (!isThumb1)
+ llvm_unreachable("FixUpUnconditionalBr is Thumb1 only!");
// Use BL to implement far jump.
Br.MaxDisp = (1 << 21) * 2;
diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td
index 9b54e67..c95b1d6 100644
--- a/lib/Target/ARM/ARMInstrThumb.td
+++ b/lib/Target/ARM/ARMInstrThumb.td
@@ -253,6 +253,7 @@ let isBranch = 1, isTerminator = 1 in {
"b $target", [(br bb:$target)]>;
// Far jump
+ let Defs = [LR] in
def tBfar : TIx2<(outs), (ins brtarget:$target), IIC_Br,
"bl $target\t@ far jump",[]>;