Mark R2 as available for allocation on Darwin/PPC32, but not AIX/PPC64
authorMisha Brukman <brukman+llvm@gmail.com>
Thu, 12 Aug 2004 00:10:01 +0000 (00:10 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Thu, 12 Aug 2004 00:10:01 +0000 (00:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15673 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCRegisterInfo.td

index c103dd6f374ef92a24622f187f05bc5f30a0bc57..78186cfc784e9f017111c1d8d23093258573a473 100644 (file)
@@ -77,13 +77,16 @@ def TBU : SPR<5>;
 // then nonvolatiles in reverse order since stmw/lmw save from rN to r31
 def GPRC : 
   RegisterClass<i32, 4, 
-    [R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, 
+    [R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, 
      R31, R30, R29, R28, R27, R26, R25, R24, R23, R22, R21, R20, R19, R18, R17,
-     R16, R15, R14, R13, R0, R2, R1, LR]>
+     R16, R15, R14, R13, R0, R1, LR]>
 {
   let Methods = [{
+    iterator allocation_order_begin(MachineFunction &MF) const {
+      return begin() + (AIX ? 1 : 0);
+    }
     iterator allocation_order_end(MachineFunction &MF) const {
-      return end() - (AIX ? 4 : 3);
+      return end() - 3;
     }
   }];
 }