diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-10-19 17:59:18 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-10-19 17:59:18 +0000 |
commit | ceddbfe68f6ec7949a4062716c8f9840a59c6888 (patch) | |
tree | abfecadbb9c1e5aea40701dd20d902cb7bccd962 /contrib/libs/lzma/liblzma | |
parent | 07f2e60d02d95eab14a86a4b9469db1af7795001 (diff) | |
parent | d920c750e476fa2dc80c45f990d9456b1afeadd1 (diff) | |
download | ydb-ceddbfe68f6ec7949a4062716c8f9840a59c6888.tar.gz |
Merge branch 'rightlib' into mergelibs-241019-1758
Diffstat (limited to 'contrib/libs/lzma/liblzma')
-rw-r--r-- | contrib/libs/lzma/liblzma/api/lzma/container.h | 2 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/api/lzma/version.h | 2 | ||||
-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 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/rangecoder/range_decoder.h | 24 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/simple/arm64.c | 4 |
8 files changed, 33 insertions, 29 deletions
diff --git a/contrib/libs/lzma/liblzma/api/lzma/container.h b/contrib/libs/lzma/liblzma/api/lzma/container.h index 8e4af42038..ee5d77e4f1 100644 --- a/contrib/libs/lzma/liblzma/api/lzma/container.h +++ b/contrib/libs/lzma/liblzma/api/lzma/container.h @@ -306,7 +306,7 @@ extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset) * number and zero or more flags. Usually flags aren't * used, so preset is simply a number [0, 9] which match * the options -0 ... -9 of the xz command line tool. - * Additional flags can be be set using bitwise-or with + * Additional flags can be set using bitwise-or with * the preset level number, e.g. 6 | LZMA_PRESET_EXTREME. * \param check Integrity check type to use. See check.h for available * checks. The xz command line tool defaults to diff --git a/contrib/libs/lzma/liblzma/api/lzma/version.h b/contrib/libs/lzma/liblzma/api/lzma/version.h index 53526b992c..e86c0ea4c3 100644 --- a/contrib/libs/lzma/liblzma/api/lzma/version.h +++ b/contrib/libs/lzma/liblzma/api/lzma/version.h @@ -22,7 +22,7 @@ #define LZMA_VERSION_MINOR 6 /** \brief Patch version number of the liblzma release. */ -#define LZMA_VERSION_PATCH 2 +#define LZMA_VERSION_PATCH 3 /** * \brief Version stability marker 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])) diff --git a/contrib/libs/lzma/liblzma/rangecoder/range_decoder.h b/contrib/libs/lzma/liblzma/rangecoder/range_decoder.h index 31a58d1ffb..a8aca9077c 100644 --- a/contrib/libs/lzma/liblzma/rangecoder/range_decoder.h +++ b/contrib/libs/lzma/liblzma/rangecoder/range_decoder.h @@ -592,13 +592,13 @@ do { \ // *_only = rc_asm_y or _n to include or exclude code marked with them #define rc_asm_bittree(a, b, first_only, middle_only, last_only) \ first_only( \ - "movzw 2(%[probs_base]), %[prob" #a "]\n\t" \ + "movzwl 2(%[probs_base]), %[prob" #a "]\n\t" \ "mov $2, %[symbol]\n\t" \ - "movzw 4(%[probs_base]), %[prob" #b "]\n\t" \ + "movzwl 4(%[probs_base]), %[prob" #b "]\n\t" \ ) \ middle_only( \ /* Note the scaling of 4 instead of 2: */ \ - "movzw (%[probs_base], %q[symbol], 4), %[prob" #b "]\n\t" \ + "movzwl (%[probs_base], %q[symbol], 4), %[prob" #b "]\n\t" \ ) \ last_only( \ "add %[symbol], %[symbol]\n\t" \ @@ -610,11 +610,11 @@ do { \ "cmovae %[t0], %[range]\n\t" \ \ first_only( \ - "movzw 6(%[probs_base]), %[t0]\n\t" \ + "movzwl 6(%[probs_base]), %[t0]\n\t" \ "cmovae %[t0], %[prob" #b "]\n\t" \ ) \ middle_only( \ - "movzw 2(%[probs_base], %q[symbol], 4), %[t0]\n\t" \ + "movzwl 2(%[probs_base], %q[symbol], 4), %[t0]\n\t" \ "lea (%q[symbol], %q[symbol]), %[symbol]\n\t" \ "cmovae %[t0], %[prob" #b "]\n\t" \ ) \ @@ -716,12 +716,12 @@ do { \ #define rc_asm_bittree_rev(a, b, add, dcur, dnext0, dnext1, \ first_only, middle_only, last_only) \ first_only( \ - "movzw 2(%[probs_base]), %[prob" #a "]\n\t" \ + "movzwl 2(%[probs_base]), %[prob" #a "]\n\t" \ "xor %[symbol], %[symbol]\n\t" \ - "movzw 4(%[probs_base]), %[prob" #b "]\n\t" \ + "movzwl 4(%[probs_base]), %[prob" #b "]\n\t" \ ) \ middle_only( \ - "movzw " #dnext0 "(%[probs_base], %q[symbol], 2), " \ + "movzwl " #dnext0 "(%[probs_base], %q[symbol], 2), " \ "%[prob" #b "]\n\t" \ ) \ \ @@ -731,11 +731,11 @@ do { \ "cmovae %[t0], %[range]\n\t" \ \ first_only( \ - "movzw 6(%[probs_base]), %[t0]\n\t" \ + "movzwl 6(%[probs_base]), %[t0]\n\t" \ "cmovae %[t0], %[prob" #b "]\n\t" \ ) \ middle_only( \ - "movzw " #dnext1 "(%[probs_base], %q[symbol], 2), %[t0]\n\t" \ + "movzwl " #dnext1 "(%[probs_base], %q[symbol], 2), %[t0]\n\t" \ "cmovae %[t0], %[prob" #b "]\n\t" \ ) \ \ @@ -788,7 +788,7 @@ do { \ uint32_t t_index; \ \ __asm__( \ - "movzw (%[probs_base], %q[symbol], 2), %[prob]\n\t" \ + "movzwl (%[probs_base], %q[symbol], 2), %[prob]\n\t" \ "mov %[symbol], %[index]\n\t" \ \ "add %[dest], %[t2]\n\t" \ @@ -844,7 +844,7 @@ do { \ "and %[offset], %[match_bit]\n\t" \ "add %[match_bit], %[symbol]\n\t" \ \ - "movzw (%[probs_base], %q[symbol], 2), %[prob]\n\t" \ + "movzwl (%[probs_base], %q[symbol], 2), %[prob]\n\t" \ \ "add %[symbol], %[symbol]\n\t" \ \ diff --git a/contrib/libs/lzma/liblzma/simple/arm64.c b/contrib/libs/lzma/liblzma/simple/arm64.c index 0a73f6c8bf..16c2f565f7 100644 --- a/contrib/libs/lzma/liblzma/simple/arm64.c +++ b/contrib/libs/lzma/liblzma/simple/arm64.c @@ -46,11 +46,11 @@ arm64_code(void *simple lzma_attribute((__unused__)), // The full 26-bit immediate is converted. // The range is +/-128 MiB. // - // Using the full range is helps quite a lot with + // Using the full range helps quite a lot with // big executables. Smaller range would reduce false // positives in non-code sections of the input though // so this is a compromise that slightly favors big - // files. With the full range only six bits of the 32 + // files. With the full range, only six bits of the 32 // need to match to trigger a conversion. const uint32_t src = instr; instr = 0x94000000; |