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: Add memcmp/wmemcmp optimized with AVX2


On 06/01/2017 10:57 PM, H.J. Lu wrote:
> I don't think it works with memcmp since return value depends on
> the first bytes which differs.  Say
> 
> ABCDE   turns into EDCBDCBA
> 
> If all bytes differs, we should only compare A, not EDCBDCBA.

That's what the bswapq is for, it reverses the order of bytes.

Florian


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