in ppc64-mode, don't allocate the 32-bit version of r13 either.
llvm-svn: 31884
This commit is contained in:
		
							parent
							
								
									d7f53cdaec
								
							
						
					
					
						commit
						ec5dbccdcf
					
				| 
						 | 
				
			
			@ -224,6 +224,12 @@ def GPRC : RegisterClass<"PPC", [i32], 32,
 | 
			
		|||
    }
 | 
			
		||||
    GPRCClass::iterator
 | 
			
		||||
    GPRCClass::allocation_order_end(const MachineFunction &MF) const {
 | 
			
		||||
      // On PPC64, r13 is the thread pointer.  Never allocate this register.
 | 
			
		||||
      // Note that this is overconservative, as it also prevents allocation of
 | 
			
		||||
      // R31 when the FP is not needed.
 | 
			
		||||
      if (MF.getTarget().getSubtarget<PPCSubtarget>().isPPC64())
 | 
			
		||||
        return end()-5;  // don't allocate R13, R31, R0, R1, LR
 | 
			
		||||
        
 | 
			
		||||
      if (needsFP(MF))
 | 
			
		||||
        return end()-4;  // don't allocate R31, R0, R1, LR
 | 
			
		||||
      else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue