Lines Matching full:mib

351 bool M68kInstrInfo::ExpandMOVI(MachineInstrBuilder &MIB, MVT MVTSize) const {  in ExpandMOVI()  argument
352 Register Reg = MIB->getOperand(0).getReg(); in ExpandMOVI()
353 int64_t Imm = MIB->getOperand(1).getImm(); in ExpandMOVI()
363 LLVM_DEBUG(dbgs() << "Expand " << *MIB.getInstr() << " to "); in ExpandMOVI()
373 MIB->setDesc(get(M68k::MOVQ)); in ExpandMOVI()
374 MIB->getOperand(0).setReg(SReg); in ExpandMOVI()
377 MIB->setDesc(get(MVTSize == MVT::i16 ? M68k::MOV16ri : M68k::MOV32ri)); in ExpandMOVI()
383 bool M68kInstrInfo::ExpandMOVX_RR(MachineInstrBuilder &MIB, MVT MVTDst, in ExpandMOVX_RR() argument
386 Register Dst = MIB->getOperand(0).getReg(); in ExpandMOVX_RR()
387 Register Src = MIB->getOperand(1).getReg(); in ExpandMOVX_RR()
404 DebugLoc DL = MIB->getDebugLoc(); in ExpandMOVX_RR()
409 LLVM_DEBUG(dbgs() << "Remove " << *MIB.getInstr() << '\n'); in ExpandMOVX_RR()
410 MIB->eraseFromParent(); in ExpandMOVX_RR()
412 LLVM_DEBUG(dbgs() << "Expand " << *MIB.getInstr() << " to MOV\n"); in ExpandMOVX_RR()
413 MIB->setDesc(get(Move)); in ExpandMOVX_RR()
414 MIB->getOperand(1).setReg(SSrc); in ExpandMOVX_RR()
422 bool M68kInstrInfo::ExpandMOVSZX_RR(MachineInstrBuilder &MIB, bool IsSigned, in ExpandMOVSZX_RR() argument
424 LLVM_DEBUG(dbgs() << "Expand " << *MIB.getInstr() << " to "); in ExpandMOVSZX_RR()
433 Register Dst = MIB->getOperand(0).getReg(); in ExpandMOVSZX_RR()
434 Register Src = MIB->getOperand(1).getReg(); in ExpandMOVSZX_RR()
451 MachineBasicBlock &MBB = *MIB->getParent(); in ExpandMOVSZX_RR()
452 DebugLoc DL = MIB->getDebugLoc(); in ExpandMOVSZX_RR()
456 BuildMI(MBB, MIB.getInstr(), DL, get(Move), Dst).addReg(SSrc); in ExpandMOVSZX_RR()
461 AddSExt(MBB, MIB.getInstr(), DL, Dst, MVTSrc, MVTDst); in ExpandMOVSZX_RR()
464 AddZExt(MBB, MIB.getInstr(), DL, Dst, MVTSrc, MVTDst); in ExpandMOVSZX_RR()
467 MIB->eraseFromParent(); in ExpandMOVSZX_RR()
472 bool M68kInstrInfo::ExpandMOVSZX_RM(MachineInstrBuilder &MIB, bool IsSigned, in ExpandMOVSZX_RM() argument
475 LLVM_DEBUG(dbgs() << "Expand " << *MIB.getInstr() << " to LOAD and "); in ExpandMOVSZX_RM()
477 Register Dst = MIB->getOperand(0).getReg(); in ExpandMOVSZX_RM()
490 MIB->setDesc(Desc); in ExpandMOVSZX_RM()
491 MIB->getOperand(0).setReg(SubDst); in ExpandMOVSZX_RM()
493 MachineBasicBlock::iterator I = MIB.getInstr(); in ExpandMOVSZX_RM()
495 MachineBasicBlock &MBB = *MIB->getParent(); in ExpandMOVSZX_RM()
496 DebugLoc DL = MIB->getDebugLoc(); in ExpandMOVSZX_RM()
509 bool M68kInstrInfo::ExpandPUSH_POP(MachineInstrBuilder &MIB, in ExpandPUSH_POP() argument
511 MachineBasicBlock::iterator I = MIB.getInstr(); in ExpandPUSH_POP()
513 MachineBasicBlock &MBB = *MIB->getParent(); in ExpandPUSH_POP()
514 MachineOperand MO = MIB->getOperand(0); in ExpandPUSH_POP()
515 DebugLoc DL = MIB->getDebugLoc(); in ExpandPUSH_POP()
521 MIB->eraseFromParent(); in ExpandPUSH_POP()
525 bool M68kInstrInfo::ExpandCCR(MachineInstrBuilder &MIB, bool IsToCCR) const { in ExpandCCR() argument
529 MIB->setDesc(get(M68k::MOV16cd)); in ExpandCCR()
532 MIB->setDesc(get(M68k::MOV16dc)); in ExpandCCR()
535 auto &Opd = MIB->getOperand(1); in ExpandCCR()
542 bool M68kInstrInfo::ExpandMOVEM(MachineInstrBuilder &MIB, in ExpandMOVEM() argument
546 auto DL = MIB->getDebugLoc(); in ExpandMOVEM()
547 auto MI = MIB.getInstr(); in ExpandMOVEM()
548 auto &MBB = *MIB->getParent(); in ExpandMOVEM()
551 Reg = MIB->getOperand(0).getReg(); in ExpandMOVEM()
552 Offset = MIB->getOperand(1).getImm(); in ExpandMOVEM()
553 Base = MIB->getOperand(2).getReg(); in ExpandMOVEM()
555 Offset = MIB->getOperand(0).getImm(); in ExpandMOVEM()
556 Base = MIB->getOperand(1).getReg(); in ExpandMOVEM()
557 Reg = MIB->getOperand(2).getReg(); in ExpandMOVEM()
574 .copyImplicitOps(*MIB); in ExpandMOVEM()
581 .copyImplicitOps(*MIB); in ExpandMOVEM()
584 MIB->eraseFromParent(); in ExpandMOVEM()
596 static bool Expand2AddrUndef(MachineInstrBuilder &MIB, in Expand2AddrUndef() argument
599 Register Reg = MIB->getOperand(0).getReg(); in Expand2AddrUndef()
600 MIB->setDesc(Desc); in Expand2AddrUndef()
604 MIB.addReg(Reg, RegState::Undef).addReg(Reg, RegState::Undef); in Expand2AddrUndef()
606 assert(MIB->getOperand(1).getReg() == Reg && in Expand2AddrUndef()
607 MIB->getOperand(2).getReg() == Reg && "Misplaced operand"); in Expand2AddrUndef()
612 MachineInstrBuilder MIB(*MI.getParent()->getParent(), MI); in expandPostRAPseudo() local
615 return ExpandPUSH_POP(MIB, get(M68k::MOV8ed), true); in expandPostRAPseudo()
617 return ExpandPUSH_POP(MIB, get(M68k::MOV16er), true); in expandPostRAPseudo()
619 return ExpandPUSH_POP(MIB, get(M68k::MOV32er), true); in expandPostRAPseudo()
622 return ExpandPUSH_POP(MIB, get(M68k::MOV8do), false); in expandPostRAPseudo()
624 return ExpandPUSH_POP(MIB, get(M68k::MOV16ro), false); in expandPostRAPseudo()
626 return ExpandPUSH_POP(MIB, get(M68k::MOV32ro), false); in expandPostRAPseudo()
629 return Expand2AddrUndef(MIB, get(M68k::SUBX8dd)); in expandPostRAPseudo()
631 return Expand2AddrUndef(MIB, get(M68k::SUBX16dd)); in expandPostRAPseudo()
633 return Expand2AddrUndef(MIB, get(M68k::SUBX32dd)); in expandPostRAPseudo()
689 MachineInstrBuilder MIB(*MBB.getParent(), MI); in copyPhysReg() local