diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-10-16 23:50:59 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-10-17 00:04:59 +0300 |
commit | 77bb438c9af7813276c59aac06d76ae6148cd071 (patch) | |
tree | c4f2b0355744a23a1f2839652212c2888a144327 /contrib/libs/lzma/liblzma/check/crc_x86_clmul.h | |
parent | d3b5041a3d36344242cf419e00b5b15f551e297e (diff) | |
download | ydb-77bb438c9af7813276c59aac06d76ae6148cd071.tar.gz |
Update contrib/libs/lzma to 5.6.3
commit_hash:625353c0ed27ce033147a8f5121982b83e126bdc
Diffstat (limited to 'contrib/libs/lzma/liblzma/check/crc_x86_clmul.h')
-rw-r--r-- | contrib/libs/lzma/liblzma/check/crc_x86_clmul.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/libs/lzma/liblzma/check/crc_x86_clmul.h b/contrib/libs/lzma/liblzma/check/crc_x86_clmul.h index f1254ece18..50306e49a7 100644 --- a/contrib/libs/lzma/liblzma/check/crc_x86_clmul.h +++ b/contrib/libs/lzma/liblzma/check/crc_x86_clmul.h @@ -266,7 +266,7 @@ crc32_arch_optimized(const uint8_t *buf, size_t size, uint32_t crc) __m128i v0, v1, v2; - crc_simd_body(buf, size, &v0, &v1, vfold16, + crc_simd_body(buf, size, &v0, &v1, vfold16, _mm_cvtsi32_si128((int32_t)~crc)); v1 = _mm_xor_si128( @@ -355,12 +355,12 @@ crc64_arch_optimized(const uint8_t *buf, size_t size, uint64_t crc) __m128i v0, v1, v2; #if defined(__i386__) || defined(_M_IX86) - crc_simd_body(buf, size, &v0, &v1, vfold16, + crc_simd_body(buf, size, &v0, &v1, vfold16, _mm_set_epi64x(0, (int64_t)~crc)); #else // GCC and Clang would produce good code with _mm_set_epi64x // but MSVC needs _mm_cvtsi64_si128 on x86-64. - crc_simd_body(buf, size, &v0, &v1, vfold16, + crc_simd_body(buf, size, &v0, &v1, vfold16, _mm_cvtsi64_si128((int64_t)~crc)); #endif @@ -385,6 +385,9 @@ crc64_arch_optimized(const uint8_t *buf, size_t size, uint64_t crc) #endif // BUILDING_CRC64_CLMUL +// Even though this is an inline function, compile it only when needed. +// This way it won't appear in E2K builds at all. +#if defined(CRC32_GENERIC) || defined(CRC64_GENERIC) // Inlining this function duplicates the function body in crc32_resolve() and // crc64_resolve(), but this is acceptable because this is a tiny function. static inline bool @@ -420,9 +423,10 @@ is_arch_extension_supported(void) // - ICC's _may_i_use_cpu_feature: the other methods should work too. // - GCC >= 6 / Clang / ICX __builtin_cpu_supports("pclmul") // - // CPUID decding is needed with MSVC anyway and older GCC. This keeps + // CPUID decoding is needed with MSVC anyway and older GCC. This keeps // the feature checks in the build system simpler too. The nice thing // about __builtin_cpu_supports would be that it generates very short // code as is it only reads a variable set at startup but a few bytes // doesn't matter here. } +#endif |