From 58ece21d07e4f4d0a826db5b055262e3fa28968c Mon Sep 17 00:00:00 2001 From: "Jonathan M. Henson" Date: Tue, 23 Jan 2024 12:22:03 -0800 Subject: [PATCH] non-standard intrinsics headers? --- source/intel/intrin/crc32c_sse42_avx512.c | 4 ++++ source/intel/intrin/crc64xz_clmul.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/intel/intrin/crc32c_sse42_avx512.c b/source/intel/intrin/crc32c_sse42_avx512.c index f626ae9..44cc72c 100644 --- a/source/intel/intrin/crc32c_sse42_avx512.c +++ b/source/intel/intrin/crc32c_sse42_avx512.c @@ -13,6 +13,8 @@ #include #include +#if defined(AWS_HAVE_AVX512_INTRINSICS) && (INTPTR_MAX == INT64_MAX) + AWS_ALIGNED_TYPEDEF(const uint64_t, zalign_8, 64); AWS_ALIGNED_TYPEDEF(const uint64_t, zalign_2, 16); @@ -149,3 +151,5 @@ uint32_t aws_checksums_crc32c_avx512(const uint8_t *input, int length, uint32_t val = _mm_crc32_u64(0, _mm_extract_epi64(a1, 0)); return (uint32_t)_mm_crc32_u64(val, _mm_extract_epi64(a1, 1)); } + +#endif /* #if defined(AWS_HAVE_AVX512_INTRINSICS) && (INTPTR_MAX == INT64_MAX) */ \ No newline at end of file diff --git a/source/intel/intrin/crc64xz_clmul.c b/source/intel/intrin/crc64xz_clmul.c index 743b37f..a9554ff 100644 --- a/source/intel/intrin/crc64xz_clmul.c +++ b/source/intel/intrin/crc64xz_clmul.c @@ -7,8 +7,11 @@ #if defined(AWS_HAVE_CLMUL) && INTPTR_MAX == INT64_MAX +#ifndef(_MSC_VER) # include - +#else +# include +#endif # define load_xmm(ptr) _mm_loadu_si128((const __m128i *)(const void *)(ptr)) # define left_shift_bytes(xmm, count) \ _mm_shuffle_epi8((xmm), load_xmm(aws_checksums_masks_shifts[1] - (intptr_t)(count)))