From: Nathan Moinvaziri Date: Fri, 19 Jun 2020 04:12:32 +0000 (-0700) Subject: Do not use word xor (iso646 legacy) X-Git-Tag: 1.9.9-b1~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=186611f98bd0c200b0bf533119ffa28645ff9ed2;p=thirdparty%2Fzlib-ng.git Do not use word xor (iso646 legacy) Co-authored-by: pps83 --- diff --git a/compare258.c b/compare258.c index 2b079986..c1b74c50 100644 --- a/compare258.c +++ b/compare258.c @@ -111,10 +111,10 @@ static inline int32_t compare256_unaligned_32_static(const unsigned char *src0, do { uint32_t sv = *(uint32_t *)src0; uint32_t mv = *(uint32_t *)src1; - uint32_t xor = sv ^ mv; + uint32_t diff = sv ^ mv; - if (xor) { - uint32_t match_byte = __builtin_ctz(xor) / 8; + if (diff) { + uint32_t match_byte = __builtin_ctz(diff) / 8; return (int32_t)(len + match_byte); } @@ -151,10 +151,10 @@ static inline int32_t compare256_unaligned_64_static(const unsigned char *src0, do { uint64_t sv = *(uint64_t *)src0; uint64_t mv = *(uint64_t *)src1; - uint64_t xor = sv ^ mv; + uint64_t diff = sv ^ mv; - if (xor) { - uint64_t match_byte = __builtin_ctzll(xor) / 8; + if (diff) { + uint64_t match_byte = __builtin_ctzll(diff) / 8; return (int32_t)(len + match_byte); }