summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorsewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2010-09-28 19:59:47 +0000
committersewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2010-09-28 19:59:47 +0000
commite3ae8a3c0768f7fe0d2627e6f889bff3c4c053ec (patch)
tree4c7c7964c5f55ba0061ac8217a22ef59a85c7052 /configure.in
parent6586493ebad047585abb11174152ad349a1ec4c8 (diff)
Test cases for amd64 PCLMULDQ (Emmanuel Thome, Emmanuel.Thome@gmail.com).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11389 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 424a4047..667ca243 100644
--- a/configure.in
+++ b/configure.in
@@ -1410,6 +1410,28 @@ AC_MSG_RESULT([no])
AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
+# Note: we're really checking the assembler-level support, not gcc's ;
+# C-level code might require the flag -mpclmul be passed to gcc (e.g. to
+# compile code which uses wmmintrin.h). Doesn't matter since tests also
+# use inline assembly directly
+AC_MSG_CHECKING([if x86/amd64 assembler supports 'pclmulqdq'])
+AC_TRY_COMPILE(, [
+ do {
+ __asm__ __volatile__(
+ "pclmulqdq \$17,%%xmm6,%%xmm7" : : : "xmm6", "xmm7" ); }
+ while (0)
+],
+[
+ac_have_as_pclmulqdq=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_pclmulqdq=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_PCLMULQDQ_TESTS, test x$ac_have_as_pclmulqdq = xyes)
+
+
AC_MSG_CHECKING([if x86/amd64 assembler supports 'lzcnt'])
AC_TRY_COMPILE([], [