[XCore] Support functions returning more than 4 words.
[oota-llvm.git] / lib / Target / XCore / XCoreMachineFunctionInfo.h
index f1777a87e114171cd318d11c407eb1e0eb218210..2649300b44d5df8469655a105e81942dc2377617 100644 (file)
@@ -33,6 +33,8 @@ class XCoreFunctionInfo : public MachineFunctionInfo {
   int FPSpillSlot;
   bool EHSpillSlotSet;
   int EHSpillSlot[2];
+  unsigned ReturnStackOffset;
+  bool ReturnStackOffsetSet;
   int VarArgsFrameIndex;
   mutable int CachedEStackSize;
   std::vector<std::pair<MCSymbol*, CalleeSavedInfo> > SpillLabels;
@@ -42,6 +44,7 @@ public:
     LRSpillSlotSet(false),
     FPSpillSlotSet(false),
     EHSpillSlotSet(false),
+    ReturnStackOffsetSet(false),
     VarArgsFrameIndex(0),
     CachedEStackSize(-1) {}
   
@@ -78,6 +81,17 @@ public:
     return EHSpillSlot;
   }
 
+  void setReturnStackOffset(unsigned value) {
+    assert(!ReturnStackOffsetSet && "Return stack offset set twice");
+    ReturnStackOffset = value;
+    ReturnStackOffsetSet = true;
+  }
+
+  unsigned getReturnStackOffset() const {
+    assert(ReturnStackOffsetSet && "Return stack offset not set");
+    return ReturnStackOffset;
+  }
+
   bool isLargeFrame(const MachineFunction &MF) const;
 
   std::vector<std::pair<MCSymbol*, CalleeSavedInfo> > &getSpillLabels() {