Pretty print 'rldicr r2, r2, 2, 61' as 'sldi r2, r2, 2'.

llvm-svn: 31838
This commit is contained in:
Chris Lattner 2006-11-18 01:23:56 +00:00
parent 542dfd5510
commit 9ca15c8914
1 changed files with 12 additions and 0 deletions

View File

@ -438,6 +438,18 @@ void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
O << "\n";
return;
}
} else if (MI->getOpcode() == PPC::RLDICR) {
unsigned char SH = MI->getOperand(2).getImmedValue();
unsigned char ME = MI->getOperand(3).getImmedValue();
// rldicr RA, RS, SH, 63-SH == sldi RA, RS, SH
if (63-SH == ME) {
O << "sldi ";
printOperand(MI, 0);
O << ", ";
printOperand(MI, 1);
O << ", " << (unsigned int)SH << "\n";
return;
}
}
if (printInstruction(MI))