From: Tulio Magno Quites Machado Filho <tuliom@ascii.art.br>
To: Alan Modra <amodra@gmail.com>,
gcc-patches@gcc.gnu.org,
Segher Boessenkool <segher@kernel.crashing.org>
Cc: Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [POWER10] __morestack calls from pcrel code
Date: Wed, 30 Jun 2021 17:06:30 -0300 [thread overview]
Message-ID: <87fswz6rsp.fsf@linux.ibm.com> (raw)
In-Reply-To: <YNwVSUSNjUn3UNv3@squeak.grove.modra.org>
Alan Modra via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Compiling gcc/testsuite/gcc.dg/split-*.c and others with -mcpu=power10
> and linking with a non-pcrel libgcc results in crashes due to the
> power10 pcrel code not having r2 set for the generic-morestack.c
> functions called from __morestack. There is also a problem when
> non-pcrel code calls a pcrel libgcc. See the patch comments.
>
> A similar situation theoretically occurs with ELFv1 multi-toc
> executables, when __morestack might be located in a different toc
> group to its caller. This patch makes no attempt to fix that, since
> the gold linker does not support multi-toc (gold is needed for proper
> support of -fsplit-stack code) nor does gcc emit __morestack calls
> that support multi-toc.
>
> Bootstrapped and regression tested power64le-linux with both
> -mcpu=power10 and -mcpu=power9. OK for mainline and backporting to
> gcc-11 and gcc-10?
>
> * config/rs6000/morestack.S (R2_SAVE): Define.
> (__morestack): Save and restore r2. Set up r2 for called
> functions.
Thanks! This patch solved the issue I was seeing.
If it gets merged, can this patch be backported to GCC 10 and 11, please?
--
Tulio Magno
next prev parent reply other threads:[~2021-06-30 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 6:55 Alan Modra
2021-06-30 20:06 ` Tulio Magno Quites Machado Filho [this message]
2021-07-15 0:01 ` Alan Modra
2021-07-15 0:24 ` David Edelsohn
[not found] ` <YPfa4cOkPbk/mzMF@squeak.grove.modra.org>
[not found] ` <CAGWvny=ZuYZAKzMejDygoxDcr=h8uyk-oZm_wg5xaTEP8jGRsw@mail.gmail.com>
2021-07-22 4:55 ` Alan Modra
2021-07-22 6:41 ` Richard Biener
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=87fswz6rsp.fsf@linux.ibm.com \
--to=tuliom@ascii.art.br \
--cc=amodra@gmail.com \
--cc=bergner@linux.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.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: 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).