diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
commit | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch) | |
tree | 4adf86a776049cbf7f69a1929c4babcbbef925eb /llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h | |
parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) | |
download | src-706b4fc47bbc608932d3b491ae19a3b9cde9497b.tar.gz src-706b4fc47bbc608932d3b491ae19a3b9cde9497b.zip |
Vendor import of llvm-project master e26a78e70, the last commit beforevendor/llvm-project/llvmorg-10-init-17466-ge26a78e7085
the llvmorg-11-init tag, from which release/10.x was branched.
Notes
Notes:
svn path=/vendor/llvm-project/master/; revision=356843
svn path=/vendor/llvm-project/llvmorg-10-init-17466-ge26a78e7085/; revision=356844; tag=vendor/llvm-project/llvmorg-10-init-17466-ge26a78e7085
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h b/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h index 9eec3f37bc28..d1f6511ceea3 100644 --- a/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h +++ b/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h @@ -13,10 +13,22 @@ namespace llvm { +namespace SystemZ { +// A struct to hold the low and high GPR registers to be saved/restored as +// well as the offset into the register save area of the low register. +struct GPRRegs { + unsigned LowGPR; + unsigned HighGPR; + unsigned GPROffset; + GPRRegs() : LowGPR(0), HighGPR(0), GPROffset(0) {} + }; +} + class SystemZMachineFunctionInfo : public MachineFunctionInfo { virtual void anchor(); - unsigned LowSavedGPR; - unsigned HighSavedGPR; + + SystemZ::GPRRegs SpillGPRRegs; + SystemZ::GPRRegs RestoreGPRRegs; unsigned VarArgsFirstGPR; unsigned VarArgsFirstFPR; unsigned VarArgsFrameIndex; @@ -27,19 +39,29 @@ class SystemZMachineFunctionInfo : public MachineFunctionInfo { public: explicit SystemZMachineFunctionInfo(MachineFunction &MF) - : LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0), - VarArgsFrameIndex(0), RegSaveFrameIndex(0), FramePointerSaveIndex(0), - ManipulatesSP(false), NumLocalDynamics(0) {} - - // Get and set the first call-saved GPR that should be saved and restored - // by this function. This is 0 if no GPRs need to be saved or restored. - unsigned getLowSavedGPR() const { return LowSavedGPR; } - void setLowSavedGPR(unsigned Reg) { LowSavedGPR = Reg; } - - // Get and set the last call-saved GPR that should be saved and restored - // by this function. - unsigned getHighSavedGPR() const { return HighSavedGPR; } - void setHighSavedGPR(unsigned Reg) { HighSavedGPR = Reg; } + : VarArgsFirstGPR(0), VarArgsFirstFPR(0), VarArgsFrameIndex(0), + RegSaveFrameIndex(0), FramePointerSaveIndex(0), ManipulatesSP(false), + NumLocalDynamics(0) {} + + // Get and set the first and last call-saved GPR that should be saved by + // this function and the SP offset for the STMG. These are 0 if no GPRs + // need to be saved or restored. + SystemZ::GPRRegs getSpillGPRRegs() const { return SpillGPRRegs; } + void setSpillGPRRegs(unsigned Low, unsigned High, unsigned Offs) { + SpillGPRRegs.LowGPR = Low; + SpillGPRRegs.HighGPR = High; + SpillGPRRegs.GPROffset = Offs; + } + + // Get and set the first and last call-saved GPR that should be restored by + // this function and the SP offset for the LMG. These are 0 if no GPRs + // need to be saved or restored. + SystemZ::GPRRegs getRestoreGPRRegs() const { return RestoreGPRRegs; } + void setRestoreGPRRegs(unsigned Low, unsigned High, unsigned Offs) { + RestoreGPRRegs.LowGPR = Low; + RestoreGPRRegs.HighGPR = High; + RestoreGPRRegs.GPROffset = Offs; + } // Get and set the number of fixed (as opposed to variable) arguments // that are passed in GPRs to this function. |