Lines Matching refs:MI
33 void PPCInstPrinter::printInst(const MCInst *MI, raw_ostream &O) {
35 if (MI->getOpcode() == PPC::RLWINM) {
36 unsigned char SH = MI->getOperand(2).getImm();
37 unsigned char MB = MI->getOperand(3).getImm();
38 unsigned char ME = MI->getOperand(4).getImm();
48 printOperand(MI, 0, O);
50 printOperand(MI, 1, O);
56 if ((MI->getOpcode() == PPC::OR || MI->getOpcode() == PPC::OR8) &&
57 MI->getOperand(1).getReg() == MI->getOperand(2).getReg()) {
59 printOperand(MI, 0, O);
61 printOperand(MI, 1, O);
65 if (MI->getOpcode() == PPC::RLDICR) {
66 unsigned char SH = MI->getOperand(2).getImm();
67 unsigned char ME = MI->getOperand(3).getImm();
71 printOperand(MI, 0, O);
73 printOperand(MI, 1, O);
79 printInstruction(MI, O);
83 void PPCInstPrinter::printPredicateOperand(const MCInst *MI, unsigned OpNo,
87 unsigned Code = MI->getOperand(OpNo).getImm();
107 printOperand(MI, OpNo+1, O);
110 void PPCInstPrinter::printS5ImmOperand(const MCInst *MI, unsigned OpNo,
112 char Value = MI->getOperand(OpNo).getImm();
117 void PPCInstPrinter::printU5ImmOperand(const MCInst *MI, unsigned OpNo,
119 unsigned char Value = MI->getOperand(OpNo).getImm();
124 void PPCInstPrinter::printU6ImmOperand(const MCInst *MI, unsigned OpNo,
126 unsigned char Value = MI->getOperand(OpNo).getImm();
131 void PPCInstPrinter::printS16ImmOperand(const MCInst *MI, unsigned OpNo,
133 O << (short)MI->getOperand(OpNo).getImm();
136 void PPCInstPrinter::printU16ImmOperand(const MCInst *MI, unsigned OpNo,
138 O << (unsigned short)MI->getOperand(OpNo).getImm();
141 void PPCInstPrinter::printS16X4ImmOperand(const MCInst *MI, unsigned OpNo,
143 if (MI->getOperand(OpNo).isImm())
144 O << (short)(MI->getOperand(OpNo).getImm()*4);
146 printOperand(MI, OpNo, O);
149 void PPCInstPrinter::printBranchOperand(const MCInst *MI, unsigned OpNo,
151 if (!MI->getOperand(OpNo).isImm())
152 return printOperand(MI, OpNo, O);
157 printAbsAddrOperand(MI, OpNo, O);
160 void PPCInstPrinter::printAbsAddrOperand(const MCInst *MI, unsigned OpNo,
162 O << (int)MI->getOperand(OpNo).getImm()*4;
166 void PPCInstPrinter::printcrbitm(const MCInst *MI, unsigned OpNo,
168 unsigned CCReg = MI->getOperand(OpNo).getReg();
184 void PPCInstPrinter::printMemRegImm(const MCInst *MI, unsigned OpNo,
186 printSymbolLo(MI, OpNo, O);
188 if (MI->getOperand(OpNo+1).getReg() == PPC::R0)
191 printOperand(MI, OpNo+1, O);
195 void PPCInstPrinter::printMemRegImmShifted(const MCInst *MI, unsigned OpNo,
197 if (MI->getOperand(OpNo).isImm())
198 printS16X4ImmOperand(MI, OpNo, O);
200 printSymbolLo(MI, OpNo, O);
203 if (MI->getOperand(OpNo+1).getReg() == PPC::R0)
206 printOperand(MI, OpNo+1, O);
211 void PPCInstPrinter::printMemRegReg(const MCInst *MI, unsigned OpNo,
216 if (MI->getOperand(OpNo).getReg() == PPC::R0)
219 printOperand(MI, OpNo, O);
221 printOperand(MI, OpNo+1, O);
239 void PPCInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
241 const MCOperand &Op = MI->getOperand(OpNo);
261 void PPCInstPrinter::printSymbolLo(const MCInst *MI, unsigned OpNo,
263 if (MI->getOperand(OpNo).isImm())
264 return printS16ImmOperand(MI, OpNo, O);
268 if (MI->getOperand(OpNo).isExpr() &&
269 isa<MCBinaryExpr>(MI->getOperand(OpNo).getExpr())) {
271 printOperand(MI, OpNo, O);
274 printOperand(MI, OpNo, O);
278 void PPCInstPrinter::printSymbolHi(const MCInst *MI, unsigned OpNo,
280 if (MI->getOperand(OpNo).isImm())
281 return printS16ImmOperand(MI, OpNo, O);
285 if (MI->getOperand(OpNo).isExpr() &&
286 isa<MCBinaryExpr>(MI->getOperand(OpNo).getExpr())) {
288 printOperand(MI, OpNo, O);
291 printOperand(MI, OpNo, O);