aclocal-fallback/glib-2.0.m4 \
aclocal-fallback/gtk-2.0.m4 \
aclocal-fallback/gtk-3.0.m4 \
+ aclocal-fallback/ax_check_compile_flag.m4 \
+ aclocal-fallback/ax_gcc_x86_cpuid.m4 \
+ aclocal-fallback/ax_ext.m4 \
+ aclocal-fallback/ax_gcc_x86_avx_xgetbv.m4 \
aclocal-flags \
adns_dll.dep \
adns_dll.rc \
#endif
/* to use define _ws_mempbrk_sse42 if available (checked with cpuinfo) */
-#define HAVE_SSE42 1
\ No newline at end of file
+#define HAVE_SSE4_2 1
\ No newline at end of file
AC_PROG_MKDIR_P
AC_WIRESHARK_CLANG_CHECK
+# Find supported SIMD extensions by requesting cpuid. When an SIMD
+# extension is found, the -m"simdextensionname" is added to SIMD_FLAGS
+# (only if compilator support it) (ie : if "sse2" is available "-msse2" is
+# added to SIMD_FLAGS)
+AX_EXT
+
dnl Work around libtool bug (fixed in the version 1.5a?)
AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
AC_LIBTOOL_DLOPEN
libwsutil_sse42_la_SOURCES = \
ws_mempbrk_sse42.c
-libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) -msse4.2
+libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) $(SIMD_FLAGS)
EXTRA_libwsutil_la_SOURCES= \
inet_aton.c \
#include <glib.h>
#include "ws_symbol_export.h"
-#ifdef HAVE_SSE42
+#ifdef HAVE_SSE4_2
#include "ws_cpuid.h"
#endif
#include "ws_mempbrk.h"
WS_DLL_PUBLIC const guint8 *
ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles)
{
-#ifdef HAVE_SSE42
+#ifdef HAVE_SSE4_2
static int have_sse42 = -1;
#endif
if (*needles == 0)
return NULL;
-#ifdef HAVE_SSE42
+#ifdef HAVE_SSE4_2
if G_UNLIKELY(have_sse42 < 0)
have_sse42 = ws_cpuid_sse42();
WS_DLL_PUBLIC const guint8 *ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles);
-#ifdef HAVE_SSE42
+#ifdef HAVE_SSE4_2
const char *_ws_mempbrk_sse42(const char* haystack, size_t haystacklen, const char *needles);
#endif
#include "config.h"
-#ifdef HAVE_SSE42
+#ifdef HAVE_SSE4_2
#include <glib.h>
return _ws_mempbrk(aligned, slen, a);
}
-#endif /* HAVE_SSE42 */
+#endif /* HAVE_SSE4_2 */
/*
* Editor modelines
*