From e4d093c356c7853f7acfd2228dda2ab7c7b3db00 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Thu, 12 Aug 2004 03:28:47 +0000 Subject: [PATCH] * Print out full names for non-GPR or -FPR registers * BuildMI() really *does* handle 0 params! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15680 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPC64AsmPrinter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Target/PowerPC/PPC64AsmPrinter.cpp b/lib/Target/PowerPC/PPC64AsmPrinter.cpp index 02f316c72b8..515fe3339a1 100644 --- a/lib/Target/PowerPC/PPC64AsmPrinter.cpp +++ b/lib/Target/PowerPC/PPC64AsmPrinter.cpp @@ -451,9 +451,12 @@ void Printer::printOp(const MachineOperand &MO, // FALLTHROUGH case MachineOperand::MO_MachineRegister: case MachineOperand::MO_CCRegister: { - // On AIX, do not print out the 'r' in register names + // On AIX, do not print out the 'R' (GPR) or 'F' (FPR) in reg names const char *regName = RI.get(MO.getReg()).Name; - O << ®Name[1]; + if (regName[0] == 'R' || regName[0] == 'F') + O << ®Name[1]; + else + O << regName; return; } @@ -571,7 +574,6 @@ void Printer::printMachineInstruction(const MachineInstr *MI) { O << TII.getName(Opcode) << " "; if (Opcode == PPC::BLR || Opcode == PPC::NOP) { - // FIXME: BuildMI() should handle 0 params O << "\n"; } else if (ArgCount == 3 && (ArgType[1] == PPCII::Disimm16 || ArgType[1] == PPCII::Disimm14)) { -- 2.34.1