Message ID | YieT0l9915XwHt7c@tucnak |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D08EA3858003 for <patchwork@sourceware.org>; Tue, 8 Mar 2022 17:36:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D08EA3858003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1646760962; bh=OiWucWTqm7dVErfhvJrgDxNwXc5Ru+vqPNOc4nuSCN4=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=clYdVoABcKbVCwlzrrfMtpwT+aD3HsVA/kxkSgpoJXkT1DEVrWTCzIySH2gXIKERr lfgq2kbDJBdIXw3uZVDLJhBqXdbKtaDphaY7IxSgUQsMdxgHTs4w5vGH8+SK2XsWWH zPm6GTXj2rudbjpsbm6hcPn+KO3HQXbksPSylPxg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 <gcc-patches@gcc.gnu.org>; 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 To: Uros Bizjak <ubizjak@gmail.com>, Richard Biener <rguenther@suse.de>, Jeff Law <jeffreyalaw@gmail.com>, "H.J. Lu" <hjl.tools@gmail.com> Subject: [PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781] Message-ID: <YieT0l9915XwHt7c@tucnak> References: <20220307150628.68146-1-hjl.tools@gmail.com> <YicutzHS7vFn9x5n@tucnak> <Yic6wxdaLDVd3/oE@tucnak> <YidMOvVHLWBwgBxz@tucnak> <CAMe9rOq=+e1fD7edAwF+XMARCePvbJ-SN1=4BdaX3P=uXYUtLQ@mail.gmail.com> <Yid6OgTq8uH+Ze4O@tucnak> <CAMe9rOosJO5wz5=ZibD-sL_JL+uAoc+-m4B4BT8AK1g5jc619g@mail.gmail.com> MIME-Version: 1.0 In-Reply-To: <CAMe9rOosJO5wz5=ZibD-sL_JL+uAoc+-m4B4BT8AK1g5jc619g@mail.gmail.com> 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jakub Jelinek <jakub@redhat.com> Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781]
|
|
Commit Message
Jakub Jelinek
March 8, 2022, 5:35 p.m. UTC
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 <jakub@redhat.com> PR target/104781 * config/i386/i386.h (LIBGCC2_UNWIND_ATTRIBUTE): Define for ia32. Jakub
Comments
On Tue, Mar 8, 2022 at 9:35 AM Jakub Jelinek <jakub@redhat.com> 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 <jakub@redhat.com> > > 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. Thanks.
On Tue, Mar 8, 2022 at 9:35 AM Jakub Jelinek <jakub@redhat.com> 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. I am checking in this: https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591392.html Thanks. > 2022-03-08 Jakub Jelinek <jakub@redhat.com> > > 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 >
On Tue, 8 Mar 2022, H.J. Lu wrote: > On Tue, Mar 8, 2022 at 9:35 AM Jakub Jelinek <jakub@redhat.com> 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 <jakub@redhat.com> > > > > 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.
--- 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