Arrange to have a TargetMachine available in X86InstrInfo::print
authorChris Lattner <sabre@nondot.org>
Sun, 17 Nov 2002 23:20:37 +0000 (23:20 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Nov 2002 23:20:37 +0000 (23:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4734 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/Printer.cpp
lib/Target/X86/X86AsmPrinter.cpp
lib/Target/X86/X86InstrInfo.h

index f4c9833af555a2abd577d21f3e5d1b4ca30de039..f64c60377ca5bad18cd8d2d101ed20b4be773321 100644 (file)
@@ -41,7 +41,7 @@ bool Printer::runOnFunction (Function & F)
   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 @@ bool Printer::runOnFunction (Function & F)
        {
          // Print the assembly for the instruction.
          O << "\t";
-          MII.print(*i_i, O);
+          MII.print(*i_i, O, TM);
        }
     }
 
@@ -69,7 +69,8 @@ bool Printer::runOnFunction (Function & F)
 
 
 // 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 f4c9833af555a2abd577d21f3e5d1b4ca30de039..f64c60377ca5bad18cd8d2d101ed20b4be773321 100644 (file)
@@ -41,7 +41,7 @@ bool Printer::runOnFunction (Function & F)
   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 @@ bool Printer::runOnFunction (Function & F)
        {
          // Print the assembly for the instruction.
          O << "\t";
-          MII.print(*i_i, O);
+          MII.print(*i_i, O, TM);
        }
     }
 
@@ -69,7 +69,8 @@ bool Printer::runOnFunction (Function & F)
 
 
 // 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 c0451643a57b8aa4353357209550ed8fbde8d5ae..b31278a6a35f9a846d8f8c357ef9c85d97edb81e 100644 (file)
@@ -32,7 +32,8 @@ public:
 
   /// 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;
 
 
   //===--------------------------------------------------------------------===//