diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2023-07-18 13:57:54 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2023-07-18 14:03:08 +0300 |
commit | b406828a6dfd3caa4f77efe3ff3e3eea263eee62 (patch) | |
tree | d6a8acc1bc2b1f118f0d1b3ae53d44727adbe6c5 | |
parent | liblzma: Omit unnecessary parenthesis in a preprocessor directive. (diff) | |
download | xz-b406828a6dfd3caa4f77efe3ff3e3eea263eee62.tar.xz |
liblzma: Tweak #if condition in memcmplen.h.
Maybe ICC always #defines _MSC_VER on Windows but now
it's very clear which code will get used.
-rw-r--r-- | src/liblzma/common/memcmplen.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblzma/common/memcmplen.h b/src/liblzma/common/memcmplen.h index 4d1ef7b4..3c12422b 100644 --- a/src/liblzma/common/memcmplen.h +++ b/src/liblzma/common/memcmplen.h @@ -70,11 +70,11 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2, const uint64_t x = read64ne(buf1 + len) - read64ne(buf2 + len); if (x != 0) { // MSVC or Intel C compiler on Windows -# if defined(_M_X64) && defined(_MSC_VER) +# if (defined(_MSC_VER) || defined(__INTEL_COMPILER)) && defined(_M_X64) unsigned long tmp; _BitScanForward64(&tmp, x); len += (uint32_t)tmp >> 3; - // GCC, clang, or Intel C compiler + // GCC, Clang, or Intel C compiler # else len += (uint32_t)__builtin_ctzll(x) >> 3; # endif |