SHUFP* are two address code.
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9CodeEmitter.h
index d21345ec041b03ee50b22eaba0e0c216a39c72c1..b5e3e2175455b91a50e71175669cc3db634bf86c 100644 (file)
@@ -1,13 +1,16 @@
 //===-- SparcV9CodeEmitter.h ------------------------------------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
-// 
-// TODO: Need a description here.
+//
+// Target-specific portions of the machine code emitter for the SparcV9.
+// This class interfaces with the JIT's Emitter in order to turn MachineInstrs
+// into words of binary machine code. Its code is partially generated by
+// TableGen's CodeEmitterGenerator.
 //
 //===----------------------------------------------------------------------===//
 
@@ -38,7 +41,9 @@ class SparcV9CodeEmitter : public MachineFunctionPass {
 
 public:
   SparcV9CodeEmitter(TargetMachine &T, MachineCodeEmitter &M);
-  ~SparcV9CodeEmitter();
+  ~SparcV9CodeEmitter() {}
+
+  const char *getPassName() const { return "SparcV9 Machine Code Emitter"; }
 
   /// runOnMachineFunction - emits the given machine function to memory.
   ///
@@ -47,37 +52,31 @@ public:
   /// emitWord - writes out the given 32-bit value to memory at the current PC.
   ///
   void emitWord(unsigned Val);
-    
+
   /// getBinaryCodeForInstr - This function, generated by the
   /// CodeEmitterGenerator using TableGen, produces the binary encoding for
   /// machine instructions.
   ///
   unsigned getBinaryCodeForInstr(MachineInstr &MI);
 
-  /// emitFarCall - produces a code sequence to make a call to a destination
-  /// that does not fit in the 30 bits that a call instruction allows.
-  /// If the function F is non-null, this also saves the return address in
-  /// the LazyResolver map of the JITResolver.
-  void emitFarCall(uint64_t Addr, Function *F = 0);
-
-private:    
-  /// getMachineOpValue - 
+private:
+  /// getMachineOpValue -
   ///
   int64_t getMachineOpValue(MachineInstr &MI, MachineOperand &MO);
 
-  /// emitBasicBlock - 
+  /// emitBasicBlock -
   ///
   void emitBasicBlock(MachineBasicBlock &MBB);
 
-  /// getValueBit - 
+  /// getValueBit -
   ///
   unsigned getValueBit(int64_t Val, unsigned bit);
 
-  /// getGlobalAddress - 
+  /// getGlobalAddress -
   ///
   void* getGlobalAddress(GlobalValue *V, MachineInstr &MI,
                          bool isPCRelative);
-  /// emitFarCall - 
+  /// emitFarCall -
   ///
   unsigned getRealRegNum(unsigned fakeReg, MachineInstr &MI);