Always include intrin.h if available

This commit is contained in:
Frank Denis 2017-02-28 17:58:50 +01:00
parent 9eea164007
commit e5a196a8ee
3 changed files with 6 additions and 3 deletions

View File

@ -453,7 +453,7 @@ AC_SUBST(CFLAGS_AVX2)
AC_SUBST(CFLAGS_AESNI)
AC_SUBST(CFLAGS_PCLMUL)
AC_CHECK_HEADERS([sys/mman.h])
AC_CHECK_HEADERS([sys/mman.h intrin.h])
dnl Checks for typedefs, structures, and compiler characteristics.

View File

@ -225,6 +225,9 @@ sodium__mm_set1_epi64x(int64_t q)
return _mm_set_epi64x(q, q);
}
# endif
#elif defined(HAVE_INTRIN_H)
# include <intrin.h>
#endif
#endif

View File

@ -3,8 +3,8 @@
#ifdef HAVE_ANDROID_GETCPUFEATURES
# include <cpu-features.h>
#endif
#if (defined(_MSC_VER) && \
(defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))) || defined(HAVE__XGETBV)
#if defined(HAVE_INTRIN_H) || (defined(_MSC_VER) && \
(defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
# include <intrin.h>
#endif