diff options
author | Sean Fertile <sfertile@ca.ibm.com> | 2019-08-22 15:11:28 +0000 |
---|---|---|
committer | Sean Fertile <sfertile@ca.ibm.com> | 2019-08-22 15:11:28 +0000 |
commit | 5f85a7b1cfe900e9ade741fec770397c5a7bded6 (patch) | |
tree | 335fc0e3f8cff9ddef6ecf28132b3c0f1892c0f3 /llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp | |
parent | 18fd1b0b494a196f84bfa93dec6f421c9a4da22e (diff) | |
download | bcm5719-llvm-5f85a7b1cfe900e9ade741fec770397c5a7bded6.tar.gz bcm5719-llvm-5f85a7b1cfe900e9ade741fec770397c5a7bded6.zip |
[PowerPC] Add combined ELF ABI and 32/64 bit queries to the subtarget. [NFC]
A lot of places in the code combine checks for both ABI (SVR4/Darwin/AIX) and
addressing mode (64-bit vs 32-bit). In an attempt to make some of the code more
readable I've added a couple functions that combine checking for the ELF abi and
64-bit/32-bit code at once. As we add more AIX support I intend to add similar
functions for the AIX ABI.
Differential Revision: https://reviews.llvm.org/D65814
llvm-svn: 369658
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp index f9a9ee08aeb..64a826d774c 100644 --- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -325,13 +325,13 @@ BitVector PPCRegisterInfo::getReservedRegs(const MachineFunction &MF) const { bool IsPositionIndependent = TM.isPositionIndependent(); if (hasBasePointer(MF)) { - if (Subtarget.isSVR4ABI() && !TM.isPPC64() && IsPositionIndependent) + if (Subtarget.is32BitELFABI() && IsPositionIndependent) markSuperRegs(Reserved, PPC::R29); else markSuperRegs(Reserved, PPC::R30); } - if (Subtarget.isSVR4ABI() && !TM.isPPC64() && IsPositionIndependent) + if (Subtarget.is32BitELFABI() && IsPositionIndependent) markSuperRegs(Reserved, PPC::R30); // Reserve Altivec registers when Altivec is unavailable. |