mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
add support for inserting an uncond branch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31003 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32bd5f4f6a
commit
2dc7723474
@ -238,8 +238,14 @@ void PPCInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const {
|
||||
void PPCInstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
||||
MachineBasicBlock *FBB,
|
||||
const std::vector<MachineOperand> &Cond) const {
|
||||
// Fall through?
|
||||
if (TBB == 0 && FBB == 0) return;
|
||||
// Shouldn't be a fall through.
|
||||
assert(TBB && "InsertBranch must not be told to insert a fallthrough");
|
||||
|
||||
// Unconditional branch?
|
||||
if (FBB == 0) {
|
||||
BuildMI(&MBB, PPC::B, 1).addMBB(TBB);
|
||||
return;
|
||||
}
|
||||
|
||||
assert(Cond.size() == 2 && "PPC branch conditions have two components!");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user