[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Fri Nov 17 17:24:10 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCAsmPrinter.cpp updated: 1.209 -> 1.210
---
Log message:
Pretty print 'rldicr r2, r2, 2, 61' as 'sldi r2, r2, 2'.
---
Diffs of the changes: (+12 -0)
PPCAsmPrinter.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.209 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.210
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.209 Fri Nov 17 16:10:59 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri Nov 17 19:23:56 2006
@@ -438,6 +438,18 @@
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))
More information about the llvm-commits
mailing list