diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2014-08-18 18:05:55 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2014-08-18 18:05:55 +0000 |
commit | fd559b198f27a09957cab0cf289c17948e7d279b (patch) | |
tree | 315593209924eba40b39eeee997f3cc61ed591cf /contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | |
parent | 0d6be09b564963f82f1296e5fee8c13ffe8685ed (diff) | |
download | FreeBSD-src-fd559b198f27a09957cab0cf289c17948e7d279b.zip FreeBSD-src-fd559b198f27a09957cab0cf289c17948e7d279b.tar.gz |
Backport r197824, r213427 and r213960 from LLVM trunk:
r197824 | rdivacky | 2013-12-20 19:08:54 +0100 (Fri, 20 Dec 2013) | 2 lines
Implement initial-exec TLS for PPC32.
r213427 | hfinkel | 2014-07-19 01:29:49 +0200 (Sat, 19 Jul 2014) | 7 lines
[PowerPC] 32-bit ELF PIC support
This adds initial support for PPC32 ELF PIC (Position Independent Code; the
-fPIC variety), thus rectifying a long-standing deficiency in the PowerPC
backend.
Patch by Justin Hibbits!
r213960 | hfinkel | 2014-07-25 19:47:22 +0200 (Fri, 25 Jul 2014) | 3 lines
[PowerPC] Support TLS on PPC32/ELF
Patch by Justin Hibbits!
Reviewed by: jhibbits
Approved by: dim
Diffstat (limited to 'contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h')
-rw-r--r-- | contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h index 33f843d..9a2cec7 100644 --- a/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h +++ b/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h @@ -92,6 +92,12 @@ class PPCFunctionInfo : public MachineFunctionInfo { /// 64-bit SVR4 ABI. SmallVector<unsigned, 3> MustSaveCRs; + /// Hold onto our MachineFunction context. + MachineFunction &MF; + + /// Whether this uses the PIC Base register or not. + bool UsesPICBase; + public: explicit PPCFunctionInfo(MachineFunction &MF) : FramePointerSaveIndex(0), @@ -109,7 +115,9 @@ public: VarArgsStackOffset(0), VarArgsNumGPR(0), VarArgsNumFPR(0), - CRSpillFrameIndex(0) {} + CRSpillFrameIndex(0), + MF(MF), + UsesPICBase(0) {} int getFramePointerSaveIndex() const { return FramePointerSaveIndex; } void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; } @@ -170,6 +178,11 @@ public: const SmallVectorImpl<unsigned> & getMustSaveCRs() const { return MustSaveCRs; } void addMustSaveCR(unsigned Reg) { MustSaveCRs.push_back(Reg); } + + void setUsesPICBase(bool uses) { UsesPICBase = uses; } + bool usesPICBase() const { return UsesPICBase; } + + MCSymbol *getPICOffsetSymbol() const; }; } // end of namespace llvm |