From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id C95AE385BF9E for ; Thu, 15 Jul 2021 00:01:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C95AE385BF9E Received: by mail-pg1-x535.google.com with SMTP id w15so4159893pgk.13 for ; Wed, 14 Jul 2021 17:01:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=idkdjm3EVoQvXXPPjtg3DwGI4yfRWp44Jsb6X8TOomw=; b=oY0tI/SMLTvFdG/u4neQqKuBsQJpeA+WwIo91ipjTBSI6gZV8vpCMdM9pqQ/p9BHnN VZC/OMPGKyLV7ZEciqlv7PpgS09k2CuBjGYl1ks5zkJFnzkXvCjF511tlxbxqCL6hhNQ thlJcshQbqS0YX0qX94uFWIhM0oh0DAbogvTbVjTnehBa9GWJnCITA0WPeYaF1M85TAK mlGDJ13ggcFsLFUebj6I8CPqaJ3Gct+Uf4At4OQ1frRCSfVm2GkXBQ4Pgse+vSIaRzAY 1s6hzHIp3SWj6wM2yhWdwahG3iD/DhR1IJwGS8eNDUkPbE9Um5jZNwwdO7QG44SfKh7P /GBA== X-Gm-Message-State: AOAM531m6jBJWSm4iTPMC4Kis/iscZOOe3L8cnA/r83klQURoKmcePvl eYULpY98ld7+2MzwNDHuxsYegkJ+vATz3Q== X-Google-Smtp-Source: ABdhPJym8KdGU5xe3CDa4t2K5UwtYJAra9TqEMGpbc30qToppUPwPvgQFttWZltP9KxYFUggF6jckg== X-Received: by 2002:a63:de18:: with SMTP id f24mr619281pgg.112.1626307274302; Wed, 14 Jul 2021 17:01:14 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id t11sm4544558pgm.36.2021.07.14.17.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 17:01:13 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id D61C4114000E; Thu, 15 Jul 2021 09:31:10 +0930 (ACST) Date: Thu, 15 Jul 2021 09:31:10 +0930 From: Alan Modra To: Segher Boessenkool , David Edelsohn Cc: gcc-patches@gcc.gnu.org, Bill Schmidt , Peter Bergner Subject: Re: [POWER10] __morestack calls from pcrel code Message-ID: References: <87fswz6rsp.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fswz6rsp.fsf@linux.ibm.com> X-Spam-Status: No, score=-3033.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2021 00:01:17 -0000 On Wed, Jun 30, 2021 at 05:06:30PM -0300, Tulio Magno Quites Machado Filho wrote: > Alan Modra via Gcc-patches 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. -- Alan Modra Australia Development Lab, IBM