diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2024-01-10 18:23:31 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2024-01-11 14:29:42 +0200 |
commit | 66f080e8016129576536482ac377e2ecac7a2b90 (patch) | |
tree | a362593e7dafb49c5d6af1f64a72f4a1168fbc45 /src/liblzma/check/crc_common.h | |
parent | liblzma: Fix a comment in crc_common.h. (diff) | |
download | xz-66f080e8016129576536482ac377e2ecac7a2b90.tar.xz |
liblzma: Rename arch-specific CRC functions and macros.
CRC_CLMUL was split to CRC_ARCH_OPTIMIZED and CRC_X86_CLMUL.
CRC_ARCH_OPTIMIZED is defined when an arch-optimized version is used.
Currently the x86 CLMUL implementations are the only arch-optimized
versions, and these also use the CRC_x86_CLMUL macro to tell when
crc_x86_clmul.h needs to be included.
is_clmul_supported() was renamed to is_arch_extension_supported().
crc32_clmul() and crc64_clmul() were renamed to
crc32_arch_optimized() and crc64_arch_optimized().
This way the names make sense with arch-specific non-CLMUL
implementations as well.
Diffstat (limited to 'src/liblzma/check/crc_common.h')
-rw-r--r-- | src/liblzma/check/crc_common.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/liblzma/check/crc_common.h b/src/liblzma/check/crc_common.h index 372ae4a4..045bc20e 100644 --- a/src/liblzma/check/crc_common.h +++ b/src/liblzma/check/crc_common.h @@ -70,7 +70,8 @@ #endif #undef CRC_GENERIC -#undef CRC_CLMUL +#undef CRC_ARCH_OPTIMIZED +#undef CRC_X86_CLMUL #undef CRC_USE_IFUNC #undef CRC_USE_GENERIC_FOR_SMALL_INPUTS @@ -86,12 +87,14 @@ // NOTE: Keep this this in sync with crc32_table.c. #elif (defined(__SSSE3__) && defined(__SSE4_1__) && defined(__PCLMUL__)) \ || (defined(__e2k__) && __iset__ >= 6) -# define CRC_CLMUL 1 +# define CRC_ARCH_OPTIMIZED 1 +# define CRC_X86_CLMUL 1 // Otherwise build both and detect at runtime which version to use. #else # define CRC_GENERIC 1 -# define CRC_CLMUL 1 +# define CRC_ARCH_OPTIMIZED 1 +# define CRC_X86_CLMUL 1 # ifdef HAVE_FUNC_ATTRIBUTE_IFUNC # define CRC_USE_IFUNC 1 |