summaryrefslogtreecommitdiff
path: root/crc_folding.c
diff options
context:
space:
mode:
Diffstat (limited to 'crc_folding.c')
-rw-r--r--crc_folding.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crc_folding.c b/crc_folding.c
index 48d7774..ee31d49 100644
--- a/crc_folding.c
+++ b/crc_folding.c
@@ -18,6 +18,8 @@
#include "deflate.h"
+#ifdef CRC32_SIMD_SSE42_PCLMUL
+
#include <inttypes.h>
#include <emmintrin.h>
#include <immintrin.h>
@@ -283,7 +285,7 @@ ZLIB_INTERNAL void crc_fold_copy(deflate_state *const s,
goto partial;
}
- algn_diff = 0 - (uintptr_t)src & 0xF;
+ algn_diff = (0 - (uintptr_t)src) & 0xF;
if (algn_diff) {
xmm_crc_part = _mm_loadu_si128((__m128i *)src);
_mm_storeu_si128((__m128i *)dst, xmm_crc_part);
@@ -491,3 +493,5 @@ unsigned ZLIB_INTERNAL crc_fold_512to32(deflate_state *const s)
return ~crc;
CRC_SAVE(s)
}
+
+#endif /* CRC32_SIMD_SSE42_PCLMUL */