tBfar is bl, which clobbers LR.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 7 Aug 2009 05:45:07 +0000 (05:45 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 7 Aug 2009 05:45:07 +0000 (05:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78370 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMConstantIslandPass.cpp
lib/Target/ARM/ARMInstrThumb.td

index 782765a4335185cbda55a845eedd6386caff51e2..2f74133a66ba4a6618156210ee43335f1ed0419e 100644 (file)
@@ -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;
index 9b54e67bedf6909f09e62bae9094de73fa7c7206..c95b1d60fc56816a19d87f319432d4d6a6048575 100644 (file)
@@ -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",[]>;