From b645d59b1e170af1cb0963935bd8c915e56c431c Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 13 Nov 2020 15:59:29 +0000 Subject: Issue #1683 - Update Brotli lib to 1.0.9 --- modules/brotli/enc/find_match_length.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/brotli/enc/find_match_length.h') diff --git a/modules/brotli/enc/find_match_length.h b/modules/brotli/enc/find_match_length.h index bc428cffd..f8853a70f 100644 --- a/modules/brotli/enc/find_match_length.h +++ b/modules/brotli/enc/find_match_length.h @@ -17,8 +17,7 @@ extern "C" { #endif /* Separate implementation for little-endian 64-bit targets, for speed. */ -#if defined(__GNUC__) && defined(_LP64) && defined(BROTLI_LITTLE_ENDIAN) - +#if defined(BROTLI_TZCNT64) && BROTLI_64_BITS && BROTLI_LITTLE_ENDIAN static BROTLI_INLINE size_t FindMatchLengthWithLimit(const uint8_t* s1, const uint8_t* s2, size_t limit) { @@ -32,7 +31,7 @@ static BROTLI_INLINE size_t FindMatchLengthWithLimit(const uint8_t* s1, } else { uint64_t x = BROTLI_UNALIGNED_LOAD64LE(s2) ^ BROTLI_UNALIGNED_LOAD64LE(s1 + matched); - size_t matching_bits = (size_t)__builtin_ctzll(x); + size_t matching_bits = (size_t)BROTLI_TZCNT64(x); matched += matching_bits >> 3; return matched; } -- cgit v1.2.3