All store instructions really want 'rd' in the first field.
[oota-llvm.git] / lib / Target / X86 / X86TargetMachine.h
index 863eb604f5331b7c24414b7a43689aca9b6aa8b0..35a3b6a42853559fabf9d3336b5de2bc81902ff1 100644 (file)
@@ -8,25 +8,40 @@
 #define X86TARGETMACHINE_H
 
 #include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetFrameInfo.h"
 #include "X86InstrInfo.h"
 
 class X86TargetMachine : public TargetMachine {
-  X86InstrInfo instrInfo;
+  X86InstrInfo InstrInfo;
+  TargetFrameInfo FrameInfo;
 public:
-  X86TargetMachine();
+  X86TargetMachine(unsigned Configuration);
 
-  virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; }
-  virtual const MachineSchedInfo &getSchedInfo() const { abort(); }
-  virtual const MachineRegInfo   &getRegInfo()   const { abort(); }
-  virtual const MachineFrameInfo &getFrameInfo() const { abort(); }
-  virtual const MachineCacheInfo &getCacheInfo() const { abort(); }
-  virtual const MachineOptInfo   &getOptInfo()   const { abort(); }
+  virtual const X86InstrInfo     &getInstrInfo() const { return InstrInfo; }
+  virtual const TargetFrameInfo  &getFrameInfo() const { return FrameInfo; }
+  virtual const MRegisterInfo *getRegisterInfo() const {
+    return &InstrInfo.getRegisterInfo();
+  }
+
+  virtual const TargetSchedInfo &getSchedInfo()  const { abort(); }
+  virtual const TargetRegInfo   &getRegInfo()    const { abort(); }
+  virtual const TargetCacheInfo  &getCacheInfo() const { abort(); }
+  virtual const TargetOptInfo    &getOptInfo()   const { abort(); }
 
   /// addPassesToJITCompile - Add passes to the specified pass manager to
   /// implement a fast dynamic compiler for this target.  Return true if this is
   /// not supported for this target.
   ///
   virtual bool addPassesToJITCompile(PassManager &PM);
+
+  /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
+  /// get machine code emitted.  This uses a MAchineCodeEmitter object to handle
+  /// actually outputting the machine code and resolving things like the address
+  /// of functions.  This method should returns true if machine code emission is
+  /// not supported.
+  ///
+  virtual bool addPassesToEmitMachineCode(PassManager &PM,
+                                          MachineCodeEmitter &MCE);
 };
 
 #endif