From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id E46403858D37 for ; Wed, 28 Sep 2022 23:04:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E46403858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 38785 invoked from network); 28 Sep 2022 23:04:05 -0000 X-APM-Out-ID: 16644062453878 X-APM-Authkey: 257869/1(257869/1) 3 Received: from unknown (HELO ?192.168.1.95?) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 28 Sep 2022 23:04:05 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: [PATCH] rs6000: Rework option -mpowerpc64 handling [PR106680] From: Iain Sandoe In-Reply-To: <20220928213049.GU25951@gate.crashing.org> Date: Thu, 29 Sep 2022 00:04:05 +0100 Cc: GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: References: <9d9f1f43-b528-387d-45a7-1d89400de0fc@linux.ibm.com> <5B4DCBBB-3237-4A9F-ACCA-6669DE6905B8@sandoe.co.uk> <20220928213049.GU25951@gate.crashing.org> To: "Kewen.Lin" , Segher Boessenkool X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,KAM_COUK,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Folks, > On 28 Sep 2022, at 22:30, Segher Boessenkool = wrote: > On Wed, Sep 28, 2022 at 05:18:47PM +0100, Iain Sandoe wrote: >>> On 28 Sep 2022, at 07:37, Iain Sandoe wrote: >>>> On 28 Sep 2022, at 06:30, Kewen.Lin via Gcc-patches = wrote: >> powerpc-apple-darwin, is perhaps somewhat unusual in that it is = nominally a 32b kernel, but the OS supports 64b processes on suitable = hardware >=20 > Just like Linux was before there was powerpc64-linux. I think it = should > still work even? >=20 >> (and the OS does preserve the upper bits of 64b regs in the context). >=20 > That works on Linux as well. What still does not work is user-mode > context switches in 32-bit processes (so setjmp and getcontext stuff). AFAIU the Darwin impl. it is the same - the user context only contains = 32b register images. Since one can only use the feature between function calls, I guess that = the setjmp/longjmp stuff is not so critical on Darwin***. However, even = being able to use 64b insns between calls could give a massive win in allowing, for example, lock-free 64b atomics. Sometime, I need to spend some time with this and make a set of ppc970 library slices (the dynamic loader should pick the right arch for the = resident cpu). >> I will try to take a look at this this evening see if I can throw >> any more light on it. >=20 > Thanks! adding =E2=80=94with-tune=3DG5 to the configure line .. the cross-build = then succeeded (at "-O1 -g" as I was building to debug) - maybe that will provide a = clue, but I=E2=80=99m out of time for today. Iain. =3D=3D=3D *** revisiting this topic, did make me wonder about non-call exceptions = tho, not sure if they were considered in the original recipes.