From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 73F7D3858021 for ; Tue, 15 Mar 2022 09:22:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 73F7D3858021 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 832722190B; Tue, 15 Mar 2022 09:22:45 +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 7CC2AA3B81; Tue, 15 Mar 2022 09:22:45 +0000 (UTC) Date: Tue, 15 Mar 2022 10:22:45 +0100 (CET) From: Richard Biener To: Jakub Jelinek cc: Uros Bizjak , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] i386: Use no-mmx,no-sse for LIBGCC2_UNWIND_ATTRIBUTE [PR104890] In-Reply-To: Message-ID: <1p9616ro-s7o7-op8p-p561-p1oq219n5rnr@fhfr.qr> References: 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: Tue, 15 Mar 2022 09:22:47 -0000 On Tue, 15 Mar 2022, Jakub Jelinek wrote: > Hi! > > Regardless of the outcome of the general-regs-only stuff in x86gprintrin.h, > apparently general-regs-only is much bigger hammer than no-sse, and e.g. > using 387 instructions in the unwinder isn't a big deal, it never needs > to realign the stack because of it. > > So, the following patch uses no-sse (and adds no-mmx to it, even when not > strictly needed). > > Bootstrapped/regtested on x86_64-linux and i686-linux, on the latter > both normally and with -msse2 -mfpmath=sse -mstackrealign in the options and > --enable-cet, ok for trunk? OK. > 2022-03-15 Jakub Jelinek > > PR target/104890 > * config/i386/i386.h (LIBGCC2_UNWIND_ATTRIBUTE): Use no-mmx,no-sse > instead of general-regs-only. > > --- gcc/config/i386/i386.h.jj 2022-03-09 15:25:28.355498493 +0100 > +++ gcc/config/i386/i386.h 2022-03-14 15:27:33.831976579 +0100 > @@ -2848,10 +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 restrict to > - general regs in 32-bit libgcc functions that call it. */ > +/* __builtin_eh_return can't handle stack realignment, so disable MMX/SSE > + in 32-bit libgcc functions that call it. */ > #ifndef __x86_64__ > -#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("general-regs-only"))) > +#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("no-mmx,no-sse"))) > #endif > > /* > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Ivo Totev; HRB 36809 (AG Nuernberg)