From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 9372938432E8 for ; Thu, 24 Nov 2022 12:32:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9372938432E8 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=googlemail.com Received: by mail-wr1-x42a.google.com with SMTP id d1so2241366wrs.12 for ; Thu, 24 Nov 2022 04:32:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=r8PVbAFFPvIKiaenPzW0IHVFzmW3muvsf0fKXgONdlM=; b=lidckz7bpxav7gG9KThXE48ARCghVL7d2Bms3fygnCeR7KG6hAeXl9fFEMOiKwc7EH HanI0q0rkkmeE9xRcgc9hGvmMsrWwfKf9k0RV6udTOA7+rS7qZdddi8fFQFUQ6Chhv9U DQl6xLJgataHPYRhBhaMRXCJxYGBlTpN8uAvspoU2g2K3hGd5oB+jTfjPyi9pWrwm/j+ sO/IjEwPjgEIyJhloOHp5NwwbNTICj71rABDE2oGqlV3hYQBd9vdg6YQAvF9D2A/HgAA KMOPBTpPbZNBNtXeqHgOELUgC61UsZ7VGGXtX5kxDkDVPwov1zynxodMm7xwazkbcvD0 DafA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=r8PVbAFFPvIKiaenPzW0IHVFzmW3muvsf0fKXgONdlM=; b=KvzbiVugoFl4hlpncIR+gZWzHCKARGcbSk/Poksll/D5MB4v/+7t+piyCY68xqeLaI QvpqRtQCwdVKGpWj05dQM+67NCWxwj4w+9zeWXcYwCLp+Oxpmd+CZCi3MoLkDl1c8X8p kHyR2WQmtaqB04iZWFl7Hd2QLXzqSe/hZ1KbZRrJd8yAJ10cOXA1SBHwfAqZeKYWfDYH gazBG97KAPLb3NVs/cxihya/PBX2EyBh6AmOMu0FmwR/+VaDGqsDSWczzCjaAS8LdLK7 y5zUkvD3By1RRveKaG1vIqrm8ZN5CkzUWi7cBjfk1tp2z1BDTj1zz8BBo4PotLLcCRTT TRWg== X-Gm-Message-State: ANoB5pkUGTPnv2NYIS5GWh7qhvAI55QKWWrVdb8/PWjL0Jdn28NQlRpX LXUmKa237N2bqZ/Xt23uVnlnQWuWvBmvm1HK4ZM= X-Google-Smtp-Source: AA0mqf7i5GmhMcr2lzae2nDzWMwY3NI4pOG+DopFMMBn6H2HgKZ+DuhfIRlyfduZEl258jRhgjNXAx9kuL2Qa8L/M4c= X-Received: by 2002:a5d:6342:0:b0:236:b222:13fb with SMTP id b2-20020a5d6342000000b00236b22213fbmr7853224wrw.307.1669293137232; Thu, 24 Nov 2022 04:32:17 -0800 (PST) MIME-Version: 1.0 References: <4119381e-5b4e-5132-8822-e88f8fbb8fc1@foss.arm.com> In-Reply-To: From: Ramana Radhakrishnan Date: Thu, 24 Nov 2022 12:32:06 +0000 Message-ID: Subject: Re: [Patch Arm] Fix PR 92999 To: Richard Earnshaw Cc: gcc-patches , Richard Earnshaw , Alex Coplan Content-Type: multipart/alternative; boundary="00000000000078875f05ee3698a2" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: --00000000000078875f05ee3698a2 Content-Type: text/plain; charset="UTF-8" Ping x 2 Ramana On Thu, 17 Nov 2022, 20:15 Ramana Radhakrishnan, wrote: > On Fri, Nov 11, 2022 at 9:50 PM Ramana Radhakrishnan > wrote: > > > > On Thu, Nov 10, 2022 at 7:46 PM Ramana Radhakrishnan > > wrote: > > > > > > On Thu, Nov 10, 2022 at 6:03 PM Richard Earnshaw > > > wrote: > > > > > > > > > > > > > > > > On 10/11/2022 17:21, Richard Earnshaw via Gcc-patches wrote: > > > > > > > > > > > > > > > On 08/11/2022 18:20, Ramana Radhakrishnan via Gcc-patches wrote: > > > > >> PR92999 is a case where the VFP calling convention does not > allocate > > > > >> enough FP registers for a homogenous aggregate containing FP16 > values. > > > > >> I believe this is the complete fix but would appreciate another > set of > > > > >> eyes on this. > > > > >> > > > > >> Could I get a hand with a regression test run on an armhf > environment > > > > >> while I fix my environment ? > > > > >> > > > > >> gcc/ChangeLog: > > > > >> > > > > >> PR target/92999 > > > > >> * config/arm/arm.c (aapcs_vfp_allocate_return_reg): Adjust to > handle > > > > >> aggregates with elements smaller than SFmode. > > > > >> > > > > >> gcc/testsuite/ChangeLog: > > > > >> > > > > >> * gcc.target/arm/pr92999.c: New test. > > > > >> > > > > >> > > > > >> Thanks, > > > > >> Ramana > > > > >> > > > > >> Signed-off-by: Ramana Radhakrishnan > > > > > > > > > > I'm not sure about this. The AAPCS does not mention a base type > of a > > > > > half-precision FP type as an appropriate homogeneous aggregate for > using > > > > > VFP registers for either calling or returning. > > > > > > Ooh interesting, thanks for taking a look and poking at the AAPCS and > > > that's a good catch. BF16 should also have the same behaviour as FP16 > > > , I suspect ? > > > > I suspect I got caught out by the definition of the Homogenous > > aggregate from Section 5.3.5 > > (( > https://github.com/ARM-software/abi-aa/blob/2982a9f3b512a5bfdc9e3fea5d3b298f9165c36b/aapcs32/aapcs32.rst#homogeneous-aggregates > ) > > which simply suggests it's an aggregate of fundamental types which > > lists half precision floating point . > > > > FTR, ideally I should have read 7.1.2.1 > > > https://github.com/ARM-software/abi-aa/blob/2982a9f3b512a5bfdc9e3fea5d3b298f9165c36b/aapcs32/aapcs32.rst#procedure-calling > ) > > :) > > > > > > > > > > > > > > > > > > > So perhaps the bug is that we try to treat this as a homogeneous > > > > > aggregate at all. > > > > > > Yep I agree - I'll take a look again tomorrow and see if I can get a > fix. > > > > > > (And thanks Alex for the test run, I might trouble you again while I > > > still (slowly) get some of my boards back up) > > > > > > and as promised take 2. I'd really prefer another review on this one > > to see if I've not missed anything in the cases below. > > Ping ? > > Ramana > > > > > regards > > Ramana > > > > > > > > > > regards, > > > Ramana > > > > > > > > > > > > > > R. > --00000000000078875f05ee3698a2--