From: Andrew Pinski Date: Wed, 25 Jun 2008 02:24:24 +0000 (+0000) Subject: rs6000.c (rs6000_emit_epilogue): Set use_backchain_to_restore_sp to true if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d249210298a466b4d143f01d15ac732ba2cb478e;p=gcc.git rs6000.c (rs6000_emit_epilogue): Set use_backchain_to_restore_sp to true if... 2008-06-24 Andrew Pinski * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90b7966ca6a..2108a87ce07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2008-06-24 Andrew Pinski + + * 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 * doc/invoke.texi (Optimize Options) : Add diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 66e4b51773d..68280a5ff9b 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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));