[PATCH] Optimize SSE 4.1 x86_64 memcmp

Florian Weimer fweimer@redhat.com
Tue Feb 4 12:33:00 GMT 2014


On 02/04/2014 01:30 PM, Florian Weimer wrote:
> On 02/03/2014 10:30 PM, Carlos O'Donell wrote:
>
>>> Unaligned loads overlapping with data previously compared as equal.
>>> This data cannot affect the outcome of the final comparison.  (This
>>> trick was already used before, but it's not entirely obvious.)
>>>
>>> The SETNE/CMOVAE sequence for the branchless sign function.
>
> (It turns out that this part is not actually present anymore.)
>
>> No, that looks good from a commenting perspective.
>
> I have incorporated the comment updates.

And here's the patch.

-- 
Florian Weimer / Red Hat Product Security Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memcmp-timing.patch
Type: text/x-patch
Size: 9643 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140204/a83e22eb/attachment.bin>


More information about the Libc-alpha mailing list