|
From: <sv...@va...> - 2013-09-30 16:33:05
|
Author: florian
Date: Mon Sep 30 16:32:53 2013
New Revision: 13587
Log:
Check whether binutils supports TSX instructions.
Guard none/tests/amd64/tm1 accordingly.
Modified:
trunk/configure.ac
trunk/none/tests/amd64/Makefile.am
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Sep 30 16:32:53 2013
@@ -1997,6 +1997,28 @@
AM_CONDITIONAL(BUILD_AVX2_TESTS, test x$ac_have_as_avx2 = xyes)
+# does the x86/amd64 assembler understand TSX instructions?
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_TSX_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler speaks TSX])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ do {
+ __asm__ __volatile__(
+ " xbegin Lfoo \n\t"
+ "Lfoo: xend \n\t");
+ } while (0)
+]])], [
+ac_have_as_tsx=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_tsx=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_TSX_TESTS, test x$ac_have_as_tsx = xyes)
+
+
# does the x86/amd64 assembler understand BMI1 and BMI2 instructions?
# Note, this doesn't generate a C-level symbol. It generates a
# automake-level symbol (BUILD_BMI_TESTS), used in test Makefile.am's
Modified: trunk/none/tests/amd64/Makefile.am
==============================================================================
--- trunk/none/tests/amd64/Makefile.am (original)
+++ trunk/none/tests/amd64/Makefile.am Mon Sep 30 16:32:53 2013
@@ -114,7 +114,10 @@
endif
endif
if BUILD_AVX2_TESTS
- check_PROGRAMS += avx2-1 tm1
+ check_PROGRAMS += avx2-1
+endif
+if BUILD_TSX_TESTS
+ check_PROGRAMS += tm1
endif
if BUILD_BMI_TESTS
check_PROGRAMS += bmi
|