From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id C7AA13857C72 for ; Wed, 16 Sep 2020 11:34:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C7AA13857C72 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=richard.sandiford@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 34DBE147A; Wed, 16 Sep 2020 04:34:53 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 95A933F68F; Wed, 16 Sep 2020 04:34:52 -0700 (PDT) From: Richard Sandiford To: Jakub Jelinek via Gcc-patches Mail-Followup-To: Jakub Jelinek via Gcc-patches , "H.J. Lu" , Jakub Jelinek , richard.sandiford@arm.com Cc: "H.J. Lu" , Jakub Jelinek Subject: Re: [PATCH] Ignore the clobbered stack pointer in asm statment References: <20200912171136.2440466-1-hjl.tools@gmail.com> <20200914143517.GE21814@tucnak> <20200914170447.GH21814@tucnak> Date: Wed, 16 Sep 2020 12:34:50 +0100 In-Reply-To: <20200914170447.GH21814@tucnak> (Jakub Jelinek via Gcc-patches's message of "Mon, 14 Sep 2020 19:04:47 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2020 11:34:55 -0000 Jakub Jelinek via Gcc-patches writes: > On Mon, Sep 14, 2020 at 08:57:18AM -0700, H.J. Lu via Gcc-patches wrote: >> Something like this for GCC 8 and 9. > > Guess my preference would be to do this everywhere and then let's discuss if > we change the warning into error there or keep it being deprecated. Agreed FWIW. On turning it into an error: I think it might be better to wait a bit longer if we can. Richard > > Though, let's see what others want to say about this. > >> Add sp_is_clobbered_by_asm to rtl_data to inform backends that the stack >> pointer is clobbered by asm statement. >> >> gcc/ >> >> PR target/97032 >> * cfgexpand.c (asm_clobber_reg_kind): Set sp_is_clobbered_by_asm >> to true if the stack pointer is clobbered by asm statement. >> * emit-rtl.h (rtl_data): Add sp_is_clobbered_by_asm. >> * config/i386/i386.c (ix86_get_drap_rtx): Set need_drap to true >> if the stack pointer is clobbered by asm statement. >> >> gcc/testsuite/ >> >> PR target/97032 >> * gcc.target/i386/pr97032.c: New test. > > Jakub