Home | History | Annotate | Download | only in InstPrinter

Lines Matching refs:MI

30 static bool isReg(const MCInst &MI, unsigned OpNo) {
31 assert(MI.getOperand(OpNo).isReg() && "Register operand expected.");
32 return MI.getOperand(OpNo).getReg() == R;
77 void MipsInstPrinter::printInst(const MCInst *MI, raw_ostream &O,
79 switch (MI->getOpcode()) {
89 if (!printAliasInstr(MI, O) && !printAlias(*MI, O))
90 printInstruction(MI, O);
93 switch (MI->getOpcode()) {
161 void MipsInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
163 const MCOperand &Op = MI->getOperand(OpNo);
178 void MipsInstPrinter::printUnsignedImm(const MCInst *MI, int opNum,
180 const MCOperand &MO = MI->getOperand(opNum);
184 printOperand(MI, opNum, O);
188 printMemOperand(const MCInst *MI, int opNum, raw_ostream &O) {
192 printOperand(MI, opNum+1, O);
194 printOperand(MI, opNum, O);
199 printMemOperandEA(const MCInst *MI, int opNum, raw_ostream &O) {
202 printOperand(MI, opNum, O);
204 printOperand(MI, opNum+1, O);
209 printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) {
210 const MCOperand& MO = MI->getOperand(opNum);
214 bool MipsInstPrinter::printAlias(const char *Str, const MCInst &MI,
217 printOperand(&MI, OpNo, OS);
221 bool MipsInstPrinter::printAlias(const char *Str, const MCInst &MI,
224 printAlias(Str, MI, OpNo0, OS);
226 printOperand(&MI, OpNo1, OS);
230 bool MipsInstPrinter::printAlias(const MCInst &MI, raw_ostream &OS) {
231 switch (MI.getOpcode()) {
234 return isReg<Mips::ZERO>(MI, 1) && printAlias("beqz", MI, 0, 2, OS);
237 return isReg<Mips::ZERO_64>(MI, 1) && printAlias("beqz", MI, 0, 2, OS);
240 return isReg<Mips::ZERO>(MI, 1) && printAlias("bnez", MI, 0, 2, OS);
243 return isReg<Mips::ZERO_64>(MI, 1) && printAlias("bnez", MI, 0, 2, OS);
246 return isReg<Mips::ZERO>(MI, 0) && printAlias("bal", MI, 1, OS);
249 return isReg<Mips::FCC0>(MI, 0) && printAlias("bc1t", MI, 1, OS);
252 return isReg<Mips::FCC0>(MI, 0) && printAlias("bc1f", MI, 1, OS);
255 return isReg<Mips::RA>(MI, 0) && printAlias("jalr", MI, 1, OS);
258 return isReg<Mips::RA_64>(MI, 0) && printAlias("jalr", MI, 1, OS);
261 return isReg<Mips::ZERO>(MI, 2) && printAlias("not", MI, 0, 1, OS);
264 return isReg<Mips::ZERO_64>(MI, 2) && printAlias("not", MI, 0, 1, OS);
267 return isReg<Mips::ZERO>(MI, 2) && printAlias("move", MI, 0, 1, OS);