aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/crc64_fast.c
diff options
context:
space:
mode:
authorChenxi Mao <chenxi.mao2013@gmail.com>2024-01-09 17:23:11 +0800
committerJia Tan <jiat0218@gmail.com>2024-01-27 21:49:26 +0800
commit849d0f282a6a890c5cf5a0e0f02980b12d9ebb0f (patch)
tree2f8da4c7fcf61a8b9f6425f3075727c972e6bf94 /src/liblzma/check/crc64_fast.c
parentBump version number for 5.5.1alpha. (diff)
downloadxz-849d0f282a6a890c5cf5a0e0f02980b12d9ebb0f.tar.xz
Speed up CRC32 calculation on ARM64
The CRC32 instructions in ARM64 can calculate the CRC32 result for 8 bytes in a single operation, making the use of ARM64 instructions much faster compared to the general CRC32 algorithm. Optimized CRC32 will be enabled if ARM64 has CRC extension running on Linux. Signed-off-by: Chenxi Mao <chenxi.mao2013@gmail.com>
Diffstat (limited to 'src/liblzma/check/crc64_fast.c')
-rw-r--r--src/liblzma/check/crc64_fast.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/liblzma/check/crc64_fast.c b/src/liblzma/check/crc64_fast.c
index eb1a4ae4..cb5d3e4c 100644
--- a/src/liblzma/check/crc64_fast.c
+++ b/src/liblzma/check/crc64_fast.c
@@ -14,9 +14,12 @@
#include "check.h"
#include "crc_common.h"
-#ifdef CRC_X86_CLMUL
+#if defined(CRC_X86_CLMUL)
# define BUILDING_CRC64_CLMUL
# include "crc_x86_clmul.h"
+#elif defined(CRC32_ARM64)
+# define BUILDING_CRC64_AARCH64
+# include "crc32_aarch64.h"
#endif