chromium/third_party/zlib/crc_folding.c

/*
 * Compute the CRC32 using a parallelized folding approach with the PCLMULQDQ
 * instruction.
 *
 * A white paper describing this algorithm can be found at:
 * http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf
 *
 * Copyright (C) 2013 Intel Corporation. All rights reserved.
 * Authors:
 * 	Wajdi Feghali   <[email protected]>
 * 	Jim Guilford    <[email protected]>
 * 	Vinodh Gopal    <[email protected]>
 * 	Erdinc Ozturk   <[email protected]>
 * 	Jim Kukunas     <[email protected]>
 *
 * For conditions of distribution and use, see copyright notice in zlib.h
 */

#include "deflate.h"

#ifdef CRC32_SIMD_SSE42_PCLMUL

#include <inttypes.h>
#include <emmintrin.h>
#include <immintrin.h>
#include <wmmintrin.h>

#define CRC_LOAD(s)

#define CRC_SAVE(s)

ZLIB_INTERNAL void crc_fold_init(deflate_state *const s)
{}

local void fold_1(deflate_state *const s,
        __m128i *xmm_crc0, __m128i *xmm_crc1,
        __m128i *xmm_crc2, __m128i *xmm_crc3)
{}

local void fold_2(deflate_state *const s,
        __m128i *xmm_crc0, __m128i *xmm_crc1,
        __m128i *xmm_crc2, __m128i *xmm_crc3)
{}

local void fold_3(deflate_state *const s,
        __m128i *xmm_crc0, __m128i *xmm_crc1,
        __m128i *xmm_crc2, __m128i *xmm_crc3)
{}

local void fold_4(deflate_state *const s,
        __m128i *xmm_crc0, __m128i *xmm_crc1,
        __m128i *xmm_crc2, __m128i *xmm_crc3)
{}

local const unsigned zalign(32) pshufb_shf_table[60] =;

local void partial_fold(deflate_state *const s, const size_t len,
        __m128i *xmm_crc0, __m128i *xmm_crc1,
        __m128i *xmm_crc2, __m128i *xmm_crc3,
        __m128i *xmm_crc_part)
{}

ZLIB_INTERNAL void crc_fold_copy(deflate_state *const s,
        unsigned char *dst, const unsigned char *src, long len)
{}

local const unsigned zalign(16) crc_k[] =;

local const unsigned zalign(16) crc_mask[4] =;

local const unsigned zalign(16) crc_mask2[4] =;

unsigned ZLIB_INTERNAL crc_fold_512to32(deflate_state *const s)
{}

#endif  /* CRC32_SIMD_SSE42_PCLMUL */