From: Jakub Jelinek <jakub@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>,
Eric Botcazou <ebotcazou@adacore.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c
Date: Tue, 8 Mar 2022 12:15:15 +0100 [thread overview]
Message-ID: <Yic6wxdaLDVd3/oE@tucnak> (raw)
In-Reply-To: <YicutzHS7vFn9x5n@tucnak>
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 <hjl.tools@gmail.com>
> > 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
next prev parent reply other threads:[~2022-03-08 11:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 15:06 H.J. Lu
2022-03-08 10:23 ` Jakub Jelinek
2022-03-08 11:15 ` Jakub Jelinek [this message]
2022-03-08 12:29 ` Jakub Jelinek
2022-03-08 12:49 ` Eric Botcazou
2022-03-08 15:37 ` H.J. Lu
2022-03-08 15:46 ` Jakub Jelinek
2022-03-08 16:09 ` H.J. Lu
2022-03-08 17:35 ` [PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781] Jakub Jelinek
2022-03-08 17:49 ` H.J. Lu
2022-03-09 7:18 ` Richard Biener
2022-03-09 9:59 ` [PATCH] x86, v2: " Jakub Jelinek
2022-03-09 11:30 ` Richard Biener
2022-03-08 17:50 ` [PATCH] x86: " H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yic6wxdaLDVd3/oE@tucnak \
--to=jakub@redhat.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).