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