Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 9bc59d4

Browse files
committed
Revert r314892
It was accidentally merged. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_50@314893 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 3f312d2 commit 9bc59d4

File tree

3 files changed

+2
-4159
lines changed

3 files changed

+2
-4159
lines changed

lib/Target/AVR/AVRInstrInfo.cpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ bool AVRInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
537537
llvm_unreachable("unexpected opcode!");
538538
case AVR::JMPk:
539539
case AVR::CALLk:
540-
return true;
540+
assert(BrOffset >= 0 && "offset must be absolute address");
541+
return isUIntN(16, BrOffset);
541542
case AVR::RCALLk:
542543
case AVR::RJMPk:
543544
return isIntN(13, BrOffset);
@@ -555,20 +556,5 @@ bool AVRInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
555556
}
556557
}
557558

558-
unsigned AVRInstrInfo::insertIndirectBranch(MachineBasicBlock &MBB,
559-
MachineBasicBlock &NewDestBB,
560-
const DebugLoc &DL,
561-
int64_t BrOffset,
562-
RegScavenger *RS) const {
563-
// This method inserts a *direct* branch (JMP), despite its name.
564-
// LLVM calls this method to fixup unconditional branches; it never calls
565-
// insertBranch or some hypothetical "insertDirectBranch".
566-
// See lib/CodeGen/RegisterRelaxation.cpp for details.
567-
// We end up here when a jump is too long for a RJMP instruction.
568-
auto &MI = *BuildMI(&MBB, DL, get(AVR::JMPk)).addMBB(&NewDestBB);
569-
570-
return getInstSizeInBytes(MI);
571-
}
572-
573559
} // end of namespace llvm
574560

lib/Target/AVR/AVRInstrInfo.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,6 @@ class AVRInstrInfo : public AVRGenInstrInfo {
107107

108108
bool isBranchOffsetInRange(unsigned BranchOpc,
109109
int64_t BrOffset) const override;
110-
111-
unsigned insertIndirectBranch(MachineBasicBlock &MBB,
112-
MachineBasicBlock &NewDestBB,
113-
const DebugLoc &DL,
114-
int64_t BrOffset,
115-
RegScavenger *RS) const override;
116110
private:
117111
const AVRRegisterInfo RI;
118112
};

0 commit comments

Comments
 (0)