From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 3E06F385C32F for ; Thu, 29 Sep 2022 17:20:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E06F385C32F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 28THIxRA002606; Thu, 29 Sep 2022 12:18:59 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 28THIwDu002605; Thu, 29 Sep 2022 12:18:58 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 29 Sep 2022 12:18:58 -0500 From: Segher Boessenkool To: Iain Sandoe Cc: "Kewen.Lin" , GCC Patches Subject: Re: [PATCH] rs6000: Rework option -mpowerpc64 handling [PR106680] Message-ID: <20220929171858.GZ25951@gate.crashing.org> References: <9d9f1f43-b528-387d-45a7-1d89400de0fc@linux.ibm.com> <5B4DCBBB-3237-4A9F-ACCA-6669DE6905B8@sandoe.co.uk> <20220928213049.GU25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,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: On Thu, Sep 29, 2022 at 12:04:05AM +0100, Iain Sandoe wrote: > > On 28 Sep 2022, at 22:30, Segher Boessenkool wrote: > > 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. Huh, I thought Darwin did this properly. > Since one can only use the feature between function calls, You still have to preserve the non-volatile GPRs. All 64 bits of it. > 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. But that is not how GCC with -mpowerpc64 works: the calling convention is the usual 32-bit one, but the functions are 64-bit otherwise; it uses all 64 bits of GPRs everywhere except in function calls. Segher