From 1940f0ec28f08c0ac72c1413d9706fb82eabe6ad Mon Sep 17 00:00:00 2001 From: Jia Tan Date: Mon, 22 Jan 2024 21:36:09 +0800 Subject: liblzma: Omit CRC tables when not needed with ARM64 optimizations. This is similar to the existing x86-64 CLMUL conditions to omit the tables. They were slightly refactored to improve readability. --- src/liblzma/check/crc64_table.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/liblzma/check/crc64_table.c') diff --git a/src/liblzma/check/crc64_table.c b/src/liblzma/check/crc64_table.c index 688e527b..0ae9dda8 100644 --- a/src/liblzma/check/crc64_table.c +++ b/src/liblzma/check/crc64_table.c @@ -13,11 +13,16 @@ #include "common.h" -// FIXME: Compared to crc64_fast.c this has to check for __x86_64__ too +// FIXME: Compared to crc_common.h this has to check for __x86_64__ too // so that in 32-bit builds crc64_x86.S won't break due to a missing table. #if (defined(__x86_64__) && defined(__SSSE3__) \ && defined(__SSE4_1__) && defined(__PCLMUL__)) \ || (defined(__e2k__) && __iset__ >= 6) +# define X86_CLMUL_NO_TABLE 1 +#endif + + +#ifdef X86_CLMUL_NO_TABLE // No table needed. Use a typedef to avoid an empty translation unit. typedef void lzma_crc64_dummy; -- cgit v1.2.3