From 186611f98bd0c200b0bf533119ffa28645ff9ed2 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Thu, 18 Jun 2020 21:12:32 -0700 Subject: [PATCH] Do not use word xor (iso646 legacy) Co-authored-by: pps83 --- compare258.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); } -- 2.47.2