[llvm-commits] [llvm] r119079 - in /llvm/trunk/lib/Target/PowerPC/InstPrinter: PPCInstPrinter.cpp PPCInstPrinter.h

Chris Lattner sabre at nondot.org
Sun Nov 14 13:33:07 PST 2010


Author: lattner
Date: Sun Nov 14 15:33:07 2010
New Revision: 119079

URL: http://llvm.org/viewvc/llvm-project?rev=119079&view=rev
Log:
Wire up symbol hi/lo printing.  We don't print hi()/lo(), but this gets
us further along.  Only 28 failures now.

Modified:
    llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
    llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h

Modified: llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp?rev=119079&r1=119078&r2=119079&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Sun Nov 14 15:33:07 2010
@@ -202,3 +202,18 @@
   O << *Op.getExpr();
 }
   
+void PPCInstPrinter::printSymbolLo(const MCInst *MI, unsigned OpNo,
+                                   raw_ostream &O) {
+  if (MI->getOperand(OpNo).isImm())
+    printS16ImmOperand(MI, OpNo, O);
+  else
+    printOperand(MI, OpNo, O);
+}
+
+void PPCInstPrinter::printSymbolHi(const MCInst *MI, unsigned OpNo,
+                                   raw_ostream &O) {
+  if (MI->getOperand(OpNo).isImm())
+    printS16ImmOperand(MI, OpNo, O);
+  else
+    printOperand(MI, OpNo, O);
+}

Modified: llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h?rev=119079&r1=119078&r2=119079&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h (original)
+++ llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h Sun Nov 14 15:33:07 2010
@@ -65,10 +65,8 @@
   
   // FIXME: Remove
   void PrintSpecial(const MCInst *MI, raw_ostream &O, const char *Modifier) {}
-  void printSymbolLo(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
-    printS16ImmOperand(MI, OpNo, O);
-  }
-  void printSymbolHi(const MCInst *MI, unsigned OpNo, raw_ostream &O) {}
+  void printSymbolLo(const MCInst *MI, unsigned OpNo, raw_ostream &O);
+  void printSymbolHi(const MCInst *MI, unsigned OpNo, raw_ostream &O);
   void printPICLabel(const MCInst *MI, unsigned OpNo, raw_ostream &O) {}
   void printTOCEntryLabel(const MCInst *MI, unsigned OpNo, raw_ostream &O) {}
   





More information about the llvm-commits mailing list