diff options
| author | Hal Finkel <hfinkel@anl.gov> | 2015-01-17 03:57:34 +0000 |
|---|---|---|
| committer | Hal Finkel <hfinkel@anl.gov> | 2015-01-17 03:57:34 +0000 |
| commit | c19805a75d8abff8b251eb9112c823a54a2e70b1 (patch) | |
| tree | 2f61a1475321c1ae5b8b832149be3355152b3b94 /llvm/lib/Target/PowerPC | |
| parent | 0e39c55d229a5311751784705896f3dcdf8d8a11 (diff) | |
| download | bcm5719-llvm-c19805a75d8abff8b251eb9112c823a54a2e70b1.tar.gz bcm5719-llvm-c19805a75d8abff8b251eb9112c823a54a2e70b1.zip | |
[PowerPC] Don't list R11 as a patchpoint scratch register
R11's status is the same under both the PPC64 ELF V1 and V2 ABIs: it is
reserved for use as an "environment pointer" for compilation models that
require such a thing. We don't, we also don't need a second scratch register,
and because we support only "local" patchpoint call targets, we might as well
let R11 be used for anyregcc patchpoints.
llvm-svn: 226369
Diffstat (limited to 'llvm/lib/Target/PowerPC')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index e17c4e675c6..20e5115445e 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -9910,16 +9910,8 @@ PPCTargetLowering::getScratchRegisters(CallingConv::ID) const { // site. Hence we include LR in the scratch registers, which are in turn added // as implicit-defs for stackmaps and patchpoints. The same reasoning applies // to CTR, which is used by any indirect call. - if (Subtarget.isELFv2ABI()) { - static const MCPhysReg ScratchRegs[] = { - PPC::X12, PPC::LR8, PPC::CTR8, 0 - }; - - return ScratchRegs; - } - static const MCPhysReg ScratchRegs[] = { - PPC::X12, PPC::X11, PPC::LR8, PPC::CTR8, 0 + PPC::X12, PPC::LR8, PPC::CTR8, 0 }; return ScratchRegs; |

