Skip to content

Commit

Permalink
Revert r314892
Browse files Browse the repository at this point in the history
It was accidentally merged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_50@314893 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dylanmckay committed Oct 4, 2017
1 parent 3f312d2 commit 9bc59d4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4,159 deletions.
18 changes: 2 additions & 16 deletions lib/Target/AVR/AVRInstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ bool AVRInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
llvm_unreachable("unexpected opcode!");
case AVR::JMPk:
case AVR::CALLk:
return true;
assert(BrOffset >= 0 && "offset must be absolute address");
return isUIntN(16, BrOffset);
case AVR::RCALLk:
case AVR::RJMPk:
return isIntN(13, BrOffset);
Expand All @@ -555,20 +556,5 @@ bool AVRInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
}
}

unsigned AVRInstrInfo::insertIndirectBranch(MachineBasicBlock &MBB,
MachineBasicBlock &NewDestBB,
const DebugLoc &DL,
int64_t BrOffset,
RegScavenger *RS) const {
// This method inserts a *direct* branch (JMP), despite its name.
// LLVM calls this method to fixup unconditional branches; it never calls
// insertBranch or some hypothetical "insertDirectBranch".
// See lib/CodeGen/RegisterRelaxation.cpp for details.
// We end up here when a jump is too long for a RJMP instruction.
auto &MI = *BuildMI(&MBB, DL, get(AVR::JMPk)).addMBB(&NewDestBB);

return getInstSizeInBytes(MI);
}

} // end of namespace llvm

6 changes: 0 additions & 6 deletions lib/Target/AVR/AVRInstrInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ class AVRInstrInfo : public AVRGenInstrInfo {

bool isBranchOffsetInRange(unsigned BranchOpc,
int64_t BrOffset) const override;

unsigned insertIndirectBranch(MachineBasicBlock &MBB,
MachineBasicBlock &NewDestBB,
const DebugLoc &DL,
int64_t BrOffset,
RegScavenger *RS) const override;
private:
const AVRRegisterInfo RI;
};
Expand Down
Loading

0 comments on commit 9bc59d4

Please sign in to comment.