rs6000.c (rs6000_emit_epilogue): Set use_backchain_to_restore_sp to true if...
authorAndrew Pinski <andrew_pinski@playstation.sony.com>
Wed, 25 Jun 2008 02:24:24 +0000 (02:24 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Wed, 25 Jun 2008 02:24:24 +0000 (19:24 -0700)
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.

From-SVN: r137097

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 90b7966ca6a1e6b384555a7e8be214191d9fe575..2108a87ce070b4c56f2a517c8ffa70672302ab93 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2008-06-25  Hans-Peter Nilsson  <hp@axis.com>
 
        * doc/invoke.texi (Optimize Options) <fstrict-aliasing>: Add
index 66e4b51773d41dae8f69cccc76b0f8e06c8ecc3d..68280a5ff9bb2af1bc70f165744ea76d7d64d576 100644 (file)
@@ -16313,6 +16313,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));