On Wed, Jul 14, 2021 at 8:01 PM Alan Modra <amo...@gmail.com> wrote: > > On Wed, Jun 30, 2021 at 05:06:30PM -0300, Tulio Magno Quites Machado Filho > wrote: > > 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 > > https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573978.html > > This patch has now been unreviewed for over two weeks. I expected a > rubber stamp style approval; This assembly file is all mine, I know > the ABI and how .eh_frame driven exception handling works on powerpc. > So I'm going to claim the patch is obvious enough to someone with a > good understanding of what is going on in morestack.S and commit under > the "obvious" rule after allowing a few more days for comment.
This patch is okay. Thanks, David