liblzma: Fix a typo in a comment
[xz/debian.git] / src / liblzma / check / crc32_table.c
blob56413eec336e535ad2ad768175a04e3aa7306c78
1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
4 //
5 /// \file crc32_table.c
6 /// \brief Precalculated CRC32 table with correct endianness
7 //
8 // Author: Lasse Collin
9 //
10 ///////////////////////////////////////////////////////////////////////////////
12 #include "common.h"
15 // FIXME: Compared to crc_common.h this has to check for __x86_64__ too
16 // so that in 32-bit builds crc32_x86.S won't break due to a missing table.
17 #if defined(HAVE_USABLE_CLMUL) && ((defined(__x86_64__) && defined(__SSSE3__) \
18 && defined(__SSE4_1__) && defined(__PCLMUL__)) \
19 || (defined(__e2k__) && __iset__ >= 6))
20 # define NO_CRC32_TABLE
22 #elif defined(HAVE_ARM64_CRC32) \
23 && !defined(WORDS_BIGENDIAN) \
24 && defined(__ARM_FEATURE_CRC32)
25 # define NO_CRC32_TABLE
26 #endif
29 #if !defined(HAVE_ENCODERS) && defined(NO_CRC32_TABLE)
30 // No table needed. Use a typedef to avoid an empty translation unit.
31 typedef void lzma_crc32_dummy;
33 #else
34 // Having the declaration here silences clang -Wmissing-variable-declarations.
35 extern const uint32_t lzma_crc32_table[8][256];
37 # ifdef WORDS_BIGENDIAN
38 # include "crc32_table_be.h"
39 # else
40 # include "crc32_table_le.h"
41 # endif
42 #endif