Skip to content

Commit

Permalink
liblzma: CRC CLMUL: Use crc_e2k_clmul.h on E2K
Browse files Browse the repository at this point in the history
  • Loading branch information
Larhzu committed Jun 11, 2024
1 parent 62917ab commit d3bc9c9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ add_library(liblzma
src/liblzma/check/check.c
src/liblzma/check/check.h
src/liblzma/check/crc_common.h
src/liblzma/check/crc_e2k_clmul.h
src/liblzma/check/crc_x86_clmul.h
src/liblzma/check/crc32_arm64.h
src/liblzma/common/block_util.c
Expand Down
1 change: 1 addition & 0 deletions src/liblzma/check/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ liblzma_la_SOURCES += \
check/check.c \
check/check.h \
check/crc_common.h \
check/crc_e2k_clmul.h \
check/crc_x86_clmul.h \
check/crc32_arm64.h

Expand Down
3 changes: 3 additions & 0 deletions src/liblzma/check/crc32_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#if defined(CRC_X86_CLMUL)
# define BUILDING_CRC32_CLMUL
# include "crc_x86_clmul.h"
#elif defined(CRC_E2K_CLMUL)
# define BUILDING_CRC32_CLMUL
# include "crc_e2k_clmul.h"
#elif defined(CRC32_ARM64)
# include "crc32_arm64.h"
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/liblzma/check/crc64_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#if defined(CRC_X86_CLMUL)
# define BUILDING_CRC64_CLMUL
# include "crc_x86_clmul.h"
#elif defined(CRC_E2K_CLMUL)
# define BUILDING_CRC64_CLMUL
# include "crc_e2k_clmul.h"
#endif


Expand Down
7 changes: 5 additions & 2 deletions src/liblzma/check/crc_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@
//
// NOTE: Keep this in sync with the NO_CRC32_TABLE macro in crc32_table.c
// and NO_CRC64_TABLE in crc64_table.c.
# if (defined(__SSSE3__) && defined(__SSE4_1__) && defined(__PCLMUL__)) \
|| (defined(__e2k__) && __iset__ >= 6)
# if defined(__e2k__) && __iset__ >= 6
# define CRC32_ARCH_OPTIMIZED 1
# define CRC64_ARCH_OPTIMIZED 1
# define CRC_E2K_CLMUL 1
# elif defined(__SSSE3__) && defined(__SSE4_1__) && defined(__PCLMUL__)
# define CRC32_ARCH_OPTIMIZED 1
# define CRC64_ARCH_OPTIMIZED 1
# define CRC_X86_CLMUL 1
Expand Down

0 comments on commit d3bc9c9

Please sign in to comment.