diff options
author | Dylan McKay <me@dylanmckay.io> | 2017-10-04 10:06:12 +0000 |
---|---|---|
committer | Dylan McKay <me@dylanmckay.io> | 2017-10-04 10:06:12 +0000 |
commit | 9bc59d4c9b890fa1da21add315b63f3aa278c682 (patch) | |
tree | 5543cf6e2c60bf03edb49fa0e33dded4c75df254 /lib/Target | |
parent | 3f312d2ca3c1f9d3db52d422dea6626f7492b70b (diff) |
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
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/AVR/AVRInstrInfo.cpp | 18 | ||||
-rw-r--r-- | lib/Target/AVR/AVRInstrInfo.h | 6 |
2 files changed, 2 insertions, 22 deletions
diff --git a/lib/Target/AVR/AVRInstrInfo.cpp b/lib/Target/AVR/AVRInstrInfo.cpp index 1a89a13693e1..744aa723c416 100644 --- a/lib/Target/AVR/AVRInstrInfo.cpp +++ b/lib/Target/AVR/AVRInstrInfo.cpp @@ -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); @@ -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 diff --git a/lib/Target/AVR/AVRInstrInfo.h b/lib/Target/AVR/AVRInstrInfo.h index eee8a92c6191..f42d34fb2848 100644 --- a/lib/Target/AVR/AVRInstrInfo.h +++ b/lib/Target/AVR/AVRInstrInfo.h @@ -107,12 +107,6 @@ public: 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; }; |