From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18109 invoked by alias); 3 Oct 2007 19:12:12 -0000 Received: (qmail 18100 invoked by uid 22791); 3 Oct 2007 19:12:12 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 03 Oct 2007 19:12:08 +0000 Received: (qmail 27405 invoked from network); 3 Oct 2007 19:12:06 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Oct 2007 19:12:06 -0000 Date: Wed, 03 Oct 2007 19:12:00 -0000 From: Nathan Froyd To: Andrew Pinski Cc: gcc-patches Subject: Re: [PATCH,rs6000] fix interrupt safety issue on E500 targets Message-ID: <20071003191205.GD4491@codesourcery.com> Mail-Followup-To: Andrew Pinski , gcc-patches References: <20071003141842.GA20076@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg00205.txt.bz2 On Wed, Oct 03, 2007 at 08:45:24AM -0700, Andrew Pinski wrote: > On 10/3/07, Andrew Pinski wrote: > > On 10/3/07, Nathan Froyd wrote: > > > Tested on powerpc-none-linux-gnuspe with no regressions. OK to commit? > > > > I think this is needed for all sysv based abis and not just SPE. > > And I think this is related to PR30282. Any objection to simply calling rs6000_emit_stack_tie unconditionally before the stack adjustment, then? (Patch below--I don't know what AIX/Darwin requires here, but I can't imagine it would hurt performance that much.) -Nathan Index: rs6000.c =================================================================== --- rs6000.c (revision 128981) +++ rs6000.c (working copy) @@ -16329,13 +16329,14 @@ rs6000_emit_epilogue (int sibcall) } } + /* This blockage is needed so that sched doesn't decide to move + the sp change before the register restores. */ + rs6000_emit_stack_tie (); + /* If this is V.4, unwind the stack pointer after all of the loads have been done. */ if (frame_reg_rtx != sp_reg_rtx) { - /* This blockage is needed so that sched doesn't decide to move - the sp change before the register restores. */ - rs6000_emit_stack_tie (); if (TARGET_SPE_ABI && info->spe_64bit_regs_used != 0 && info->first_gp_reg_save != 32)