[llvm-commits] [llvm] r78370 - in /llvm/trunk/lib/Target/ARM: ARMConstantIslandPass.cpp ARMInstrThumb.td
Evan Cheng
evan.cheng at apple.com
Thu Aug 6 22:45:07 PDT 2009
Author: evancheng
Date: Fri Aug 7 00:45:07 2009
New Revision: 78370
URL: http://llvm.org/viewvc/llvm-project?rev=78370&view=rev
Log:
tBfar is bl, which clobbers LR.
Modified:
llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=78370&r1=78369&r2=78370&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Fri Aug 7 00:45:07 2009
@@ -1221,7 +1221,8 @@
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;
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=78370&r1=78369&r2=78370&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Fri Aug 7 00:45:07 2009
@@ -253,6 +253,7 @@
"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",[]>;
More information about the llvm-commits
mailing list