1 //===- MSP430MachineFuctionInfo.h - MSP430 machine function info -*- C++ -*-==// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file declares MSP430-specific per-machine-function information. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef MSP430MACHINEFUNCTIONINFO_H 15 #define MSP430MACHINEFUNCTIONINFO_H 16 17 #include "llvm/CodeGen/MachineFunction.h" 18 19 namespace llvm { 20 21 /// MSP430MachineFunctionInfo - This class is derived from MachineFunction and 22 /// contains private MSP430 target-specific information for each MachineFunction. 23 class MSP430MachineFunctionInfo : public MachineFunctionInfo { 24 virtual void anchor(); 25 26 /// CalleeSavedFrameSize - Size of the callee-saved register portion of the 27 /// stack frame in bytes. 28 unsigned CalleeSavedFrameSize; 29 30 /// ReturnAddrIndex - FrameIndex for return slot. 31 int ReturnAddrIndex; 32 33 public: 34 MSP430MachineFunctionInfo() : CalleeSavedFrameSize(0) {} 35 36 explicit MSP430MachineFunctionInfo(MachineFunction &MF) 37 : CalleeSavedFrameSize(0), ReturnAddrIndex(0) {} 38 39 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; } 40 void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; } 41 42 int getRAIndex() const { return ReturnAddrIndex; } 43 void setRAIndex(int Index) { ReturnAddrIndex = Index; } 44 }; 45 46 } // End llvm namespace 47 48 #endif 49