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 8D1B03858C60 for ; Thu, 8 Feb 2024 18:23:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D1B03858C60 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 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D1B03858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707416611; cv=none; b=a4gFY9ZOFvyh0q2rj2HOLr9m8CmdSd2AVT/1wefDFIbr+f2gTT/0tIs8h2+fAZwpiFjz+A/jS2GlqVVOS7bdX/cBzyC7lXiMvOdcy1J3u+WXTqlTM6G3s3mdB55tyj3GDuPJc6DkS/mZJLIhOvxvoalQXKHeOiiqAWkNZltwCiY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707416611; c=relaxed/simple; bh=yZRFZ9oQFU7fuMeDWBgC7Cr6mL8TO8e6CL8oy9eyEsU=; h=Date:From:To:Subject:Message-ID:Mime-Version; b=Myzs1GktsnF7u9eQTo/NuVO5PYHIcETsmJQtvlOTUk9VgsEQRbMAQJAcXeOdcN07ZawphVAeUWR1MnkmH7k+arD1XLpXh7TK4CWPFXzDYjr2/cFXaZPZSQKoSvQ8nXhwZCZJv3E/debhMkRA8+oYBQ2VK/eK5MbQZ4rcu1bqQUk= ARC-Authentication-Results: i=1; server2.sourceware.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 418IMS8d017575; Thu, 8 Feb 2024 12:22:28 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 418IMR1j017574; Thu, 8 Feb 2024 12:22:27 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 8 Feb 2024 12:22:27 -0600 From: Segher Boessenkool To: Michael Meissner , gcc-patches@gcc.gnu.org, "Kewen.Lin" , David Edelsohn , Peter Bergner Subject: Re: Repost [PATCH 0/6] PowerPC Future patches Message-ID: <20240208182227.GS19790@gate.crashing.org> References: 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=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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! On Fri, Jan 05, 2024 at 06:27:05PM -0500, Michael Meissner wrote: > In the current MMA subsystem for Power10, there are 8 512-bit accumulator > registers. These accumulators are each tied to sets of 4 FPR registers. When Four VSX registers -- the FP registers are only a 64 bit part of each of those. Please do not call those VSX registers "FPRs". They are not. > These patches add support for the 512-bit accumulators within the dense math > system, and for allocation of the 1,024-bit DMRs. At this time, no additional > built-in functions will be done to support any dense math features other than > doing data movement between the DMRs and the VSX registers. Before we can look > at adding any new dense math support other than data movement, we need the GCC > compiler to be able to allocate and use these DMRs. Okido. > If you compile with -mcpu=power10, the wD constraint will match the equivalent > FPR register that overlaps with the accumulator. If you compile with > -mcpu=future, the wD constraint will match the DMR register and not the FPR > register. > > These patches also modifies the print_operand %A output modifier to print out > DMR register numbers if -mcpu=future, and continue to print out the FPR > register number divided by 4 for -mcpu=power10. Yup. Unfortunately that is the best we can do probably. It _feels_ fragile, but it wil probably be okay in practice. > Going forward, hopefully if you modify your code to use the wD constraint and > %A output modifier, you can write code that switches more easily between the > two systems. But it will never become completely transparent. Luckily the old thing will over time fade into the background. So, please post the -mcpu=future patches in a separate series, first. I'll comment on that patch in a minute, you'll probably want to take those comments into consideration before posting that series ;-) Segher