1 //==- SystemZMachineFuctionInfo.h - SystemZ machine function info -*- C++ -*-=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef SYSTEMZMACHINEFUNCTIONINFO_H
11 #define SYSTEMZMACHINEFUNCTIONINFO_H
13 #include "llvm/CodeGen/MachineFunction.h"
17 class SystemZMachineFunctionInfo : public MachineFunctionInfo {
19 unsigned HighSavedGPR;
20 unsigned VarArgsFirstGPR;
21 unsigned VarArgsFirstFPR;
22 unsigned VarArgsFrameIndex;
23 unsigned RegSaveFrameIndex;
27 explicit SystemZMachineFunctionInfo(MachineFunction &MF)
28 : LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0),
29 VarArgsFrameIndex(0), RegSaveFrameIndex(0), ManipulatesSP(false) {}
31 // Get and set the first call-saved GPR that should be saved and restored
32 // by this function. This is 0 if no GPRs need to be saved or restored.
33 unsigned getLowSavedGPR() const { return LowSavedGPR; }
34 void setLowSavedGPR(unsigned Reg) { LowSavedGPR = Reg; }
36 // Get and set the last call-saved GPR that should be saved and restored
38 unsigned getHighSavedGPR() const { return HighSavedGPR; }
39 void setHighSavedGPR(unsigned Reg) { HighSavedGPR = Reg; }
41 // Get and set the number of fixed (as opposed to variable) arguments
42 // that are passed in GPRs to this function.
43 unsigned getVarArgsFirstGPR() const { return VarArgsFirstGPR; }
44 void setVarArgsFirstGPR(unsigned GPR) { VarArgsFirstGPR = GPR; }
47 unsigned getVarArgsFirstFPR() const { return VarArgsFirstFPR; }
48 void setVarArgsFirstFPR(unsigned FPR) { VarArgsFirstFPR = FPR; }
50 // Get and set the frame index of the first stack vararg.
51 unsigned getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
52 void setVarArgsFrameIndex(unsigned FI) { VarArgsFrameIndex = FI; }
54 // Get and set the frame index of the register save area
55 // (i.e. the incoming stack pointer).
56 unsigned getRegSaveFrameIndex() const { return RegSaveFrameIndex; }
57 void setRegSaveFrameIndex(unsigned FI) { RegSaveFrameIndex = FI; }
59 // Get and set whether the function directly manipulates the stack pointer,
60 // e.g. through STACKSAVE or STACKRESTORE.
61 bool getManipulatesSP() const { return ManipulatesSP; }
62 void setManipulatesSP(bool MSP) { ManipulatesSP = MSP; }
65 } // end llvm namespace