summaryrefslogtreecommitdiff
path: root/compare258.c
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-06-18 21:12:32 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-06-19 10:17:18 +0200
commit186611f98bd0c200b0bf533119ffa28645ff9ed2 (patch)
tree6971f198a90a20792f511b3a746a7b6df052e1df /compare258.c
parent2a5585c84367b644cfbd151ea0511e9609e481c8 (diff)
Do not use word xor (iso646 legacy)
Co-authored-by: pps83 <pps83@users.noreply.github.com>
Diffstat (limited to 'compare258.c')
-rw-r--r--compare258.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/compare258.c b/compare258.c
index 2b07998..c1b74c5 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);
}