| 1 | /* crc32_fold_vpclmulqdq.c -- VPCMULQDQ-based CRC32 folding implementation. |
| 2 | * Copyright Wangyang Guo ([email protected]) |
| 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
| 4 | */ |
| 5 | |
| 6 | #ifdef X86_VPCLMULQDQ_CRC |
| 7 | #include "../../zbuild.h" |
| 8 | #include "../../fallback_builtins.h" |
| 9 | |
| 10 | #include <immintrin.h> |
| 11 | |
| 12 | #define ONCE(op) if (first) { first = 0; op; } |
| 13 | #define XOR_INITIAL(where) ONCE(where = _mm512_xor_si512(where, zmm_initial)) |
| 14 | |
| 15 | #include "crc32_fold_vpclmulqdq_tpl.h" |
| 16 | #define COPY |
| 17 | #include "crc32_fold_vpclmulqdq_tpl.h" |
| 18 | |
| 19 | #endif |