From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102822 invoked by alias); 17 Dec 2018 13:35:49 -0000 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 Received: (qmail 102763 invoked by uid 89); 17 Dec 2018 13:35:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,SPF_PASS autolearn=no version=3.3.2 spammy=U*christophe.lyon, christophe.lyon@linaro.org, christophelyonlinaroorg, H*Ad:D*eu X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Dec 2018 13:35:44 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1DE09A78; Mon, 17 Dec 2018 05:35:43 -0800 (PST) Received: from localhost (unknown [10.32.99.101]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D5ABE3F5C0; Mon, 17 Dec 2018 05:35:41 -0800 (PST) From: Richard Sandiford To: Christophe Lyon Mail-Followup-To: Christophe Lyon ,Dimitar Dimitrov , Bernd Edlinger , Segher Boessenkool , Thomas Preudhomme , "gcc-patches\@gcc.gnu.org" , richard.sandiford@arm.com Cc: Dimitar Dimitrov , Bernd Edlinger , Segher Boessenkool , Thomas Preudhomme , "gcc-patches\@gcc.gnu.org" Subject: Re: [PATCH] [RFC] PR target/52813 and target/11807 References: <85840089.MtehzfUrTt@tpdeb> <87woo84boh.fsf@arm.com> Date: Mon, 17 Dec 2018 13:35:00 -0000 In-Reply-To: (Christophe Lyon's message of "Mon, 17 Dec 2018 13:53:51 +0100") Message-ID: <87lg4o46oj.fsf@arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-12/txt/msg01212.txt.bz2 Christophe Lyon writes: > On Mon, 17 Dec 2018 at 12:47, Richard Sandiford > wrote: >> >> Dimitar Dimitrov writes: >> > On Sun, Dec 16 2018 at 14:36:26 EET Bernd Edlinger wrote: >> >> Hi, >> >> >> >> if I understood that right, then clobbering sp is and has always been >> >> ignored. >> >> PR77904 was about the clobber not being ignored, so the behaviour >> hasn't been consistent. >> >> I'm also not sure it was always ignored in recent sources. The clobber >> does get added to the associated rtl insn, and it'd be surprising if >> that never had an effect. >> >> >> If that is right, then I would much prefer a warning, that says exactly >> >> that, because that would also help to understand why removing that clobber >> >> statement is safe even for old gcc versions. >> >> If the asm does leave sp with a different value, then it's never been safe, >> regardless of the gcc version. That's why an error seems more appropriate. >> >> > Thank you. Looks like general consensus is to have a warning. See attached >> > patch that switches the error to a warning. >> >> I don't think there's a good reason to treat this differently from the >> preexisting PIC register error. If the argument for making it a warning >> rather than an error is that the asm might happen to work by accident, >> then the same is true for the PIC register. >> > > If we leave the error, maybe a more explanatory message would be helpful? > (along the lines of what I posted earlier in this thread, which may be > too verbose) The message in that patch suggested removing the clobber and hoping for the best, which IMO is bad advice. If the current message doesn't make it clear enough that changing the sp is not allowed, how about: inline % statements must not change the value of the stack pointer ? Thanks, Richard