From 9b3c70261419bca20fa26e939116696a02f4e975 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Mar 2004 03:48:07 +0000 Subject: [PATCH] Avoid allocating special registers a bit more robustly git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12207 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcRegisterInfo.td | 14 +++++++++++--- lib/Target/SparcV8/SparcV8RegisterInfo.td | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/Target/Sparc/SparcRegisterInfo.td b/lib/Target/Sparc/SparcRegisterInfo.td index d5167e2aebf..09246c0a41e 100644 --- a/lib/Target/Sparc/SparcRegisterInfo.td +++ b/lib/Target/Sparc/SparcRegisterInfo.td @@ -61,10 +61,18 @@ let Namespace = "V8" in { // FIXME: the register order should be defined in terms of the preferred // allocation order... // -def IntRegs : RegisterClass; + I0, I1, I2, I3, I4, I5, + // Non-allocatable regs + O6, I6, I7, G0]> { + let Methods = [{ + iterator allocation_order_end(MachineFunction &MF) const { + return end()-4; // Don't allocate special registers + } + }]; +} def FPRegs : RegisterClass; + I0, I1, I2, I3, I4, I5, + // Non-allocatable regs + O6, I6, I7, G0]> { + let Methods = [{ + iterator allocation_order_end(MachineFunction &MF) const { + return end()-4; // Don't allocate special registers + } + }]; +} def FPRegs : RegisterClass