public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7565] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781] Date: Wed, 9 Mar 2022 14:27:28 +0000 (GMT) [thread overview] Message-ID: <20220309142728.E4AA23858415@sourceware.org> (raw) https://gcc.gnu.org/g:caa6c33c5d5223c50657b08e73177e8d54ceee51 commit r12-7565-gcaa6c33c5d5223c50657b08e73177e8d54ceee51 Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Mar 9 15:25:30 2022 +0100 x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781] 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 The following change does that using LIBGCC2_UNWIND_ATTRIBUTE macro instead, for ia32 only by forcing -mgeneral-regs-only on routines that call __builtin_eh_return in libgcc. 2022-03-09 Jakub Jelinek <jakub@redhat.com> PR target/104781 * config/i386/i386.h (LIBGCC2_UNWIND_ATTRIBUTE): Define for ia32. Diff: --- gcc/config/i386/i386.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index b37d4a9966a..0d28e57f8f2 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -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 restrict to + general regs in 32-bit libgcc functions that call it. */ +#ifndef __x86_64__ +#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("general-regs-only"))) +#endif + /* Local variables: version-control: t
reply other threads:[~2022-03-09 14:27 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220309142728.E4AA23858415@sourceware.org \ --to=jakub@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).