Commit 6f173e52 by Richard Henderson Committed by Richard Henderson

re PR bootstrap/45376 (no such instruction: `pcmpestri $0,(%rdi),%xmm0')

        PR bootstrap/45376
        * configure.ac (HAVE_SSE4): New check.
        * configure, config.in: Rebuild.
        * lex.c (search_line_sse42): Omit if !HAVE_SSE4.

From-SVN: r163528
parent 8a5b8538
2010-08-24 Richard Henderson <rth@redhat.com>
PR bootstrap/45376
* configure.ac (HAVE_SSE4): New check.
* configure, config.in: Rebuild.
* lex.c (search_line_sse42): Omit if !HAVE_SSE4.
2010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer
......
...@@ -185,6 +185,9 @@ ...@@ -185,6 +185,9 @@
/* Define to 1 if you have the `putc_unlocked' function. */ /* Define to 1 if you have the `putc_unlocked' function. */
#undef HAVE_PUTC_UNLOCKED #undef HAVE_PUTC_UNLOCKED
/* Define to 1 if you can assemble SSE4 insns. */
#undef HAVE_SSE4
/* Define to 1 if you have the <stddef.h> header file. */ /* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H #undef HAVE_STDDEF_H
......
...@@ -7209,6 +7209,27 @@ cat >>confdefs.h <<_ACEOF ...@@ -7209,6 +7209,27 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
case $target in
i?86-* | x86_64-*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
asm ("pcmpestri %0, %%xmm0, %%xmm1" : : "i"(0))
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
$as_echo "#define HAVE_SSE4 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
# Output. # Output.
ac_config_headers="$ac_config_headers config.h:config.in" ac_config_headers="$ac_config_headers config.h:config.in"
......
...@@ -184,6 +184,13 @@ AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int, ...@@ -184,6 +184,13 @@ AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
[Define to the widest efficient host integer type at least [Define to the widest efficient host integer type at least
as wide as the target's size_t type.]) as wide as the target's size_t type.])
case $target in
i?86-* | x86_64-*)
AC_TRY_COMPILE([], [asm ("pcmpestri %0, %%xmm0, %%xmm1" : : "i"(0))],
[AC_DEFINE([HAVE_SSE4], [1],
[Define to 1 if you can assemble SSE4 insns.])])
esac
# Output. # Output.
AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1]) AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
......
...@@ -410,6 +410,7 @@ search_line_sse2 (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) ...@@ -410,6 +410,7 @@ search_line_sse2 (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
return (const uchar *)p + found; return (const uchar *)p + found;
} }
#ifdef HAVE_SSE4
/* A version of the fast scanner using SSE 4.2 vectorized string insns. */ /* A version of the fast scanner using SSE 4.2 vectorized string insns. */
static const uchar * static const uchar *
...@@ -464,6 +465,11 @@ search_line_sse42 (const uchar *s, const uchar *end) ...@@ -464,6 +465,11 @@ search_line_sse42 (const uchar *s, const uchar *end)
return s + index; return s + index;
} }
#else
/* Work around out-dated assemblers without sse4 support. */
#define search_line_sse42 search_line_sse2
#endif
/* Check the CPU capabilities. */ /* Check the CPU capabilities. */
#include "../gcc/config/i386/cpuid.h" #include "../gcc/config/i386/cpuid.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment