diff options
| author | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-06-03 09:53:06 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-06-03 09:53:06 +0000 |
| commit | 6ba3dd6b719ec740dd54b324bbab40ff25a21642 (patch) | |
| tree | 37a0953a3558db176da2f05605b9efdcb3a7469f /llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp | |
| parent | 5bc39ab5925f7b6e312f22481c679d93238824b8 (diff) | |
| download | bcm5719-llvm-6ba3dd6b719ec740dd54b324bbab40ff25a21642.tar.gz bcm5719-llvm-6ba3dd6b719ec740dd54b324bbab40ff25a21642.zip | |
[mips] Implement 'la' macro in PIC mode for O32.
Summary:
N32 support will follow in a later patch since the symbol version of 'la'
incorrectly believes N32 to have 64-bit pointers and rejects it early.
This fixes the three incorrectly expanded 'la' macros found in bionic.
Reviewers: sdardis
Subscribers: dsanders, llvm-commits, sdardis
Differential Revision: http://reviews.llvm.org/D20820
llvm-svn: 271644
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp index 5fda05a5b4e..97b24ede0cd 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp @@ -102,6 +102,10 @@ unsigned MipsABIInfo::GetBasePtr() const { return ArePtrs64bit() ? Mips::S7_64 : Mips::S7; } +unsigned MipsABIInfo::GetGlobalPtr() const { + return ArePtrs64bit() ? Mips::GP_64 : Mips::GP; +} + unsigned MipsABIInfo::GetNullPtr() const { return ArePtrs64bit() ? Mips::ZERO_64 : Mips::ZERO; } |

