[PATCH] x86-64: memcmp-avx2-movbe.S needs saturating subtraction [BZ #21662]
Florian Weimer
fweimer@redhat.com
Fri Jun 23 20:52:00 GMT 2017
On 06/23/2017 10:48 PM, Richard Henderson wrote:
> On 06/23/2017 06:51 AM, Florian Weimer wrote:
>> + shll $8, %eax
>> + shll $8, %ecx
>> bswap %eax
>> bswap %ecx
>> + movzbl -1(%rdi, %rdx), %edi
>> + movzbl -1(%rsi, %rdx), %esi
>> + orl %edi, %eax
>> + orl %esi, %ecx
>
> Do you really need to re-load and merge the final byte?
> It would appear you could leave the low byte zero.
Sorry, I don't understand. Is this the same issue as H.J. raised and
improved?
The final/third byte certainly can affect the outcome of the comparison.
Thanks,
Florian
More information about the Libc-alpha
mailing list