summaryrefslogtreecommitdiffstats
path: root/modules/brotli/enc/find_match_length.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-11-20 09:47:03 +0000
committerMoonchild <moonchild@palemoon.org>2020-11-20 09:47:03 +0000
commit5165ed02285315cc0bed7977c7bac6d0a90ca43c (patch)
tree9b761a21eb924915e51c2d803208e6c01b505a45 /modules/brotli/enc/find_match_length.h
parente1db27e19989db11fef70f439cf95821316535b3 (diff)
parentca9abcdf1702c37bf00048dab3f460b2252873a3 (diff)
downloadUXP-8dd3f67b8431f42fd367a7f64a1c14ba7ba708ec.tar
UXP-8dd3f67b8431f42fd367a7f64a1c14ba7ba708ec.tar.gz
UXP-8dd3f67b8431f42fd367a7f64a1c14ba7ba708ec.tar.lz
UXP-8dd3f67b8431f42fd367a7f64a1c14ba7ba708ec.tar.xz
UXP-8dd3f67b8431f42fd367a7f64a1c14ba7ba708ec.zip
Merge branch 'redwood' into releaseRELBASE_20201124RELBASE_20201120RC_20201120
Diffstat (limited to 'modules/brotli/enc/find_match_length.h')
-rw-r--r--modules/brotli/enc/find_match_length.h5
1 files changed, 2 insertions, 3 deletions
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;
}