This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH x86-64][BZ #20024] Fixed vector sincos/sincosf ABI
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: Carlos O'Donell <carlos at redhat dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 22 Jun 2016 17:56:56 +0000
- Subject: Re: [PATCH x86-64][BZ #20024] Fixed vector sincos/sincosf ABI
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3tO0RGFjbrQaEV80rTCWmUy8LQjkZ7gRd9j+Q3YQ2+nAQ at mail dot gmail dot com> <alpine dot DEB dot 2 dot 20 dot 1606022247540 dot 9542 at digraph dot polyomino dot org dot uk> <CAMXFM3vREvMPjBU23ZGV6eyNs-exwHGG6C2WE6N1MHf=CqbkvA at mail dot gmail dot com> <alpine dot DEB dot 2 dot 20 dot 1606061404540 dot 15183 at digraph dot polyomino dot org dot uk> <57560F10 dot 4040907 at redhat dot com> <CAMXFM3snbXbRLRuCTRgtnp4QLsfvtWYSZx=mT6qdFC+HYPYTkQ at mail dot gmail dot com> <alpine dot DEB dot 2 dot 20 dot 1606221501480 dot 29819 at digraph dot polyomino dot org dot uk> <CAMXFM3szjuStPa3VgQ2ivkxbLX0fYTSYP6fU_qzN4eqNoCcqEg at mail dot gmail dot com>
On Wed, 22 Jun 2016, Andrew Senkevich wrote:
> 2016-06-22 18:12 GMT+03:00 Joseph Myers <joseph@codesourcery.com>:
> > Also, I don't see how this definition can work. It looks to me like: you
> > initialize the vectors of pointers with lots of copies of the same pointer
> > (as INIT_VEC_LOOP is about putting lots of copies of the same value in a
> > vector). Then you call the vector function. Then the TEST_VEC_LOOP calls
> > have a first argument that is, via some indirection, just r or r1, so they
> > would look successively at r[0], r[1] etc. - but only r[0] and r1[0]
> > actually exist. Given this, I don't understand why the implementation you
> > have would have passed the tests at all.
>
> Unfolded TEST_VEC_LOOP looks successively at mr[0], mr[1] not at r[0], r[1].
> mr[0], mr[1] etc. are the same pointer, yes, but mx also contains
> equal values...
> Is it Ok?
The whole point of TEST_VEC_LOOP is to make sure that the N floating-point
results are equal, given equal inputs (to fit vector tests into the scalar
test infrastructure).
This means you need to use N separate pointers in the vector of pointers.
--
Joseph S. Myers
joseph@codesourcery.com