Skip to content

Commit

Permalink
non-standard intrinsics headers?
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHenson committed Jan 23, 2024
1 parent 7b63f06 commit 58ece21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions source/intel/intrin/crc32c_sse42_avx512.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <smmintrin.h>
#include <wmmintrin.h>

#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);

Expand Down Expand Up @@ -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) */
5 changes: 4 additions & 1 deletion source/intel/intrin/crc64xz_clmul.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@

#if defined(AWS_HAVE_CLMUL) && INTPTR_MAX == INT64_MAX

#ifndef(_MSC_VER)
# include <x86intrin.h>

#else
# include <immintrin.h>
#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)))
Expand Down

0 comments on commit 58ece21

Please sign in to comment.