Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
crc_x86_clmul.h File Reference

CRC32 and CRC64 implementations using CLMUL instructions. More...

#include <immintrin.h>

Go to the source code of this file.

Macros

#define LZMA_CRC_X86_CLMUL_H
 
#define crc_attr_target
 
#define MASK_L(in, mask, r)
 
#define MASK_H(in, mask, r)
 
#define MASK_LH(in, mask, low, high)
 

Detailed Description

CRC32 and CRC64 implementations using CLMUL instructions.

The CRC32 and CRC64 implementations use 32/64-bit x86 SSSE3, SSE4.1, and CLMUL instructions. This is compatible with Elbrus 2000 (E2K) too.

They were derived from https://www.researchgate.net/publication/263424619_Fast_CRC_computation and the public domain code from https://github.com/rawrunprotected/crc (URLs were checked on 2023-10-14).

While this file has both CRC32 and CRC64 implementations, only one should be built at a time to ensure that crc_simd_body() is inlined even with compilers with which lzma_always_inline expands to plain inline. The version to build is selected by defining BUILDING_CRC32_CLMUL or BUILDING_CRC64_CLMUL before including this file.

FIXME: Builds for 32-bit x86 use the assembly .S files by default unless configured with –disable-assembler. Even then the lookup table isn't omitted in crc64_table.c since it doesn't know that assembly code has been disabled.

Macro Definition Documentation

◆ crc_attr_target

#define crc_attr_target

◆ LZMA_CRC_X86_CLMUL_H

#define LZMA_CRC_X86_CLMUL_H

◆ MASK_H

#define MASK_H ( in,
mask,
r )
Value:
r = _mm_shuffle_epi8(in, _mm_xor_si128(mask, vsign))

◆ MASK_L

#define MASK_L ( in,
mask,
r )
Value:
r = _mm_shuffle_epi8(in, mask)

◆ MASK_LH

#define MASK_LH ( in,
mask,
low,
high )
Value:
MASK_L(in, mask, low); \
MASK_H(in, mask, high)
#define MASK_L(in, mask, r)
Definition crc_x86_clmul.h:62