mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
In 32-bit mode, mark 64-bit GPR's as unallocatable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
de13acf862
commit
204496d58e
@ -415,6 +415,9 @@ def GR64 : RegisterClass<"X86", [i64], 64,
|
||||
GR64Class::allocation_order_end(const MachineFunction &MF) const {
|
||||
const TargetMachine &TM = MF.getTarget();
|
||||
const TargetRegisterInfo *RI = TM.getRegisterInfo();
|
||||
const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>();
|
||||
if (!Subtarget.is64Bit())
|
||||
return begin(); // None of these are allocatable in 32-bit.
|
||||
if (RI->hasFP(MF)) // Does the function dedicate RBP to being a frame ptr?
|
||||
return end()-2; // If so, don't allocate RSP or RBP
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user