X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FXCore%2FXCoreMachineFunctionInfo.h;h=cdcc52fdc32d0b6ddbe4d5751cb37cc6a8b35173;hb=43a77da0e63b5828fd603ee2a7658a17301c11a5;hp=6419c2fd65e1f4346ec3f6989608f9ecc1fa99e4;hpb=7d2dd96694fc1fd29120a01a7f180445c7aabede;p=oota-llvm.git diff --git a/lib/Target/XCore/XCoreMachineFunctionInfo.h b/lib/Target/XCore/XCoreMachineFunctionInfo.h index 6419c2fd65e..cdcc52fdc32 100644 --- a/lib/Target/XCore/XCoreMachineFunctionInfo.h +++ b/lib/Target/XCore/XCoreMachineFunctionInfo.h @@ -1,4 +1,4 @@ -//===-- XCoreMachineFuctionInfo.h - XCore machine function info -*- C++ -*-===// +//===- XCoreMachineFunctionInfo.h - XCore machine function info -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef XCOREMACHINEFUNCTIONINFO_H -#define XCOREMACHINEFUNCTIONINFO_H +#ifndef LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H +#define LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" @@ -31,24 +31,29 @@ class XCoreFunctionInfo : public MachineFunctionInfo { int LRSpillSlot; bool FPSpillSlotSet; int FPSpillSlot; + bool EHSpillSlotSet; + int EHSpillSlot[2]; + unsigned ReturnStackOffset; + bool ReturnStackOffsetSet; int VarArgsFrameIndex; mutable int CachedEStackSize; - std::vector > SpillLabels; + std::vector> + SpillLabels; public: XCoreFunctionInfo() : LRSpillSlotSet(false), - LRSpillSlot(0), FPSpillSlotSet(false), - FPSpillSlot(0), + EHSpillSlotSet(false), + ReturnStackOffsetSet(false), VarArgsFrameIndex(0), CachedEStackSize(-1) {} explicit XCoreFunctionInfo(MachineFunction &MF) : LRSpillSlotSet(false), - LRSpillSlot(0), FPSpillSlotSet(false), - FPSpillSlot(0), + EHSpillSlotSet(false), + ReturnStackOffsetSet(false), VarArgsFrameIndex(0), CachedEStackSize(-1) {} @@ -60,23 +65,42 @@ public: int createLRSpillSlot(MachineFunction &MF); bool hasLRSpillSlot() { return LRSpillSlotSet; } int getLRSpillSlot() const { - assert(LRSpillSlotSet && "LR Spill slot no set"); + assert(LRSpillSlotSet && "LR Spill slot not set"); return LRSpillSlot; } int createFPSpillSlot(MachineFunction &MF); bool hasFPSpillSlot() { return FPSpillSlotSet; } int getFPSpillSlot() const { - assert(FPSpillSlotSet && "FP Spill slot no set"); + assert(FPSpillSlotSet && "FP Spill slot not set"); return FPSpillSlot; } + const int* createEHSpillSlot(MachineFunction &MF); + bool hasEHSpillSlot() { return EHSpillSlotSet; } + const int* getEHSpillSlot() const { + assert(EHSpillSlotSet && "EH Spill slot not set"); + 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 > &getSpillLabels() { + std::vector> & + getSpillLabels() { return SpillLabels; } }; } // End llvm namespace -#endif // XCOREMACHINEFUNCTIONINFO_H +#endif