unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: GT <tnggil@protonmail.com>
Cc: "libc-alpha\\@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: PPC64 libmvec sincos/sincosf ABI
Date: Thu, 1 Aug 2019 17:04:46 +0000	[thread overview]
Message-ID: <alpine.DEB.2.21.1908011652470.31047@digraph.polyomino.org.uk> (raw)
In-Reply-To: <m-AhGqPevr7I_c5jF1posRA_bT8Gb8ybwyCgHJP5MbdPs1O6Yv60386A3hgYDZtEaij4iuLbqulf-JSlXj8v6mci_MNQDnHMd1mKpd1I0nI=@protonmail.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, 
> _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

  reply	other threads:[~2019-08-01 17:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 13:01 PPC64 libmvec sincos/sincosf ABI GT
2019-08-01 17:04 ` Joseph Myers [this message]
2019-08-07 21:17 ` Tulio Magno Quites Machado Filho
2019-08-08 13:33   ` Bill Schmidt
2019-08-08 15:48     ` GT
2019-08-08 15:56       ` Florian Weimer
2019-08-08 16:56         ` GT
2019-08-08 16:11       ` Bill Schmidt
2019-08-08 17:42         ` GT
2019-08-08 17:51           ` Bill Schmidt
  -- strict thread matches above, loose matches on Subject: below --
2019-08-06 17:42 Wilco Dijkstra
2019-08-06 20:31 ` Joseph Myers
2019-08-08 15:25 ` Bill Schmidt
2019-08-08 18:48   ` Bill Schmidt
2019-09-20 19:25   ` GT
2019-09-20 20:25     ` Bill Schmidt
2019-09-23 18:02       ` GT
2019-09-24 16:43         ` Bill Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1908011652470.31047@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=tnggil@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).