File nvl425798-2.patch of Package gcc43

2008-06-24  Andrew Pinski  <andrew_pinski@playstation.sony.com>

       * config/rs6000/rs6000.c (rs6000_emit_epilogue): Set
       use_backchain_to_restore_sp to true
       if the offset of the link register save area would go over the 32k - 1
       offset limit of the load
       instructions.

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c.orig	2009-11-20 13:51:57.000000000 +0100
+++ gcc/config/rs6000/rs6000.c	2009-11-20 13:51:59.000000000 +0100
@@ -16330,6 +16330,9 @@ rs6000_emit_epilogue (int sibcall)
      frame pointer for alloca, but the generic parts of the compiler
      give us one anyway.  */
   use_backchain_to_restore_sp = (info->total_size > 32767
+				 || info->total_size
+				     + (info->lr_save_p ? info->lr_save_offset : 0)
+				       > 32767
 				 || (cfun->calls_alloca
 				     && !frame_pointer_needed));
   using_mtcr_multiple = (rs6000_cpu == PROCESSOR_PPC601