aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/crc64_table.c
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2024-01-22 21:36:09 +0800
committerJia Tan <jiat0218@gmail.com>2024-02-01 20:09:11 +0800
commit1940f0ec28f08c0ac72c1413d9706fb82eabe6ad (patch)
tree2df2dc8e2e9ea84e725b6b67b906f668c70eed64 /src/liblzma/check/crc64_table.c
parentliblzma: Rename crc32_aarch64.h to crc32_arm64.h. (diff)
downloadxz-1940f0ec28f08c0ac72c1413d9706fb82eabe6ad.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--src/liblzma/check/crc64_table.c7
1 files changed, 6 insertions, 1 deletions
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;