This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH x86-64][BZ #20024] Fixed vector sincos/sincosf ABI


2016-06-22 20:56 GMT+03:00 Joseph Myers <joseph@codesourcery.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.

Attached refactored version, ChangeLog is

        [BZ #20024]
        * sysdeps/x86/fpu/test-math-vector-sincos.h: New.
        * sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core_sse4.S: Fixed ABI
        of this implementation of vector function.
        * sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core_avx2.S: Likewise.
        * sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S: Likewise.
        * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S:
        Likewise.
        * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core_sse4.S: Likewise.
        * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core_avx2.S: Likewise.
        * sysdeps/x86_64/fpu/svml_d_sincos2_core.S: Likewise.
        * sysdeps/x86_64/fpu/svml_d_sincos4_core.S: Likewise.
        * sysdeps/x86_64/fpu/svml_d_sincos4_core_avx.S: Likewise.
        * sysdeps/x86_64/fpu/svml_d_sincos8_core.S: Likewise.
        * sysdeps/x86_64/fpu/svml_s_sincosf16_core.S: Likewise.
        * sysdeps/x86_64/fpu/svml_s_sincosf4_core.S: Likewise.
        * sysdeps/x86_64/fpu/svml_s_sincosf8_core.S: Likewise.
        * sysdeps/x86_64/fpu/svml_s_sincosf8_core_avx.S: Likewise.
        * sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c: Use another wrapper
        for testing vector sincos with fixed ABI.
        * sysdeps/x86_64/fpu/test-double-vlen4-avx2-wrappers.c: Likewise.
        * sysdeps/x86_64/fpu/test-double-vlen4-wrappers.c: Likewise.
        * sysdeps/x86_64/fpu/test-double-vlen8-wrappers.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-vlen16-wrappers.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-vlen4-wrappers.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-vlen8-avx2-wrappers.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-vlen8-wrappers.c: Likewise.
        * sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx.c: New test.
        * sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx2.c: Likewise.
        * sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx512.c: Likewise.
        * sysdeps/x86_64/fpu/test-double-libmvec-sincos.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx2.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx512.c: Likewise.
        * sysdeps/x86_64/fpu/test-float-libmvec-sincosf.c: Likewise.
        * sysdeps/x86_64/fpu/Makefile: Added new tests.


--
WBR,
Andrew

Attachment: bz20024_new_refactored.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]