Path: blob/master/Utilities/cmliblzma/liblzma/check/crc64_table.c
3153 views
// SPDX-License-Identifier: 0BSD12///////////////////////////////////////////////////////////////////////////////3//4/// \file crc64_table.c5/// \brief Precalculated CRC64 table with correct endianness6//7// Author: Lasse Collin8//9///////////////////////////////////////////////////////////////////////////////1011#include "common.h"121314// FIXME: Compared to crc_common.h this has to check for __x86_64__ too15// so that in 32-bit builds crc64_x86.S won't break due to a missing table.16#if defined(HAVE_USABLE_CLMUL) && ((defined(__x86_64__) && defined(__SSSE3__) \17&& defined(__SSE4_1__) && defined(__PCLMUL__)) \18|| (defined(__e2k__) && __iset__ >= 6))19# define NO_CRC64_TABLE20#endif212223#ifdef NO_CRC64_TABLE24// No table needed. Use a typedef to avoid an empty translation unit.25typedef void lzma_crc64_dummy;2627#else28// Having the declaration here silences clang -Wmissing-variable-declarations.29extern const uint64_t lzma_crc64_table[4][256];3031# if defined(WORDS_BIGENDIAN)32# include "crc64_table_be.h"33# else34# include "crc64_table_le.h"35# endif36#endif373839