This is the mail archive of the
mailing list for the glibc project.
Re: PPC64 libmvec sincos/sincosf ABI
- From: Joseph Myers <joseph at codesourcery dot com>
- To: GT <tnggil at protonmail dot com>
- Cc: "libc-alpha\\@sourceware.org" <libc-alpha at sourceware dot org>
- Date: Thu, 1 Aug 2019 17:04:46 +0000
- Subject: Re: PPC64 libmvec sincos/sincosf ABI
- References: <m-AhGqPevr7I_c5jF1posRA_bT8Gb8ybwyCgHJP5MbdPs1O6Yv60386A3hgYDZtEaij4iuLbqulf-JSlXj8v6mci_MNQDnHMd1mKpd1I0nIemail@example.com>
On Thu, 1 Aug 2019, GT wrote:
> I believe PPC64 needs to implement functions analogous to x86_64
> _ZGVbN4vvv_sincosf, _ZGVbN4vl4l4_sincosf, _ZGVbN2vvv_sincos,
The x86_64 functions ended up with an ABI (vectors of pointers being
passed) that may well be a mistake and certainly wasn't what was intended
when they were first added. I think it's necessary to answer questions
along the following lines.
1. What is the best vector ABI (best performance) for sincos on PPC64?
That may be a function of the particular vector instructions available on
PPC64; the best choice of ABI on PPC64 need not correspond to the best
choice on x86_64.
2. What is the correct pragma / attribute to use in header declarations to
indicate that sincos has that ABI, and the corresponding name mangling?
This needs resolving in conjunction with people working on the ABI
document and compilers to ensure there is common agreement about how to
tell the compiler that certain vector function variants are available.
The pragma / attribute may well not be the same as used for other libmvec
Only once you have answers to those questions can you know what function
names should be implemented, what the interface to them should be, and,
thus, the corresponding C interface for directly testing them from C.
As noted in previous discussions, the fact that for x86_64 the vector
sincos functions initially had an ABI inconsistent with the one implied by
the header declarations used, and the difference between those functions
and other libmvec functions, makes it particularly important to do an
end-to-end test, using the relevant header declarations and a compiler
that supports generating vector function calls given those declarations,
to make sure that the x86_64 mistake isn't repeated and that the PPC64
sincos functions really do have the intended ABI corresponding to the
Joseph S. Myers