]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Only build the SSSE3 tests on machines whose assemblers know about
authorJulian Seward <jseward@acm.org>
Sat, 9 Feb 2008 12:07:40 +0000 (12:07 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 9 Feb 2008 12:07:40 +0000 (12:07 +0000)
these instructions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7387

configure.in
none/tests/amd64/Makefile.am
none/tests/x86/Makefile.am

index ba3944b576bd9bf904e8dbc20ec68cdd15359c30..dff6a7b2e6bbc8b388ec40d98bae9b20a69135f2 100644 (file)
@@ -832,6 +832,28 @@ AC_MSG_RESULT([no])
 AM_CONDITIONAL(BUILD_SSE3_TESTS, test x$ac_have_as_sse3 = xyes)
 
 
+# Ditto for SSSE3 instructions (note extra S)
+# Note, this doesn't generate a C-level symbol.  It generates a
+# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
+
+AC_TRY_COMPILE(, [
+  do { long long int x; 
+   __asm__ __volatile__(
+      "pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
+  while (0)
+],
+[
+ac_have_as_ssse3=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_ssse3=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
+
+
 # Check for TLS support in the compiler and linker
 AC_CACHE_CHECK([for TLS support], vg_cv_tls,
               [AC_ARG_ENABLE(tls, [  --enable-tls            platform supports TLS],
index ca92455f45aadd6725d7eb1736c07907fbbe96e6..9ca0b442a7f9dc0da32a8af1cef6b9daf9067969 100644 (file)
@@ -7,6 +7,9 @@ INSN_TESTS = insn_basic insn_mmx insn_sse insn_sse2 insn_fpu
 if BUILD_SSE3_TESTS
  INSN_TESTS += insn_sse3 insn_ssse3
 endif
+if BUILD_SSSE3_TESTS
+ INSN_TESTS += insn_ssse3 ssse3_misaligned
+endif
 
 # Explicitly include insn_sse3 even if ! BUILD_SSE3_TESTS, 
 # to avoid packaging screwups if 'make dist' is run on a machine
@@ -48,7 +51,7 @@ check_PROGRAMS = \
        faultstatus fcmovnu fxtract $(INSN_TESTS) looper jrcxz \
        rcl-amd64 \
        redundantRexW \
-       smc1 shrld ssse3_misaligned \
+       smc1 shrld \
        nibz_bennee_mmap \
        slahf-amd64
 
index 6c08f9f6219eb7d8474ed58f43cc2f7813bee312..4767b708026d6ec398f94f1664a41bdd43080d34 100644 (file)
@@ -5,7 +5,10 @@ CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
 INSN_TESTS = insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext \
                insn_sse insn_sse2
 if BUILD_SSE3_TESTS
- INSN_TESTS += insn_sse3 insn_ssse3
+ INSN_TESTS += insn_sse3
+endif
+if BUILD_SSSE3_TESTS
+ INSN_TESTS += insn_ssse3 ssse3_misaligned
 endif
 
 # Explicitly include insn_sse3 even if ! BUILD_SSE3_TESTS, 
@@ -61,7 +64,7 @@ check_PROGRAMS = \
        getseg incdec_alt $(INSN_TESTS) \
        jcxz \
        lahf looper movx int pushpopseg sbbmisc \
-       seg_override sigcontext smc1 ssse3_misaligned yield
+       seg_override sigcontext smc1 yield
 
 AM_CFLAGS    = $(WERROR) -Winline -Wall -Wshadow \
                @FLAG_M32@ -g -I$(top_srcdir)/include \