]> git.ipfire.org Git - thirdparty/xz.git/commit
liblzma: Speed up CRC32 calculation on 64-bit LoongArch
authorXi Ruoyao <xry111@xry111.site>
Fri, 28 Jun 2024 10:36:43 +0000 (13:36 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 1 Jul 2024 14:09:57 +0000 (17:09 +0300)
commit7baf6835cfbf9c85ba37f9ffb7d4f87fb86a474e
treeabdcc9bcb3375afb43abb002fbc75498be65c298
parent0ed893668554fb0758003289f8a6af9bd08b89d1
liblzma: Speed up CRC32 calculation on 64-bit LoongArch

The crc.w.{b/h/w/d}.w instructions in LoongArch can calculate the CRC32
result for 1/2/4/8 bytes in a single operation. Using these is much
faster compared to the generic method.

Optimized CRC32 is enabled unconditionally on 64-bit LoongArch because
the LoongArch specification says that CRC32 instructions shall be
implemented for 64-bit processors. Optimized CRC32 isn't enabled for
32-bit LoongArch processors because not enough information is available
about them.

Co-authored-by: Lasse Collin <lasse.collin@tukaani.org>
Closes: https://github.com/tukaani-project/xz/pull/86
CMakeLists.txt
configure.ac
src/liblzma/check/Makefile.inc
src/liblzma/check/crc32_fast.c
src/liblzma/check/crc32_loongarch.h [new file with mode: 0644]
src/liblzma/check/crc_common.h