Date: Wed, 4 Dec 2013 21:17:40 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258943 - in head/contrib/gcc: . config/rs6000 Message-ID: <201312042117.rB4LHehG089412@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Wed Dec 4 21:17:39 2013 New Revision: 258943 URL: http://svnweb.freebsd.org/changeset/base/258943 Log: gcc: On rs6000 update sp_offset depending only on size. This fixes a nasty bug introduced in r258651. Reported and tested by: Justin Hibbits Obtained from: gcc pre-4.3 (rev. 125116; GPLv2) MFC after: 2 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/config/rs6000/rs6000.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Wed Dec 4 20:46:25 2013 (r258942) +++ head/contrib/gcc/ChangeLog.gcc43 Wed Dec 4 21:17:39 2013 (r258943) @@ -51,12 +51,20 @@ * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. -2007-05-31 Eric Christopher <echristo@apple.com> +2007-05-31 Eric Christopher <echristo@apple.com> (r125246) * expr.c (convert_move): Assert that we don't have a BLKmode operand. (store_expr): Handle BLKmode moves by calling emit_block_move. +2007-05-27 Eric Christopher <echristo@apple.com> (r125116) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Update + sp_offset depending on stack size. Save r12 depending + on registers we're saving later. + (rs6000_emit_epilogue): Update sp_offset depending only + on stack size. + 2007-05-24 Richard Sandiford <rsandifo@nildram.co.uk> (r125037) * postreload-gcse.c (reg_changed_after_insn_p): New function. Modified: head/contrib/gcc/config/rs6000/rs6000.c ============================================================================== --- head/contrib/gcc/config/rs6000/rs6000.c Wed Dec 4 20:46:25 2013 (r258942) +++ head/contrib/gcc/config/rs6000/rs6000.c Wed Dec 4 21:17:39 2013 (r258943) @@ -14704,8 +14704,17 @@ rs6000_emit_prologue (void) if (!WORLD_SAVE_P (info) && info->push_p && !(DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return)) { - rs6000_emit_allocate_stack (info->total_size, FALSE); + if (info->total_size < 32767) sp_offset = info->total_size; + else + frame_reg_rtx = frame_ptr_rtx; + rs6000_emit_allocate_stack (info->total_size, + (frame_reg_rtx != sp_reg_rtx + && ((info->altivec_size != 0) + || (info->vrsave_mask != 0) + ))); + if (frame_reg_rtx != sp_reg_rtx) + rs6000_emit_stack_tie (); } /* Set frame pointer, if needed. */ @@ -15046,8 +15055,7 @@ rs6000_emit_epilogue (int sibcall) } /* Set sp_offset based on the stack push from the prologue. */ - if ((DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return) - && info->total_size < 32767) + if (info->total_size < 32767) sp_offset = info->total_size; /* Restore AltiVec registers if needed. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312042117.rB4LHehG089412>