mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
in ppc64-mode, don't allocate the 32-bit version of r13 either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0374248e86
commit
e9c9f98f71
@ -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…
Reference in New Issue
Block a user