* 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
This commit is contained in:
Misha Brukman 2004-08-12 03:28:47 +00:00
parent b519efbafe
commit e4d093c356

View File

@ -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 << &regName[1];
if (regName[0] == 'R' || regName[0] == 'F')
O << &regName[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)) {