From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 745B53858C5F for ; Tue, 6 Jun 2023 17:07:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 745B53858C5F 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-x62a.google.com with SMTP id a640c23a62f3a-977cf86aae5so462281866b.0 for ; Tue, 06 Jun 2023 10:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686071251; x=1688663251; 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=vDsdZnfcxD0GJ2AGUB4yh+w8dDCgzaxM4/KyM3Qr3JY=; b=NkF8A4gHV8SPk0tvvrPsDIKPD13E1OKbpo0dhwA1i1zR+NFgLZhsT7h3VCB3UfB9bC GAoeGD0oszqra/xc0JhzPyTJ35Gt0JpKe5MADdDfagMCoYPEbqCYsDBENRHYdD8B1cM+ 2LLZCX/tkFOlatXUg5l/N4BatMkTsyayPk7i+iPfkFgaK1TLlSgEEwm0huXtOXyYZ8/j Zt72e6EgVDEi1Fqo6G4Z8JM3cSPlmIzUQdSb1/6N/lRg9wMyyP9rMX6+8qGXfFt0CASA TU3NhuCGlkgUm8X4ol1GYZPmgysCK7L88q5J5q/NcLJHYim3C9+ysJeyF+wuYLCOKjgL Pd8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686071251; x=1688663251; 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=vDsdZnfcxD0GJ2AGUB4yh+w8dDCgzaxM4/KyM3Qr3JY=; b=b2LPIlD1MrXDRTeUFmmCfbQAInEhBXBzewiQ9EmY33r9PWfqWlG//CM5AMxLkABIvW ohWncEzZQ6ujeHMTOhUz1eOw3X17LyIjlA7krTywpvqJjfc0KG9J4QDtNLnUynoJekgP GYlYFbTMiuExu+EbGpTFXthmD39uCG1vwgQhNwXgLeJofXebQZNCIPQCXq7zTEtWZbkn DWDz3QBrhIjb0/p406RioWj8fSKIps4N8w0n7nGQLGg5wSE6CuPPhkJSQ+hGCLHeIxlC WRAUOTPiRAz3/gHBHfPYQfAyqenkwJeFNyk/a44IMx36jKjFMSblMKEeyJl25LRAhXdy 6ODw== X-Gm-Message-State: AC+VfDwqdCVVgsmFEOZIjXXSfIPJlJdK3R9eNSghHq2l4sQ3mol4ax+r UlbGSsHhknHKg0O17fW9QpICL5F5RHo/L/aRceE= X-Google-Smtp-Source: ACHHUZ5fSETSjs9fUnEL1//HUKtsp2MSES6GFTxI5lyG11t/dcaswODwHar3gZ7NKwdJeJKIdZUbgy3amGEUbJYnmMs= X-Received: by 2002:a17:907:2d8f:b0:94d:69e0:6098 with SMTP id gt15-20020a1709072d8f00b0094d69e06098mr3502764ejc.45.1686071250801; Tue, 06 Jun 2023 10:07:30 -0700 (PDT) MIME-Version: 1.0 References: <20220524093828.505575-1-npiggin@gmail.com> <20230606164256.GQ19790@gate.crashing.org> In-Reply-To: <20230606164256.GQ19790@gate.crashing.org> From: Umesh Kalappa Date: Tue, 6 Jun 2023 22:37:19 +0530 Message-ID: Subject: Re: Passing the complex args in the GPR's To: Segher Boessenkool Cc: Andrew Pinski , Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, gcc@gcc.gnu.org, libc-alpha@sourceware.org, 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,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 Segher , >>What did you expect, what happened instead? For example the complex args are passed in GPR's for cexp in the case GCC and Clang uses caller memory . for reference : https://godbolt.org/z/MfMz3cTe7 We have cross tools like some of libraries built using the GCC and some use Clang . We approached Clang developers on this behaviour (Why stack , not the FPR's registers like PPC64) and they are not going to change this behaviour, and asked us to refer back to GCC ,hence this email thread. Question is : Why does GCC choose to use GPR's here and have any reference to support this decision ? Thank you ~Umesh On Tue, Jun 6, 2023 at 10:16=E2=80=AFPM 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