using namespace llvm;
IA64InstrInfo::IA64InstrInfo()
- : TargetInstrInfo(IA64Insts, sizeof(IA64Insts)/sizeof(IA64Insts[0])) {
+ : TargetInstrInfo(IA64Insts, sizeof(IA64Insts)/sizeof(IA64Insts[0])),
+ RI(*this) {
}
unsigned& destReg) const {
MachineOpCode oc = MI.getOpcode();
if (oc == IA64::MOV || oc == IA64::FMOV) {
- assert(MI.getNumOperands() == 2 &&
+ // TODO: this doesn't detect predicate moves
+ assert(MI.getNumOperands() >= 2 &&
/* MI.getOperand(0).isRegister() &&
MI.getOperand(1).isRegister() && */
"invalid register-register move instruction");
// move instruction
}
+unsigned
+IA64InstrInfo::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, get(IA64::BRL_NOTCALL)).addMBB(TBB);
+ return 1;
+}