mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-10 22:00:58 +00:00
in ppc64-mode, don't allocate the 32-bit version of r13 either.
llvm-svn: 31884
This commit is contained in:
parent
cd74ba8ae1
commit
ed9a2f6371
@ -224,6 +224,12 @@ def GPRC : RegisterClass<"PPC", [i32], 32,
|
||||
}
|
||||
GPRCClass::iterator
|
||||
GPRCClass::allocation_order_end(const MachineFunction &MF) const {
|
||||
// On PPC64, r13 is the thread pointer. Never allocate this register.
|
||||
// Note that this is overconservative, as it also prevents allocation of
|
||||
// R31 when the FP is not needed.
|
||||
if (MF.getTarget().getSubtarget<PPCSubtarget>().isPPC64())
|
||||
return end()-5; // don't allocate R13, R31, R0, R1, LR
|
||||
|
||||
if (needsFP(MF))
|
||||
return end()-4; // don't allocate R31, R0, R1, LR
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user