From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id ABC66385842C for ; Wed, 7 Jun 2023 13:17:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABC66385842C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 9DDBD1FDAA; Wed, 7 Jun 2023 13:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686143842; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LLFNMhZOn1lPpKW6EioLyAkQckdY7WRbEhKwaz4+z7g=; b=l6WfMVJLM7wUz05TU4TC+dlVm+vbYcUxFwY3D9W0IoO8EdasGs3PfU9QbR81aNvH3/3V3u hBEIDs4LyxpZeUM0IBfeeK2lkuglh6PQM6M/wS/rst6H94Hp2QpxOgTWCTucr25R/4jwfh cg2Oz644s19YUjjXUVPPkyvnmGDrGPA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686143842; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LLFNMhZOn1lPpKW6EioLyAkQckdY7WRbEhKwaz4+z7g=; b=Si6uaBWUz01Mi76DwPBavJL04auwaj9x9nQ2/LRlC39a8x1ej9eXyO+EcunWJgfhXYOena Yw4Ap8IYjiRSAJAw== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 568D72C141; Wed, 7 Jun 2023 13:17:21 +0000 (UTC) Received: by wotan.suse.de (Postfix, from userid 10510) id DA1D4660C; Wed, 7 Jun 2023 13:17:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by wotan.suse.de (Postfix) with ESMTP id D7C2864B8; Wed, 7 Jun 2023 13:17:21 +0000 (UTC) Date: Wed, 7 Jun 2023 13:17:21 +0000 (UTC) From: Michael Matz To: Umesh Kalappa cc: Segher Boessenkool , Andrew Pinski , Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, gcc@gcc.gnu.org, libc-alpha@sourceware.org, Michael Ellerman , Paul E Murphy Subject: Re: Passing the complex args in the GPR's In-Reply-To: Message-ID: References: <20220524093828.505575-1-npiggin@gmail.com> <20230606164256.GQ19790@gate.crashing.org> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="-1609957120-1269396235-1686143841=:13548" X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1609957120-1269396235-1686143841=:13548 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Hey, On Tue, 6 Jun 2023, Umesh Kalappa via Gcc wrote: > Question is : Why does GCC choose to use GPR's here and have any > reference to support this decision ? You explicitely used -m32 ppc, so https://www.polyomino.org.uk/publications/2011/Power-Arch-32-bit-ABI-supp-1.0-Unified.pdf applies. It explicitely states in "B.1 ATR-Linux Inclusion and Conformance" that it is "ATR-PASS-COMPLEX-IN-GPRS", and other sections detail what that means (namely passing complex args in r3 .. r10, whatever fits). GCC adheres to that, and has to. The history how that came to be was explained in the thread. Ciao, Michael. > > Thank you > ~Umesh > > > > On Tue, Jun 6, 2023 at 10:16 PM Segher Boessenkool > wrote: > > > > Hi! > > > > On Tue, Jun 06, 2023 at 08:35:22PM +0530, Umesh Kalappa wrote: > > > Hi Adnrew, > > > Thank you for the quick response and for PPC64 too ,we do have > > > mismatches in ABI b/w complex operations like > > > https://godbolt.org/z/bjsYovx4c . > > > > > > Any reason why GCC chose to use GPR 's here ? > > > > What did you expect, what happened instead? Why did you expect that, > > and why then is it an error what did happen? > > > > You used -O0. As long as the code works, all is fine. But unoptimised > > code frequently is hard to read, please use -O2 instead? > > > > As Andrew says, why did you use -m32 for GCC but -m64 for LLVM? It is > > hard to compare those at all! 32-bit PowerPC Linux ABI (based on 32-bit > > PowerPC ELF ABI from 1995, BE version) vs. 64-bit ELFv2 ABI from 2015 > > (LE version). > > > > > > Segher > ---1609957120-1269396235-1686143841=:13548--