From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id BD2F43858D38 for ; Tue, 6 Jun 2023 15:16:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD2F43858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-256766a1c43so2753988a91.1 for ; Tue, 06 Jun 2023 08:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686064576; x=1688656576; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6/U+Ir10TGo+FRDrkNKeDyfsxj4MHF2AjGsKRO5a6iw=; b=k+vHbMO0x9r5nFFW3cGiEtLVY+avVzey1xjXlHNmKgHLMZ+X9nA+eZVwjr/VAv0PAO TMc3bNNHTTRTbROJGsaGlAdi4/vCSr7h+tEBxPhb1Ful8PxK/fuOQLPsD9WTliLnVsNA Va8HXQSGndNZ5S1Mv1w8XWFW79bY46Qv9kGEodwHmw89Xbg7dXJIxDi7Vb7LR+PJLGHO W9wldRrkGZSIDQuCRv3DLV3UgcNwwMhqc+78aiBfWWCcaqSlLzFGBLEGEfxecwx7/AAQ 3kB9doPp+eGOcIyf24o4xDL44+3jBSRP217vzbJr9lwK0qlkq7GbvTskx3hzvcdFIf+3 IYzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686064576; x=1688656576; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6/U+Ir10TGo+FRDrkNKeDyfsxj4MHF2AjGsKRO5a6iw=; b=JOwweC7uhpSNfSBbQ9/DO6be+q8Ddgc6723L3D39Vr9Va2jOqlxt1lQ4fW+pz9VLFB DqrtHCLou8jrxeKBO6qiEgwAkNNfsJOB9OX00VMf1Ew4gabeGre6rm3NO2/qnj7VIKDw mFSgqC6LtcNxtakYyJdJ6eHABTzAcONx81gLCAmhrYBG0NyS/tw90Rm40TqcrVHVHhm2 9871J3fpgO4c8b3bbfwOZRa7KHV2tcFZzAWtbYaHXLJvNU5KFN7LBPFFpq8At7b2eXZx ruOOlshHVZjWBZXQYBwKhLYgUol/cWdXkA+EUDYo3GjOVHSwoF82ajwVDMpr0JaT4nMF 9Uzw== X-Gm-Message-State: AC+VfDzengl0MkgeGEA5YweNbpxGrkg0a109LO30UXJCnm9Lg+NgkYvp 2S+Cg7m4O1OHEVhdr0LPCoM7OCeDxjy/G05qz6U= X-Google-Smtp-Source: ACHHUZ6rFRjp5lc97f7xHtSAY09tlQIMG/3u4xxbGGz1jSL9FsMMW2l89cSpHShnWwjRadGlTGZlIM2cwFIsCQJnUJM= X-Received: by 2002:a17:90b:11d1:b0:259:548b:d394 with SMTP id gv17-20020a17090b11d100b00259548bd394mr1243799pjb.28.1686064576444; Tue, 06 Jun 2023 08:16:16 -0700 (PDT) MIME-Version: 1.0 References: <20220524093828.505575-1-npiggin@gmail.com> In-Reply-To: From: Andrew Pinski Date: Tue, 6 Jun 2023 08:16:05 -0700 Message-ID: Subject: Re: Passing the complex args in the GPR's To: Umesh Kalappa Cc: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, gcc@gcc.gnu.org, libc-alpha@sourceware.org, Segher Boessenkool , Michael Ellerman , Paul E Murphy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.6 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,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: On Tue, Jun 6, 2023 at 8:05=E2=80=AFAM 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 ? Yes because it was set before 2003. There could not be an ABI break. r0-50273-gded9bf77e35ce9a2246 fixed GCC for the AIX ABI though. > > ~Umesh > > On Tue, Jun 6, 2023 at 8:28=E2=80=AFPM Andrew Pinski = wrote: > > > > On Tue, Jun 6, 2023 at 7:50=E2=80=AFAM Umesh Kalappa via Libc-alpha > > wrote: > > > > > > Hi all , > > > > > > For the test case https://godbolt.org/z/vjs1vfs5W ,we see the mismatc= h > > > in the ABI b/w gcc and clang . > > > > > > Do we have any supporting documents that second the GCC behaviour ove= r CLANG ? > > > > > > EABI states like > > > > > > In the Power Architecture 64-Bit ELF V2 ABI Specification document > > > (v1.1 from 16 July 2015) > > > > You are looking at the wrong ABI document. > > That is for the 64bit ABI. > > The 32bit ABI document is located at: > > http://refspecs.linux-foundation.org/elf/elfspec_ppc.pdf > > > > Plus the 32bit ABI document does not document Complex argument passing > > as it was written in 1995 and never updated. > > > > https://www.nxp.com/docs/en/reference-manual/E500ABIUG.pdf does not > > document it either. > > > > Thanks, > > Andrew Pinski > > > > > > > > Page 53: > > > > > > Map complex floating-point and complex integer types as if the > > > argument was specified as separate real > > > and imaginary parts. > > > > > > and in this case the double complexes are broken down with double rea= l > > > and double img and expected to pass in FPR not the GPR. > > > > > > > > > > > > Thank you > > > ~Umesh