1 /* crc32_simd.h 2 * 3 * Copyright 2017 The Chromium Authors. All rights reserved. 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the Chromium source repository LICENSE file. 6 */ 7 8 #include <stdint.h> 9 10 #include "zconf.h" 11 #include "zutil.h" 12 #include "deflate.h" 13 14 /* 15 * crc32_sse42_simd_(): compute the crc32 of the buffer, where the buffer 16 * length must be at least 64, and a multiple of 16. 17 */ 18 uint32_t ZLIB_INTERNAL crc32_sse42_simd_( 19 const unsigned char *buf, 20 z_size_t len, 21 uint32_t crc); 22 23 /* 24 * crc32_sse42_simd_ buffer size constraints: see the use in zlib/crc32.c 25 * for computing the crc32 of an arbitrary length buffer. 26 */ 27 #define Z_CRC32_SSE42_MINIMUM_LENGTH 64 28 #define Z_CRC32_SSE42_CHUNKSIZE_MASK 15 29 30 /* 31 * CRC32 checksums using ARMv8-a crypto instructions. 32 */ 33 uint32_t ZLIB_INTERNAL armv8_crc32_little(unsigned long crc, 34 const unsigned char* buf, 35 z_size_t len); 36 37