From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 97A443858C83 for ; Tue, 8 Mar 2022 11:15:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 97A443858C83 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-218-mO2cNRbIMwOFL98kDA-jjg-1; Tue, 08 Mar 2022 06:15:21 -0500 X-MC-Unique: mO2cNRbIMwOFL98kDA-jjg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC7518145F7; Tue, 8 Mar 2022 11:15:19 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 72D448089D; Tue, 8 Mar 2022 11:15:19 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 228BFG0I3780234 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 8 Mar 2022 12:15:16 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 228BFFcC3780231; Tue, 8 Mar 2022 12:15:15 +0100 Date: Tue, 8 Mar 2022 12:15:15 +0100 From: Jakub Jelinek To: "H.J. Lu" , Eric Botcazou , gcc-patches@gcc.gnu.org Subject: Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c Message-ID: Reply-To: Jakub Jelinek References: <20220307150628.68146-1-hjl.tools@gmail.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Tue, 08 Mar 2022 11:15:26 -0000 On Tue, Mar 08, 2022 at 11:23:51AM +0100, Jakub Jelinek via Gcc-patches wrote: > On Mon, Mar 07, 2022 at 07:06:28AM -0800, H.J. Lu wrote: > > Since eh_return doesn't work with stack realignment, disable SSE on > > unwind-c.c and unwind-dw2.c to avoid stack realignment with the 4-byte > > incoming stack to avoid SSE usage which is caused by > > > > commit 609e8c492d62d92465460eae3d43dfc4b2c68288 > > Author: H.J. Lu > > Date: Sat Feb 26 14:17:23 2022 -0800 > > > > x86: Always return pseudo register in ix86_gen_scratch_sse_rtx > > > > when pseudo vector registers are used to expand memset. > > > PR target/104781 > > * config.host (tmake_file): Add i386/32/t-eh-return-no-sse for > > 32-bit x86 Cygwin, MinGW and Solaris. > > * config/i386/32/t-eh-return-no-sse: New file. > > For this, isn't the right fix instead something like: > > --- 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,10 @@ 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 > + libgcc functions that call it. */ > +#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("no-sse"))) > + > /* > Local variables: > version-control: t > > > As mentioned in PR104838, this likely isn't specific to just Solaris and > cygwin/mingw. Fedora uses -msse2 -mfpmath=sse -mstackrealign in its C{,XX}FLAGS > among other things for i686. Now verified that with your full patch applied gcc on Fedora/i686 doesn't build (gets those sorry messages when compiling unwind-dw2), while if I replace those 2 libgcc hunks from your patch with the above one it seems to get past the previous hanging point of gnat1 processes. Jakub