[PATCH] x86-64: memcmp-avx2-movbe.S needs saturating subtraction [BZ #21662]

H.J. Lu hjl.tools@gmail.com
Fri Jun 23 15:48:00 GMT 2017


On Fri, Jun 23, 2017 at 8:47 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 06/23/2017 05:43 PM, H.J. Lu wrote:
>> On Fri, Jun 23, 2017 at 8:12 AM, Florian Weimer <fweimer@redhat.com> wrote:
>>> On 06/23/2017 05:08 PM, H.J. Lu wrote:
>>>> On Fri, Jun 23, 2017 at 6:51 AM, Florian Weimer <fweimer@redhat.com> wrote:
>>>>> I think this revised patch is an improvement because it avoids adding a
>>>>> branch.
>>>>>
>>>>> Thanks,
>>>>> Florian
>>>>
>>>> The memcmp-avx2-movbe.S part is OK.
>>>
>>> Thanks, I will commit it shortly.
>>>
>>>> For
>>>>
>>>> (check_result, do_random_tests): Write error messages to standard
>>>> output.
>>>>
>>>> any particular reason to replace error with printf?
>>>
>>> The error function writes to standard error, so the test harness does
>>> not capture it output in the .out file.
>>
>> All string tests are like this.
>
> Right.
>
>> We still got
>>
>> FAIL: string/test-memcmp
>>
>> [hjl@gnu-6 build-x86_64-linux]$ string/test-memcmp
>> string/test-memcmp: Wrong result in function __memcmp_avx2_movbe 1488148660 -168
>> string/test-memcmp: Wrong result in function __memcmp_avx2_movbe 1488237565 -168
>> string/test-memcmp: Wrong result in function __memcmp_avx2_movbe -1275218947 180
>> string/test-memcmp: Wrong result in function __memcmp_avx2_movbe -1275265792 180
>>                         simple_memcmp __memcmp_avx2_movbe
>> __memcmp_sse4_1__memcmp_ssse3 __memcmp_sse2
>> [hjl@gnu-6 build-x86_64-linux]$
>>
>> If we want to change this,  it should be in a separate patch.
>
> Agreed, and we should fix all the instances in one go.  I'm not going to
> work on this immediately.
>
> Florian

OK without the error -> printf change.

Thanks.

-- 
H.J.



More information about the Libc-alpha mailing list