mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
In 32-bit mode, mark 64-bit GPR's as unallocatable.
llvm-svn: 48217
This commit is contained in:
parent
9ae65a13c3
commit
53213ba056
@ -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…
Reference in New Issue
Block a user