blob: d1697f478cc290cb44f2b2ba5556da7ee664c923 [file] [log] [blame]
Anton Korobeynikovd5047cb2009-05-03 13:11:04 +00001//===- 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
19namespace llvm {
20
21/// MSP430MachineFunctionInfo - This class is derived from MachineFunction and
22/// contains private MSP430 target-specific information for each MachineFunction.
23class MSP430MachineFunctionInfo : public MachineFunctionInfo {
David Blaikie2d24e2a2011-12-20 02:50:00 +000024 virtual void anchor();
25
Anton Korobeynikovd5047cb2009-05-03 13:11:04 +000026 /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
27 /// stack frame in bytes.
28 unsigned CalleeSavedFrameSize;
29
Anton Korobeynikov06ccca52009-12-07 02:28:10 +000030 /// ReturnAddrIndex - FrameIndex for return slot.
31 int ReturnAddrIndex;
32
Anton Korobeynikov0ae61242012-11-21 17:28:27 +000033 /// VarArgsFrameIndex - FrameIndex for start of varargs area.
34 int VarArgsFrameIndex;
35
Anton Korobeynikovd5047cb2009-05-03 13:11:04 +000036public:
37 MSP430MachineFunctionInfo() : CalleeSavedFrameSize(0) {}
38
Dan Gohman2392efe2009-06-05 23:05:51 +000039 explicit MSP430MachineFunctionInfo(MachineFunction &MF)
Anton Korobeynikov06ccca52009-12-07 02:28:10 +000040 : CalleeSavedFrameSize(0), ReturnAddrIndex(0) {}
Anton Korobeynikovd5047cb2009-05-03 13:11:04 +000041
42 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
43 void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
Anton Korobeynikov06ccca52009-12-07 02:28:10 +000044
45 int getRAIndex() const { return ReturnAddrIndex; }
46 void setRAIndex(int Index) { ReturnAddrIndex = Index; }
Anton Korobeynikov0ae61242012-11-21 17:28:27 +000047
48 int getVarArgsFrameIndex() const { return VarArgsFrameIndex;}
49 void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
Anton Korobeynikovd5047cb2009-05-03 13:11:04 +000050};
51
52} // End llvm namespace
53
54#endif