mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 18:06:49 +00:00
This should have gone in with 26015, see comments there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83498e55e2
commit
ee25bc2942
@ -427,6 +427,12 @@ BitVector PPCRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
||||
Reserved.set(PPC::R2); // System-reserved register
|
||||
Reserved.set(PPC::R13); // Small Data Area pointer register
|
||||
}
|
||||
// Reserve R2 on Darwin to hack around the problem of save/restore of CR
|
||||
// when the stack frame is too big to address directly; we need two regs.
|
||||
// This is a hack.
|
||||
if (Subtarget.isDarwinABI()) {
|
||||
Reserved.set(PPC::R2);
|
||||
}
|
||||
|
||||
// On PPC64, r13 is the thread pointer. Never allocate this register.
|
||||
// Note that this is over conservative, as it also prevents allocation of R31
|
||||
@ -447,6 +453,12 @@ BitVector PPCRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
||||
if (Subtarget.isSVR4ABI()) {
|
||||
Reserved.set(PPC::X2);
|
||||
}
|
||||
// Reserve R2 on Darwin to hack around the problem of save/restore of CR
|
||||
// when the stack frame is too big to address directly; we need two regs.
|
||||
// This is a hack.
|
||||
if (Subtarget.isDarwinABI()) {
|
||||
Reserved.set(PPC::X2);
|
||||
}
|
||||
}
|
||||
|
||||
if (needsFP(MF))
|
||||
|
Loading…
Reference in New Issue
Block a user