From 654346e6f9a85a297db50bfa4867b4114e6f7228 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sat, 10 Jan 2015 01:57:21 +0000 Subject: Fully fix Bug #22115. Summary: In the previous commit, the register was saved, but space was not allocated. This resulted in the parameter save area potentially clobbering r30, leading to nasty results. Test Plan: Tests updated Reviewers: hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6906 llvm-svn: 225573 --- llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h') diff --git a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h index 83de799..37b2ff8 100644 --- a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h +++ b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h @@ -35,6 +35,9 @@ class PPCFunctionInfo : public MachineFunctionInfo { /// Frame index where the old base pointer is stored. int BasePointerSaveIndex; + /// Frame index where the old PIC base pointer is stored. + int PICBasePointerSaveIndex; + /// MustSaveLR - Indicates whether LR is defined (or clobbered) in the current /// function. This is only valid after the initial scan of the function by /// PEI. @@ -103,6 +106,7 @@ public: : FramePointerSaveIndex(0), ReturnAddrSaveIndex(0), BasePointerSaveIndex(0), + PICBasePointerSaveIndex(0), HasSpills(false), HasNonRISpills(false), SpillsCR(false), @@ -128,6 +132,9 @@ public: int getBasePointerSaveIndex() const { return BasePointerSaveIndex; } void setBasePointerSaveIndex(int Idx) { BasePointerSaveIndex = Idx; } + int getPICBasePointerSaveIndex() const { return PICBasePointerSaveIndex; } + void setPICBasePointerSaveIndex(int Idx) { PICBasePointerSaveIndex = Idx; } + unsigned getMinReservedArea() const { return MinReservedArea; } void setMinReservedArea(unsigned size) { MinReservedArea = size; } -- cgit v1.1