From e1c8f1d01f4a4e2136173edab2dc63c71ef038f4 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Fri, 25 Jul 2014 20:57:20 +0300 Subject: liblzma: Add lzma_memcmplen() for fast memory comparison. This commit just adds the function. Its uses will be in separate commits. This hasn't been tested much yet and it's perhaps a bit early to commit it but if there are bugs they should get found quite quickly. Thanks to Jun I Jin from Intel for help and for pointing out that string comparison needs to be optimized in liblzma. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6787f827..2df67970 100644 --- a/configure.ac +++ b/configure.ac @@ -560,6 +560,7 @@ echo "Initializing gettext:" AM_GNU_GETTEXT_VERSION([0.18]) AM_GNU_GETTEXT([external]) + ############################################################################### # Checks for header files. ############################################################################### @@ -573,6 +574,9 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h], [], [AC_MSG_ERROR([Required header file(s) are missing.])]) +# This allows the use of the intrinsic functions if they are available. +AC_CHECK_HEADERS([immintrin.h]) + ############################################################################### # Checks for typedefs, structures, and compiler characteristics. @@ -681,6 +685,15 @@ AM_CONDITIONAL([COND_INTERNAL_SHA256], && test "x$ac_cv_func_SHA256Init" != xyes \ && test "x$ac_cv_func_CC_SHA256_Init" != xyes]) +# Check for SSE2 intrinsics. +AC_CHECK_DECL([_mm_movemask_epi8], + [AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1], + [Define to 1 if _mm_movemask_epi8 is available.])], + [], +[#ifdef HAVE_IMMINTRIN_H +#include +#endif]) + ############################################################################### # If using GCC, set some additional AM_CFLAGS: -- cgit v1.2.3