Fix cmake build, add TargetMachineRegistry.cpp that got restored in r75807
[oota-llvm.git] / lib / Target / PIC16 / PIC16ISelLowering.h
index 03397beab1891a8495c8dba7b24f9e4cdd89daaa..b40ea12c15f6a7849aab9218113c8076cbe5c1e4 100644 (file)
@@ -49,7 +49,7 @@ namespace llvm {
       RRF,           // Rotate right through carry
       CALL,          // PIC16 Call instruction 
       CALLW,         // PIC16 CALLW instruction 
-      SUBCC,        // Compare for equality or inequality.
+      SUBCC,         // Compare for equality or inequality.
       SELECT_ICC,    // Psuedo to be caught in schedular and expanded to brcond.
       BRCOND,        // Conditional branch.
       Dummy
@@ -61,7 +61,7 @@ namespace llvm {
       ROM_SPACE = 1    // ROM address space number is 1
     };
     enum PIC16Libcall {
-      MUL_I8,
+      MUL_I8 = RTLIB::UNKNOWN_LIBCALL + 1,
       SRA_I8,
       SLL_I8,
       SRL_I8,
@@ -139,11 +139,17 @@ namespace llvm {
     // new offset and returns.
     unsigned GetTmpOffsetForFI(unsigned FI, unsigned slot_size); 
     void ResetTmpOffsetMap() { FiTmpOffsetMap.clear(); SetTmpSize(0); }
+    void InitReservedFrameCount(const Function *F); 
 
     // Return the size of Tmp variable 
     unsigned GetTmpSize() { return TmpSize; }
     void SetTmpSize(unsigned Size) { TmpSize = Size; }
 
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
+    virtual unsigned getFunctionAlignment(const Function *) const {
+      // FIXME: The function never seems to be aligned.
+      return 1;
+    }
   private:
     // If the Node is a BUILD_PAIR representing a direct Address,
     // then this function will return true.
@@ -168,6 +174,7 @@ namespace llvm {
     void LegalizeFrameIndex(SDValue Op, SelectionDAG &DAG, SDValue &ES, 
                             int &Offset);
 
+
     // CALL node should have all legal operands only. Legalize all non-legal
     // operands of CALL node and then return the new call will all operands
     // legal.
@@ -214,6 +221,11 @@ namespace llvm {
     // This maps maintain zero based indexes for these FIs.
     std::map<unsigned, unsigned> FiTmpOffsetMap;
     unsigned TmpSize;
+
+    // These are the frames for return value and argument passing 
+    // These FrameIndices will be expanded to foo.frame external symbol
+    // and all others will be expanded to foo.tmp external symbol.
+    unsigned ReservedFrameCount; 
   };
 } // namespace llvm