summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-02-24 17:34:50 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-02-24 17:34:50 +0000
commitc68c6df88485b7521133103c848393b8a13842af (patch)
tree3f3bf14143bb7969f42a929b0873f5a6fd46c04f /llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
parent596b40871a22973873da21fecb1f45e32ebbfcdc (diff)
downloadbcm5719-llvm-c68c6df88485b7521133103c848393b8a13842af.tar.gz
bcm5719-llvm-c68c6df88485b7521133103c848393b8a13842af.zip
Fix PR14364.
This removes a const_cast hack from PPCRegisterInfo::hasReservedSpillSlot(). The proper place to save the frame index for the CR spill slot is in the PPCFunctionInfo object, not the PPCRegisterInfo object. No new test cases, as this just reimplements existing function. Existing tests such as test/CodeGen/PowerPC/crsave.ll are sufficient. llvm-svn: 175998
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
index 24caffa3f0f..045b375dd88 100644
--- a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
+++ b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
@@ -71,6 +71,9 @@ class PPCFunctionInfo : public MachineFunctionInfo {
/// register for parameter passing.
unsigned VarArgsNumFPR;
+ /// CRSpillFrameIndex - FrameIndex for CR spill slot for 32-bit SVR4.
+ int CRSpillFrameIndex;
+
public:
explicit PPCFunctionInfo(MachineFunction &MF)
: FramePointerSaveIndex(0),
@@ -83,7 +86,8 @@ public:
VarArgsFrameIndex(0),
VarArgsStackOffset(0),
VarArgsNumGPR(0),
- VarArgsNumFPR(0) {}
+ VarArgsNumFPR(0),
+ CRSpillFrameIndex(0) {}
int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
@@ -125,6 +129,9 @@ public:
unsigned getVarArgsNumFPR() const { return VarArgsNumFPR; }
void setVarArgsNumFPR(unsigned Num) { VarArgsNumFPR = Num; }
+
+ int getCRSpillFrameIndex() const { return CRSpillFrameIndex; }
+ void setCRSpillFrameIndex(int idx) { CRSpillFrameIndex = idx; }
};
} // end of namespace llvm
OpenPOWER on IntegriCloud