From patchwork Fri Apr 20 09:32:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RS6000] Fix PR53040 Date: Thu, 19 Apr 2012 23:32:26 -0000 From: Alan Modra X-Patchwork-Id: 153990 Message-Id: <20120420093226.GU3218@bubble.grove.modra.org> To: gcc-patches@gcc.gnu.org Cc: David Edelsohn I'm applying this to mainline as obvious. If we save fprs inline for any reason, we must also restore them inline. (The same goes for gprs, and that is handled later in this function.) Bootstrapped and regresion tested powerpc-linux. PR target/53040 * config/rs6000/rs6000.c (rs6000_savres_strategy): When using static chain, set REST_INLINE_FPRS too. diff -urp gcc-alan4/gcc/config/rs6000/rs6000.c gcc-alan5a/gcc/config/rs6000/rs6000.c --- gcc-alan4/gcc/config/rs6000/rs6000.c 2012-04-19 18:33:20.171843404 +0930 +++ gcc-alan5a/gcc/config/rs6000/rs6000.c 2012-04-19 21:24:46.643632761 +0930 @@ -17456,8 +17456,9 @@ rs6000_savres_strategy (rs6000_stack_t * static chain is rarely used anyway. FPRs are saved w.r.t the stack pointer on Darwin. */ if (using_static_chain_p) - strategy |= (DEFAULT_ABI == ABI_DARWIN ? 0 : SAVE_INLINE_FPRS) - | SAVE_INLINE_GPRS; + strategy |= ((DEFAULT_ABI == ABI_DARWIN + ? 0 : SAVE_INLINE_FPRS | REST_INLINE_FPRS) + | SAVE_INLINE_GPRS); /* If we are going to use store multiple, then don't even bother with the out-of-line routines, since the store-multiple