From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108771 invoked by alias); 7 Jan 2019 09:23:53 -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 108753 invoked by uid 89); 7 Jan 2019 09:23:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=55 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Jan 2019 09:23:51 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 956B958E51; Mon, 7 Jan 2019 09:23:49 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 296C060C44; Mon, 7 Jan 2019 09:23:45 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x079NgZb031978; Mon, 7 Jan 2019 10:23:43 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x079NbiB031977; Mon, 7 Jan 2019 10:23:37 +0100 Date: Mon, 07 Jan 2019 09:23:00 -0000 From: Jakub Jelinek To: Dimitar Dimitrov Cc: Bernd Edlinger , Segher Boessenkool , Christophe Lyon , Thomas Preudhomme , "gcc-patches@gcc.gnu.org" , Richard Sandiford Subject: Re: [PATCH] [RFC] PR target/52813 and target/11807 Message-ID: <20190107092337.GM30353@tucnak> Reply-To: Jakub Jelinek References: <85840089.MtehzfUrTt@tpdeb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <85840089.MtehzfUrTt@tpdeb> User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00278.txt.bz2 On Sun, Dec 16, 2018 at 06:13:57PM +0200, Dimitar Dimitrov wrote: > - /* Clobbering the STACK POINTER register is an error. */ > + /* Clobbered STACK POINTER register is not saved/restored by GCC, > + which is often unexpected by users. See PR52813. */ > if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM)) > { > - error ("Stack Pointer register clobbered by %qs in %", regname); > + warning (0, "Stack Pointer register clobbered by %qs in %", > + regname); > + warning (0, "GCC has always ignored Stack Pointer % clobbers"); Why do we write Stack Pointer rather than stack pointer? That is really weird. The second warning would be a note based on the first one, i.e. if (warning ()) note (); and better have some -W* option to silence the warning. > is_valid = false; > } > > diff --git a/gcc/testsuite/gcc.target/i386/pr52813.c b/gcc/testsuite/gcc.target/i386/pr52813.c > index 154ebbfc423..644fef15fef 100644 > --- a/gcc/testsuite/gcc.target/i386/pr52813.c > +++ b/gcc/testsuite/gcc.target/i386/pr52813.c > @@ -5,5 +5,5 @@ > void > test1 (void) > { > - asm volatile ("" : : : "%esp"); /* { dg-error "Stack Pointer register clobbered" } */ > + asm volatile ("" : : : "%esp"); /* { dg-warning "Stack Pointer register clobbered.\+GCC has always ignored Stack Pointer 'asm' clobbers" } */ > } > -- > 2.11.0 > Jakub