Lines Matching refs:MI
32 static bool isReg(const MCInst &MI, unsigned OpNo) { in isReg() argument
33 assert(MI.getOperand(OpNo).isReg() && "Register operand expected."); in isReg()
34 return MI.getOperand(OpNo).getReg() == R; in isReg()
79 void MipsInstPrinter::printInst(const MCInst *MI, raw_ostream &O, in printInst() argument
81 switch (MI->getOpcode()) { in printInst()
91 printSaveRestore(MI, O); in printInst()
96 printSaveRestore(MI, O); in printInst()
101 printSaveRestore(MI, O); in printInst()
106 printSaveRestore(MI, O); in printInst()
112 if (!printAliasInstr(MI, O) && !printAlias(*MI, O)) in printInst()
113 printInstruction(MI, O); in printInst()
116 switch (MI->getOpcode()) { in printInst()
125 void MipsInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, in printOperand() argument
127 const MCOperand &Op = MI->getOperand(OpNo); in printOperand()
143 void MipsInstPrinter::printUImm(const MCInst *MI, int opNum, raw_ostream &O) { in printUImm() argument
144 const MCOperand &MO = MI->getOperand(opNum); in printUImm()
154 printOperand(MI, opNum, O); in printUImm()
158 printMemOperand(const MCInst *MI, int opNum, raw_ostream &O) { in printMemOperand() argument
165 switch (MI->getOpcode()) { in printMemOperand()
174 opNum = MI->getNumOperands() - 2; in printMemOperand()
178 printOperand(MI, opNum+1, O); in printMemOperand()
180 printOperand(MI, opNum, O); in printMemOperand()
185 printMemOperandEA(const MCInst *MI, int opNum, raw_ostream &O) { in printMemOperandEA() argument
188 printOperand(MI, opNum, O); in printMemOperandEA()
190 printOperand(MI, opNum+1, O); in printMemOperandEA()
195 printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { in printFCCOperand() argument
196 const MCOperand& MO = MI->getOperand(opNum); in printFCCOperand()
201 printRegisterPair(const MCInst *MI, int opNum, raw_ostream &O) { in printRegisterPair() argument
202 printRegName(O, MI->getOperand(opNum).getReg()); in printRegisterPair()
206 printSHFMask(const MCInst *MI, int opNum, raw_ostream &O) { in printSHFMask() argument
210 bool MipsInstPrinter::printAlias(const char *Str, const MCInst &MI, in printAlias() argument
213 printOperand(&MI, OpNo, OS); in printAlias()
217 bool MipsInstPrinter::printAlias(const char *Str, const MCInst &MI, in printAlias() argument
220 printAlias(Str, MI, OpNo0, OS); in printAlias()
222 printOperand(&MI, OpNo1, OS); in printAlias()
226 bool MipsInstPrinter::printAlias(const MCInst &MI, raw_ostream &OS) { in printAlias() argument
227 switch (MI.getOpcode()) { in printAlias()
232 return (isReg<Mips::ZERO>(MI, 0) && isReg<Mips::ZERO>(MI, 1) && in printAlias()
233 printAlias("b", MI, 2, OS)) || in printAlias()
234 (isReg<Mips::ZERO>(MI, 1) && printAlias("beqz", MI, 0, 2, OS)); in printAlias()
237 return isReg<Mips::ZERO_64>(MI, 1) && printAlias("beqz", MI, 0, 2, OS); in printAlias()
240 return isReg<Mips::ZERO>(MI, 1) && printAlias("bnez", MI, 0, 2, OS); in printAlias()
243 return isReg<Mips::ZERO_64>(MI, 1) && printAlias("bnez", MI, 0, 2, OS); in printAlias()
246 return isReg<Mips::ZERO>(MI, 0) && printAlias("bal", MI, 1, OS); in printAlias()
249 return isReg<Mips::FCC0>(MI, 0) && printAlias("bc1t", MI, 1, OS); in printAlias()
252 return isReg<Mips::FCC0>(MI, 0) && printAlias("bc1f", MI, 1, OS); in printAlias()
255 return isReg<Mips::RA>(MI, 0) && printAlias("jalr", MI, 1, OS); in printAlias()
258 return isReg<Mips::RA_64>(MI, 0) && printAlias("jalr", MI, 1, OS); in printAlias()
263 return isReg<Mips::ZERO>(MI, 2) && printAlias("not", MI, 0, 1, OS); in printAlias()
266 return isReg<Mips::ZERO_64>(MI, 2) && printAlias("not", MI, 0, 1, OS); in printAlias()
269 return isReg<Mips::ZERO>(MI, 2) && printAlias("move", MI, 0, 1, OS); in printAlias()
274 void MipsInstPrinter::printSaveRestore(const MCInst *MI, raw_ostream &O) { in printSaveRestore() argument
275 for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { in printSaveRestore()
277 if (MI->getOperand(i).isReg()) in printSaveRestore()
278 printRegName(O, MI->getOperand(i).getReg()); in printSaveRestore()
280 printUImm<16>(MI, i, O); in printSaveRestore()
285 printRegisterList(const MCInst *MI, int opNum, raw_ostream &O) { in printRegisterList() argument
288 for (int i = opNum, e = MI->getNumOperands() - 2; i != e; ++i) { in printRegisterList()
291 printRegName(O, MI->getOperand(i).getReg()); in printRegisterList()