LLVM API Documentation
00001 //===- MSP430MachineFuctionInfo.h - MSP430 machine function info -*- C++ -*-==// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file declares MSP430-specific per-machine-function information. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H 00015 #define LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H 00016 00017 #include "llvm/CodeGen/MachineFunction.h" 00018 00019 namespace llvm { 00020 00021 /// MSP430MachineFunctionInfo - This class is derived from MachineFunction and 00022 /// contains private MSP430 target-specific information for each MachineFunction. 00023 class MSP430MachineFunctionInfo : public MachineFunctionInfo { 00024 virtual void anchor(); 00025 00026 /// CalleeSavedFrameSize - Size of the callee-saved register portion of the 00027 /// stack frame in bytes. 00028 unsigned CalleeSavedFrameSize; 00029 00030 /// ReturnAddrIndex - FrameIndex for return slot. 00031 int ReturnAddrIndex; 00032 00033 /// VarArgsFrameIndex - FrameIndex for start of varargs area. 00034 int VarArgsFrameIndex; 00035 00036 public: 00037 MSP430MachineFunctionInfo() : CalleeSavedFrameSize(0) {} 00038 00039 explicit MSP430MachineFunctionInfo(MachineFunction &MF) 00040 : CalleeSavedFrameSize(0), ReturnAddrIndex(0) {} 00041 00042 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; } 00043 void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; } 00044 00045 int getRAIndex() const { return ReturnAddrIndex; } 00046 void setRAIndex(int Index) { ReturnAddrIndex = Index; } 00047 00048 int getVarArgsFrameIndex() const { return VarArgsFrameIndex;} 00049 void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; } 00050 }; 00051 00052 } // End llvm namespace 00053 00054 #endif