From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 081913858D33 for ; Tue, 6 Jun 2023 15:05:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 081913858D33 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-ej1-x629.google.com with SMTP id a640c23a62f3a-977c88c9021so518196966b.3 for ; Tue, 06 Jun 2023 08:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686063935; x=1688655935; 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=X703EAUE0dT3jCdU0w/NHCbRg7Eui+oLA87Q0QiNbeQ=; b=rFb7mDt7FxMNgKrbLclsK4JNMzxg1A0FFAgpPA7llAnXuvs4a8TkhRWRPrR5jKo2f3 ktXvPPG/jU/aSx84TKwrpJthBidHudUyWxTMHdUwa1j22SdPfmTsjy/XOWDHjOkWh8Sx OyZCnBppkuhhYY7FqEqXZXtT51KWfRuB2fHi1Dec2ClxhZ8a2a2IXLTxDzpdwfBT0mKw cthvqQJiGJ3w7/PxLVojSbFgKhv5bEiPSiLsN8ZTbHaoTGX4KYV8CVKtx1vQvubxOIPY kYeqFE23rLCx9GlCCeSlGTQqjw/EsJ9ZMeTUomA/LJFlGe6F7EVVRdmUa9oBmGu6yAkB 4JnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686063935; x=1688655935; 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=X703EAUE0dT3jCdU0w/NHCbRg7Eui+oLA87Q0QiNbeQ=; b=YgbzXmIq3LSgAMOyM1dhPmwX3WLDc9IUKTOPZoTay698mCADSw0mRz/vWM9HtsxU08 5mRV3vR79MTK032GfTYCkHWURf2NEoLUUFoms5pyuibOtkuEqbrvpFiM7rKL3+abcOZh pkXD/V9d7cJLqJQp+QgVxt39ewqpNZ7HSMuaf/6Ks/L1P12U9hTZMyMzxczB9kWZSZVL MSsKmMtmUxJGSAhqWivoY90VYtnKX7HpwjHor8LDwFCguee0bj0zyaYyOvO7AFv8S3wi BQdlmHHwye+KSb1z1CqwiQN577j9BRzPRcEi2hZDQAe6qND31sP2xjdPUinBJ/3Rdy+r 7EgA== X-Gm-Message-State: AC+VfDz1XNY6A9tA+qkSAUO5tHJNYdZWM3fAK9kFo3tE8F6Hf+1yWNUi mm8LaEIGuupaDHQjNNTMAtnybD/AUDImhlZ8xo0= X-Google-Smtp-Source: ACHHUZ5FtagZetoLJ45NxobQ3kNf+3WfWp3T4qBpfYI3kQswhbPEFpRb4e6I8s3ZP1+09vwBPQYLPTffy0V9e5cLfEI= X-Received: by 2002:a17:907:6e13:b0:974:e767:e1e7 with SMTP id sd19-20020a1709076e1300b00974e767e1e7mr2546800ejc.28.1686063934399; Tue, 06 Jun 2023 08:05:34 -0700 (PDT) MIME-Version: 1.0 References: <20220524093828.505575-1-npiggin@gmail.com> In-Reply-To: From: Umesh Kalappa Date: Tue, 6 Jun 2023 20:35:22 +0530 Message-ID: Subject: Re: Passing the complex args in the GPR's To: Andrew Pinski 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=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,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: 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 ? ~Umesh On Tue, Jun 6, 2023 at 8:28=E2=80=AFPM Andrew Pinski wr= ote: > > 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 mismatch > > in the ABI b/w gcc and clang . > > > > Do we have any supporting documents that second the GCC behaviour over = 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 real > > and double img and expected to pass in FPR not the GPR. > > > > > > > > Thank you > > ~Umesh