mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 22:43:29 +00:00
implement uncond branch insertion, mark branches with isBranch.
llvm-svn: 31160
This commit is contained in:
parent
34b009bf45
commit
71dc932fcb
@ -48,3 +48,11 @@ bool ARMInstrInfo::isMoveInstr(const MachineInstr &MI,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ARMInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB,
|
||||
MachineBasicBlock *FBB,
|
||||
const std::vector<MachineOperand> &Cond)const{
|
||||
// Can only insert uncond branches so far.
|
||||
assert(Cond.empty() && !FBB && TBB && "Can only handle uncond branches!");
|
||||
BuildMI(&MBB, ARM::b, 1).addMBB(TBB);
|
||||
}
|
@ -40,6 +40,10 @@ public:
|
||||
///
|
||||
virtual bool isMoveInstr(const MachineInstr &MI,
|
||||
unsigned &SrcReg, unsigned &DstReg) const;
|
||||
|
||||
virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
||||
MachineBasicBlock *FBB,
|
||||
const std::vector<MachineOperand> &Cond) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ let Defs = [R0] in {
|
||||
def UMULL : IntBinOp<"umull r12,", mulhu>;
|
||||
}
|
||||
|
||||
let isTerminator = 1 in {
|
||||
let isTerminator = 1, isBranch = 1 in {
|
||||
def bcond : InstARM<(ops brtarget:$dst, CCOp:$cc),
|
||||
"b$cc $dst",
|
||||
[(armbr bb:$dst, imm:$cc)]>;
|
||||
|
Loading…
Reference in New Issue
Block a user