PPC64 libmvec sincos/sincosf ABI
Joseph Myers
joseph@codesourcery.com
Thu Aug 1 17:04:00 GMT 2019
On Thu, 1 Aug 2019, GT wrote:
> I believe PPC64 needs to implement functions analogous to x86_64
> _ZGVbN4vvv_sincosf, _ZGVbN4vl4l4_sincosf, _ZGVbN2vvv_sincos,
> _ZGVbN2vl8l8_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
functions.
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
header declarations.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list