Index: llvm/lib/Target/Mips/MCTargetDesc/MipsInstPrinter.cpp =================================================================== --- llvm/lib/Target/Mips/MCTargetDesc/MipsInstPrinter.cpp +++ llvm/lib/Target/Mips/MCTargetDesc/MipsInstPrinter.cpp @@ -73,8 +73,8 @@ } void MipsInstPrinter::printRegName(raw_ostream &OS, MCRegister Reg) const { - OS << markup(""); + markup(OS, Markup::Register) + << '$' << StringRef(getRegisterName(Reg)).lower(); } void MipsInstPrinter::printInst(const MCInst *MI, uint64_t Address, @@ -134,7 +134,7 @@ } if (Op.isImm()) { - O << markup(""); + markup(O, Markup::Immediate) << formatImm(Op.getImm()); return; } @@ -150,9 +150,9 @@ return printOperand(MI, OpNo, STI, O); if (PrintBranchImmAsAddress) - O << markup(""); + markup(O, Markup::Immediate) << formatHex(Op.getImm()); else - O << markup(""); + markup(O, Markup::Immediate) << formatImm(Op.getImm()); } void MipsInstPrinter::printBranchOperand(const MCInst *MI, uint64_t Address, @@ -169,9 +169,9 @@ Target &= 0xffffffff; else if (STI.hasFeature(Mips::FeatureMips16)) Target &= 0xffff; - O << markup(""); + markup(O, Markup::Immediate) << formatHex(Target); } else { - O << markup(""); + markup(O, Markup::Immediate) << formatImm(Op.getImm()); } } @@ -184,7 +184,7 @@ Imm -= Offset; Imm &= (1 << Bits) - 1; Imm += Offset; - O << markup(""); + markup(O, Markup::Immediate) << formatImm(Imm); return; } @@ -213,12 +213,11 @@ break; } - O << markup(""); } void MipsInstPrinter::printMemOperandEA(const MCInst *MI, int opNum,