[llvm-commits] CVS: llvm/lib/Target/X86/Printer.cpp X86InstrInfo.h

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 17 17:21:01 PST 2002


Changes in directory llvm/lib/Target/X86:

Printer.cpp updated: 1.5 -> 1.6
X86InstrInfo.h updated: 1.7 -> 1.8

---
Log message:

Arrange to have a TargetMachine available in X86InstrInfo::print


---
Diffs of the changes:

Index: llvm/lib/Target/X86/Printer.cpp
diff -u llvm/lib/Target/X86/Printer.cpp:1.5 llvm/lib/Target/X86/Printer.cpp:1.6
--- llvm/lib/Target/X86/Printer.cpp:1.5	Sun Nov 17 16:53:13 2002
+++ llvm/lib/Target/X86/Printer.cpp	Sun Nov 17 17:20:37 2002
@@ -41,7 +41,7 @@
   MachineFunction & MF = MachineFunction::get (&F);
   const MachineInstrInfo & MII = TM.getInstrInfo ();
 
-  O << "# x86 printing only sorta implemented so far!\n";
+  O << "; x86 printing only sorta implemented so far!\n";
 
   // Print out labels for the function.
   O << "\t.globl\t" << F.getName () << "\n";
@@ -59,7 +59,7 @@
 	{
 	  // Print the assembly for the instruction.
 	  O << "\t";
-          MII.print(*i_i, O);
+          MII.print(*i_i, O, TM);
 	}
     }
 
@@ -69,7 +69,8 @@
 
 
 // print - Print out an x86 instruction in intel syntax
-void X86InstrInfo::print(const MachineInstr *MI, std::ostream &O) const {
+void X86InstrInfo::print(const MachineInstr *MI, std::ostream &O,
+                         const TargetMachine &TM) const {
   // FIXME: This sucks.
   O << getName(MI->getOpCode()) << "\n";
 }


Index: llvm/lib/Target/X86/X86InstrInfo.h
diff -u llvm/lib/Target/X86/X86InstrInfo.h:1.7 llvm/lib/Target/X86/X86InstrInfo.h:1.8
--- llvm/lib/Target/X86/X86InstrInfo.h:1.7	Sun Nov 17 16:53:13 2002
+++ llvm/lib/Target/X86/X86InstrInfo.h	Sun Nov 17 17:20:37 2002
@@ -32,7 +32,8 @@
 
   /// print - Print out an x86 instruction in intel syntax
   ///
-  virtual void print(const MachineInstr *MI, std::ostream &O) const;
+  virtual void print(const MachineInstr *MI, std::ostream &O,
+                     const TargetMachine &TM) const;
 
 
   //===--------------------------------------------------------------------===//





More information about the llvm-commits mailing list