Lines Matching defs:OS

31 void LanaiInstPrinter::printRegName(raw_ostream &OS, MCRegister Reg) {
32 OS << StringRef(getRegisterName(Reg)).lower();
35 bool LanaiInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
38 OS << "\t" << Alias << " ";
39 printOperand(MI, OpNo0, OS);
40 OS << ", ";
41 printOperand(MI, OpNo1, OS);
69 raw_ostream &OS,
73 OS << "\t" << Opcode << "\t[" << decIncOperator(MI) << "%"
79 OS << "\t" << Opcode << "\t[%"
88 raw_ostream &OS,
92 OS << "\t" << Opcode << "\t%" << getRegisterName(MI->getOperand(0).getReg())
98 OS << "\t" << Opcode << "\t%" << getRegisterName(MI->getOperand(0).getReg())
106 bool LanaiInstPrinter::printAlias(const MCInst *MI, raw_ostream &OS) {
113 return printMemoryLoadIncrement(MI, OS, "ld", 4);
115 return printMemoryLoadIncrement(MI, OS, "ld.h", 2);
117 return printMemoryLoadIncrement(MI, OS, "uld.h", 2);
119 return printMemoryLoadIncrement(MI, OS, "ld.b", 1);
121 return printMemoryLoadIncrement(MI, OS, "uld.b", 1);
127 return printMemoryStoreIncrement(MI, OS, "st", 4);
129 return printMemoryStoreIncrement(MI, OS, "st.h", 2);
131 return printMemoryStoreIncrement(MI, OS, "st.b", 1);
140 raw_ostream &OS) {
141 if (!printAlias(MI, OS) && !printAliasInstr(MI, Address, OS))
142 printInstruction(MI, Address, OS);
143 printAnnotation(OS, Annotation);
147 raw_ostream &OS, const char *Modifier) {
151 OS << "%" << getRegisterName(Op.getReg());
153 OS << formatHex(Op.getImm());
156 Op.getExpr()->print(OS, &MAI);
161 raw_ostream &OS) {
164 OS << '[' << formatHex(Op.getImm()) << ']';
168 OS << '[';
169 Op.getExpr()->print(OS, &MAI);
170 OS << ']';
175 raw_ostream &OS) {
178 OS << formatHex(Op.getImm() << 16);
182 Op.getExpr()->print(OS, &MAI);
187 raw_ostream &OS) {
190 OS << formatHex((Op.getImm() << 16) | 0xffff);
194 Op.getExpr()->print(OS, &MAI);
199 raw_ostream &OS) {
202 OS << formatHex(0xffff0000 | Op.getImm());
206 Op.getExpr()->print(OS, &MAI);
210 static void printMemoryBaseRegister(raw_ostream &OS, const unsigned AluCode,
213 OS << "[";
215 OS << "*";
216 OS << "%" << LanaiInstPrinter::getRegisterName(RegOp.getReg());
218 OS << "*";
219 OS << "]";
225 raw_ostream &OS) {
229 OS << OffsetOp.getImm();
231 OffsetOp.getExpr()->print(OS, &MAI);
235 raw_ostream &OS,
243 printMemoryImmediateOffset<16>(MAI, OffsetOp, OS);
246 printMemoryBaseRegister(OS, AluCode, RegOp);
250 raw_ostream &OS,
259 OS << "[";
261 OS << "*";
262 OS << "%" << getRegisterName(RegOp.getReg());
264 OS << "*";
265 OS << " " << LPAC::lanaiAluCodeToString(AluCode) << " ";
266 OS << "%" << getRegisterName(OffsetOp.getReg());
267 OS << "]";
271 raw_ostream &OS,
279 printMemoryImmediateOffset<10>(MAI, OffsetOp, OS);
282 printMemoryBaseRegister(OS, AluCode, RegOp);
286 raw_ostream &OS) {
291 OS << "<und>";
293 OS << lanaiCondCodeToString(CC);
297 raw_ostream &OS) {
302 OS << "<und>";
304 OS << "." << lanaiCondCodeToString(CC);