Passing the complex args in the GPR's

Andrew Pinski pinskia at gmail.com
Wed Jun 7 01:16:05 AEST 2023


On Tue, Jun 6, 2023 at 8:05 AM Umesh Kalappa <umesh.kalappa0 at gmail.com> 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 PM Andrew Pinski <pinskia at gmail.com> wrote:
> >
> > On Tue, Jun 6, 2023 at 7:50 AM Umesh Kalappa via Libc-alpha
> > <libc-alpha at sourceware.org> 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


More information about the Linuxppc-dev mailing list