diff options
author | Tim Burke <tim.burke@gmail.com> | 2017-07-06 00:08:45 +0000 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2017-07-06 00:08:45 +0000 |
commit | 9b4d8bcf8dc97d7edad3dc1443b317ecb5a0a254 (patch) | |
tree | 942e95f1db79f7b7111b5f596c8c7f273d34bef2 | |
parent | 24038b3588fc02cda18159e87e213c3177d67f38 (diff) | |
download | liberasurecode-9b4d8bcf8dc97d7edad3dc1443b317ecb5a0a254.tar.gz |
Stop pretending to support SSE4-optimized CRC-32C
It isn't the CRC we want, and we never used it anyway. While we may
define INTEL_SSE41 or INTEL_SSE42 if CPU seems to support it, we've
never defined INTEL_SSE4.
Change-Id: I04e1dd6458ccde58a0a2f3f4d6947569a31e9697
Partial-Bug: 1666320
-rw-r--r-- | src/utils/chksum/crc32.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/utils/chksum/crc32.c b/src/utils/chksum/crc32.c index 6710dd7..6bc844d 100644 --- a/src/utils/chksum/crc32.c +++ b/src/utils/chksum/crc32.c @@ -42,30 +42,6 @@ #include <sys/param.h> -#if defined(INTEL_SSE4) -#include <nmmintrin.h> - -int -crc32(int crc, const void *buf, size_t size) -{ - unsigned long long *current = (unsigned long long*)buf; - unsigned char *current_char; - - crc = crc ^ ~0U; - - while(size >= 8) { - crc = _mm_crc32_u64(crc, *current++); - size -= 8; - } - - current_char = (unsigned char*)current; - while (size--) { - crc = _mm_crc32_u8(crc, *current_char++); - } - return crc ^ ~0U; -} -#else - static int crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, @@ -112,9 +88,6 @@ static int crc32_tab[] = { 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -// Use same polynomial as Intel's SSE4 instruction! -#define POLY_CRC_32 0x11EDC6F41 - int crc32(int crc, const void *buf, size_t size) { @@ -128,5 +101,3 @@ crc32(int crc, const void *buf, size_t size) return crc ^ ~0U; } -#endif - |