• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- SparcMachineFunctionInfo.h - Sparc 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  Sparc specific per-machine-function information.
11 //
12 //===----------------------------------------------------------------------===//
13 #ifndef SPARCMACHINEFUNCTIONINFO_H
14 #define SPARCMACHINEFUNCTIONINFO_H
15 
16 #include "llvm/CodeGen/MachineFunction.h"
17 
18 namespace llvm {
19 
20   class SparcMachineFunctionInfo : public MachineFunctionInfo {
21   private:
22     unsigned GlobalBaseReg;
23 
24     /// VarArgsFrameOffset - Frame offset to start of varargs area.
25     int VarArgsFrameOffset;
26 
27     /// SRetReturnReg - Holds the virtual register into which the sret
28     /// argument is passed.
29     unsigned SRetReturnReg;
30   public:
SparcMachineFunctionInfo()31     SparcMachineFunctionInfo()
32       : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0) {}
SparcMachineFunctionInfo(MachineFunction & MF)33     explicit SparcMachineFunctionInfo(MachineFunction &MF)
34       : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0) {}
35 
getGlobalBaseReg()36     unsigned getGlobalBaseReg() const { return GlobalBaseReg; }
setGlobalBaseReg(unsigned Reg)37     void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; }
38 
getVarArgsFrameOffset()39     int getVarArgsFrameOffset() const { return VarArgsFrameOffset; }
setVarArgsFrameOffset(int Offset)40     void setVarArgsFrameOffset(int Offset) { VarArgsFrameOffset = Offset; }
41 
getSRetReturnReg()42     unsigned getSRetReturnReg() const { return SRetReturnReg; }
setSRetReturnReg(unsigned Reg)43     void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
44   };
45 }
46 
47 #endif
48