Second try at making direct object emission produce the same results
[oota-llvm.git] / lib / Target / PowerPC / PPCRegisterInfo.td
index 8604f54de93296005d5fc45faa450589a40cc144..2fbd41bd84a586f9915b22a96b7f3e0ae11a6ec3 100644 (file)
@@ -300,13 +300,13 @@ def GPRC : RegisterClass<"PPC", [i32], 32,
       // R31 when the FP is not needed.
       // When using the 32-bit SVR4 ABI, r13 is reserved for the Small Data Area
       // pointer.
-      const PPCSubtarget &Subtarget
-        = MF.getTarget().getSubtarget<PPCSubtarget>();
-         
+      const PPCSubtarget &Subtarget = MF.getTarget().getSubtarget<PPCSubtarget>();
+      const TargetFrameInfo *TFI = MF.getTarget().getFrameInfo();
+   
       if (Subtarget.isPPC64() || Subtarget.isSVR4ABI())
         return end()-5;  // don't allocate R13, R31, R0, R1, LR
         
-      if (needsFP(MF))
+      if (TFI->hasFP(MF))
         return end()-4;  // don't allocate R31, R0, R1, LR
       else
         return end()-3;  // don't allocate R0, R1, LR
@@ -331,7 +331,8 @@ def G8RC : RegisterClass<"PPC", [i64], 64,
     }
     G8RCClass::iterator
     G8RCClass::allocation_order_end(const MachineFunction &MF) const {
-      if (needsFP(MF))
+      const TargetFrameInfo *TFI = MF.getTarget().getFrameInfo();
+      if (TFI->hasFP(MF))
         return end()-5;
       else
         return end()-4;