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 | |
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')
-rw-r--r-- | contrib/libs/lzma/liblzma/check/crc32_table.c | 10 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/check/crc_common.h | 6 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/check/crc_x86_clmul.h | 12 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/check/sha256.c | 2 |
4 files changed, 17 insertions, 13 deletions
diff --git a/contrib/libs/lzma/liblzma/check/crc32_table.c b/contrib/libs/lzma/liblzma/check/crc32_table.c index 7778e79e92..db8d9d5831 100644 --- a/contrib/libs/lzma/liblzma/check/crc32_table.c +++ b/contrib/libs/lzma/liblzma/check/crc32_table.c @@ -34,9 +34,9 @@ typedef void lzma_crc32_dummy; // Having the declaration here silences clang -Wmissing-variable-declarations. extern const uint32_t lzma_crc32_table[8][256]; -# ifdef WORDS_BIGENDIAN -# error #include "crc32_table_be.h" -# else -# include "crc32_table_le.h" -# endif +# ifdef WORDS_BIGENDIAN +# error #include "crc32_table_be.h" +# else +# include "crc32_table_le.h" +# endif #endif diff --git a/contrib/libs/lzma/liblzma/check/crc_common.h b/contrib/libs/lzma/liblzma/check/crc_common.h index 63a7b5cefe..c15d4c675c 100644 --- a/contrib/libs/lzma/liblzma/check/crc_common.h +++ b/contrib/libs/lzma/liblzma/check/crc_common.h @@ -76,9 +76,9 @@ // NOTE: Keep this and the next check in sync with the macro // NO_CRC32_TABLE in crc32_table.c #if defined(HAVE_ARM64_CRC32) && !defined(WORDS_BIGENDIAN) -// Allow ARM64 CRC32 instruction without a runtime check if -// __ARM_FEATURE_CRC32 is defined. GCC and Clang only define this if the -// proper compiler options are used. + // Allow ARM64 CRC32 instruction without a runtime check if + // __ARM_FEATURE_CRC32 is defined. GCC and Clang only define + // this if the proper compiler options are used. # if defined(__ARM_FEATURE_CRC32) # define CRC32_ARCH_OPTIMIZED 1 # define CRC32_ARM64 1 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 diff --git a/contrib/libs/lzma/liblzma/check/sha256.c b/contrib/libs/lzma/liblzma/check/sha256.c index bd0d280639..c067a3a693 100644 --- a/contrib/libs/lzma/liblzma/check/sha256.c +++ b/contrib/libs/lzma/liblzma/check/sha256.c @@ -21,7 +21,7 @@ static inline uint32_t rotr_32(uint32_t num, unsigned amount) { - return (num >> amount) | (num << (32 - amount)); + return (num >> amount) | (num << (32 - amount)); } #define blk0(i) (W[i] = conv32be(data[i])) |