Fixed some bugs.
[llvm/zpu.git] / lib / Target / MSP430 / MSP430MachineFunctionInfo.h
blob383fd2e9821c44d7b9395d9f2f24409cb2ea1693
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.
12 //===----------------------------------------------------------------------===//
14 #ifndef MSP430MACHINEFUNCTIONINFO_H
15 #define MSP430MACHINEFUNCTIONINFO_H
17 #include "llvm/CodeGen/MachineFunction.h"
19 namespace llvm {
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 /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
25 /// stack frame in bytes.
26 unsigned CalleeSavedFrameSize;
28 /// ReturnAddrIndex - FrameIndex for return slot.
29 int ReturnAddrIndex;
31 public:
32 MSP430MachineFunctionInfo() : CalleeSavedFrameSize(0) {}
34 explicit MSP430MachineFunctionInfo(MachineFunction &MF)
35 : CalleeSavedFrameSize(0), ReturnAddrIndex(0) {}
37 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
38 void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
40 int getRAIndex() const { return ReturnAddrIndex; }
41 void setRAIndex(int Index) { ReturnAddrIndex = Index; }
44 } // End llvm namespace
46 #endif