From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id F3D343858C20 for ; Wed, 9 Mar 2022 07:18:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F3D343858C20 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 1A0861F381; Wed, 9 Mar 2022 07:18:39 +0000 (UTC) Received: from murzim.suse.de (murzim.suse.de [10.160.4.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id F123EA3B83; Wed, 9 Mar 2022 07:18:38 +0000 (UTC) Date: Wed, 9 Mar 2022 08:18:38 +0100 (CET) From: Richard Biener To: "H.J. Lu" cc: Jakub Jelinek , Uros Bizjak , Jeff Law , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781] In-Reply-To: Message-ID: <6ropo03n-18ns-p21-p717-oo9r6nss789p@fhfr.qr> References: <20220307150628.68146-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 09 Mar 2022 07:18:41 -0000 On Tue, 8 Mar 2022, H.J. Lu wrote: > On Tue, Mar 8, 2022 at 9:35 AM Jakub Jelinek wrote: > > > > On Tue, Mar 08, 2022 at 08:09:25AM -0800, H.J. Lu wrote: > > > > Ok. So, what do you think about replacing the libgcc/ part of your patch > > > > with that > > > > /* __builtin_eh_return can't handle stack realignment, so disable SSE in > > > > 32-bit libgcc functions that call it. */ > > > > #ifndef __x86_64__ > > > > #define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("no-sse"))) > > > > #endif > > > > ? > > > > > > Yes, it should work. > > > > So, how do we move on with this? > > I can't self-approve my own patch, so can anyone please ack the following > > provided it passes bootstraps/regtests ({x86_64,i686}-linux) that are > > currently pending? > > > > That can go in independently from your patch, and if it is committed, > > your V3 patch with the libgcc/ hunks removed is preapproved for trunk. > > > > 2022-03-08 Jakub Jelinek > > > > PR target/104781 > > * config/i386/i386.h (LIBGCC2_UNWIND_ATTRIBUTE): Define for ia32. > > > > --- gcc/config/i386/i386.h.jj 2022-02-25 12:06:45.535493490 +0100 > > +++ gcc/config/i386/i386.h 2022-03-08 11:20:43.207043370 +0100 > > @@ -2848,6 +2848,12 @@ extern enum attr_cpu ix86_schedule; > > #define NUM_X86_64_MS_CLOBBERED_REGS 12 > > #endif > > > > +/* __builtin_eh_return can't handle stack realignment, so disable SSE in > > + 32-bit libgcc functions that call it. */ > > +#ifndef __x86_64__ > > +#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("no-sse"))) > > +#endif > > + > > /* > > Local variables: > > version-control: t > > > > > > Jakub > > > > LGTM. I wonder if this is a good case for general-regs-only instead? At least no-sse cannot be functionally equivalent (since then we would not have needed general-regs-only ...). Richard.