On Fri, Nov 11, 2022 at 9:50 PM Ramana Radhakrishnan <ramana....@googlemail.com> wrote: > > On Thu, Nov 10, 2022 at 7:46 PM Ramana Radhakrishnan > <ramana....@googlemail.com> wrote: > > > > On Thu, Nov 10, 2022 at 6:03 PM Richard Earnshaw > > <richard.earns...@foss.arm.com> 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 <ramana....@gmail.com> > > > > > > > > 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.