Lines Matching refs:MIB
349 bool M68kInstrInfo::ExpandMOVX_RR(MachineInstrBuilder &MIB, MVT MVTDst, in ExpandMOVX_RR() argument
352 Register Dst = MIB->getOperand(0).getReg(); in ExpandMOVX_RR()
353 Register Src = MIB->getOperand(1).getReg(); in ExpandMOVX_RR()
369 DebugLoc DL = MIB->getDebugLoc(); in ExpandMOVX_RR()
374 LLVM_DEBUG(dbgs() << "Remove " << *MIB.getInstr() << '\n'); in ExpandMOVX_RR()
375 MIB->eraseFromParent(); in ExpandMOVX_RR()
377 LLVM_DEBUG(dbgs() << "Expand " << *MIB.getInstr() << " to MOV\n"); in ExpandMOVX_RR()
378 MIB->setDesc(get(Move)); in ExpandMOVX_RR()
379 MIB->getOperand(1).setReg(SSrc); in ExpandMOVX_RR()
387 bool M68kInstrInfo::ExpandMOVSZX_RR(MachineInstrBuilder &MIB, bool IsSigned, in ExpandMOVSZX_RR() argument
389 LLVM_DEBUG(dbgs() << "Expand " << *MIB.getInstr() << " to "); in ExpandMOVSZX_RR()
398 Register Dst = MIB->getOperand(0).getReg(); in ExpandMOVSZX_RR()
399 Register Src = MIB->getOperand(1).getReg(); in ExpandMOVSZX_RR()
415 MachineBasicBlock &MBB = *MIB->getParent(); in ExpandMOVSZX_RR()
416 DebugLoc DL = MIB->getDebugLoc(); in ExpandMOVSZX_RR()
420 BuildMI(MBB, MIB.getInstr(), DL, get(Move), Dst).addReg(SSrc); in ExpandMOVSZX_RR()
425 AddSExt(MBB, MIB.getInstr(), DL, Dst, MVTSrc, MVTDst); in ExpandMOVSZX_RR()
428 AddZExt(MBB, MIB.getInstr(), DL, Dst, MVTSrc, MVTDst); in ExpandMOVSZX_RR()
431 MIB->eraseFromParent(); in ExpandMOVSZX_RR()
436 bool M68kInstrInfo::ExpandMOVSZX_RM(MachineInstrBuilder &MIB, bool IsSigned, in ExpandMOVSZX_RM() argument
439 LLVM_DEBUG(dbgs() << "Expand " << *MIB.getInstr() << " to LOAD and "); in ExpandMOVSZX_RM()
441 Register Dst = MIB->getOperand(0).getReg(); in ExpandMOVSZX_RM()
454 MIB->setDesc(Desc); in ExpandMOVSZX_RM()
455 MIB->getOperand(0).setReg(SubDst); in ExpandMOVSZX_RM()
457 MachineBasicBlock::iterator I = MIB.getInstr(); in ExpandMOVSZX_RM()
459 MachineBasicBlock &MBB = *MIB->getParent(); in ExpandMOVSZX_RM()
460 DebugLoc DL = MIB->getDebugLoc(); in ExpandMOVSZX_RM()
473 bool M68kInstrInfo::ExpandPUSH_POP(MachineInstrBuilder &MIB, in ExpandPUSH_POP() argument
475 MachineBasicBlock::iterator I = MIB.getInstr(); in ExpandPUSH_POP()
477 MachineBasicBlock &MBB = *MIB->getParent(); in ExpandPUSH_POP()
478 MachineOperand MO = MIB->getOperand(0); in ExpandPUSH_POP()
479 DebugLoc DL = MIB->getDebugLoc(); in ExpandPUSH_POP()
485 MIB->eraseFromParent(); in ExpandPUSH_POP()
489 bool M68kInstrInfo::ExpandCCR(MachineInstrBuilder &MIB, bool IsToCCR) const { in ExpandCCR() argument
493 MIB->setDesc(get(M68k::MOV16cd)); in ExpandCCR()
496 MIB->setDesc(get(M68k::MOV16dc)); in ExpandCCR()
499 auto &Opd = MIB->getOperand(1); in ExpandCCR()
506 bool M68kInstrInfo::ExpandMOVEM(MachineInstrBuilder &MIB, in ExpandMOVEM() argument
510 auto DL = MIB->getDebugLoc(); in ExpandMOVEM()
511 auto MI = MIB.getInstr(); in ExpandMOVEM()
512 auto &MBB = *MIB->getParent(); in ExpandMOVEM()
515 Reg = MIB->getOperand(0).getReg(); in ExpandMOVEM()
516 Offset = MIB->getOperand(1).getImm(); in ExpandMOVEM()
517 Base = MIB->getOperand(2).getReg(); in ExpandMOVEM()
519 Offset = MIB->getOperand(0).getImm(); in ExpandMOVEM()
520 Base = MIB->getOperand(1).getReg(); in ExpandMOVEM()
521 Reg = MIB->getOperand(2).getReg(); in ExpandMOVEM()
538 .copyImplicitOps(*MIB); in ExpandMOVEM()
545 .copyImplicitOps(*MIB); in ExpandMOVEM()
548 MIB->eraseFromParent(); in ExpandMOVEM()
560 static bool Expand2AddrUndef(MachineInstrBuilder &MIB, in Expand2AddrUndef() argument
563 Register Reg = MIB->getOperand(0).getReg(); in Expand2AddrUndef()
564 MIB->setDesc(Desc); in Expand2AddrUndef()
568 MIB.addReg(Reg, RegState::Undef).addReg(Reg, RegState::Undef); in Expand2AddrUndef()
570 assert(MIB->getOperand(1).getReg() == Reg && in Expand2AddrUndef()
571 MIB->getOperand(2).getReg() == Reg && "Misplaced operand"); in Expand2AddrUndef()
576 MachineInstrBuilder MIB(*MI.getParent()->getParent(), MI); in expandPostRAPseudo() local
579 return ExpandPUSH_POP(MIB, get(M68k::MOV8ed), true); in expandPostRAPseudo()
581 return ExpandPUSH_POP(MIB, get(M68k::MOV16er), true); in expandPostRAPseudo()
583 return ExpandPUSH_POP(MIB, get(M68k::MOV32er), true); in expandPostRAPseudo()
586 return ExpandPUSH_POP(MIB, get(M68k::MOV8do), false); in expandPostRAPseudo()
588 return ExpandPUSH_POP(MIB, get(M68k::MOV16ro), false); in expandPostRAPseudo()
590 return ExpandPUSH_POP(MIB, get(M68k::MOV32ro), false); in expandPostRAPseudo()
593 return Expand2AddrUndef(MIB, get(M68k::SUBX8dd)); in expandPostRAPseudo()
595 return Expand2AddrUndef(MIB, get(M68k::SUBX16dd)); in expandPostRAPseudo()
597 return Expand2AddrUndef(MIB, get(M68k::SUBX32dd)); in expandPostRAPseudo()
653 MachineInstrBuilder MIB(*MBB.getParent(), MI); in copyPhysReg() local