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 77AE33858C83 for ; Tue, 8 Mar 2022 17:35:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 77AE33858C83 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-136-OMxnzaKYMYyQaSpbBq-VTA-1; Tue, 08 Mar 2022 12:35:20 -0500 X-MC-Unique: OMxnzaKYMYyQaSpbBq-VTA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD9761854E21; Tue, 8 Mar 2022 17:35:18 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57C367F0D0; Tue, 8 Mar 2022 17:35:18 +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 228HZFjj3932377 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 8 Mar 2022 18:35:15 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 228HZEbu3932376; Tue, 8 Mar 2022 18:35:14 +0100 Date: Tue, 8 Mar 2022 18:35:14 +0100 From: Jakub Jelinek To: Uros Bizjak , Richard Biener , Jeff Law , "H.J. Lu" Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781] 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.11 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 17:35:24 -0000 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