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 PM Andrew Pinski <pins...@gmail.com> wrote: > > On Tue, Jun 6, 2023 at 7:50 AM Umesh Kalappa via Libc-alpha > <libc-al...@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