2007-12-08 22:42:33 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
/// \file crc64_table.c
|
|
|
|
/// \brief Precalculated CRC64 table with correct endianness
|
|
|
|
//
|
2009-04-13 08:27:40 +00:00
|
|
|
// Author: Lasse Collin
|
2007-12-08 22:42:33 +00:00
|
|
|
//
|
2009-04-13 08:27:40 +00:00
|
|
|
// This file has been put into the public domain.
|
|
|
|
// You can do whatever you want with this file.
|
2007-12-08 22:42:33 +00:00
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2008-04-25 10:58:56 +00:00
|
|
|
#include "common.h"
|
2007-12-08 22:42:33 +00:00
|
|
|
|
2022-11-14 19:34:57 +00:00
|
|
|
|
|
|
|
// FIXME: Compared to crc64_fast.c 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)
|
2023-09-26 18:47:13 +00:00
|
|
|
// No table needed. Use a typedef to avoid an empty translation unit.
|
2023-09-26 16:02:11 +00:00
|
|
|
typedef void lzma_crc64_dummy;
|
2022-11-14 19:34:57 +00:00
|
|
|
|
|
|
|
#else
|
2019-06-24 20:45:21 +00:00
|
|
|
// Having the declaration here silences clang -Wmissing-variable-declarations.
|
|
|
|
extern const uint64_t lzma_crc64_table[4][256];
|
|
|
|
|
2022-11-14 19:34:57 +00:00
|
|
|
# if defined(WORDS_BIGENDIAN)
|
|
|
|
# include "crc64_table_be.h"
|
|
|
|
# else
|
|
|
|
# include "crc64_table_le.h"
|
|
|
|
# endif
|
2007-12-08 22:42:33 +00:00
|
|
|
#endif
|