From f2fef657d8736c32fb600771949f59852558b11a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 14 Jul 2014 07:58:27 -0700 Subject: Enable AVX2 optimized memset only if -mavx2 works * config.h.in (HAVE_AVX2_SUPPORT): New #undef. * sysdeps/i386/configure.ac: Set HAVE_AVX2_SUPPORT and config-cflags-avx2. * sysdeps/x86_64/configure.ac: Likewise. * sysdeps/i386/configure: Regenerated. * sysdeps/x86_64/configure: Likewise. * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add memset-avx2 only if config-cflags-avx2 is yes. * sysdeps/x86_64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Tests for memset_chk and memset only if HAVE_AVX2_SUPPORT is defined. * sysdeps/x86_64/multiarch/memset.S: Define multiple versions only if HAVE_AVX2_SUPPORT is defined. * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. --- config.h.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.h.in') diff --git a/config.h.in b/config.h.in index 2dcd1351c7..97b5571a17 100644 --- a/config.h.in +++ b/config.h.in @@ -103,6 +103,9 @@ /* Define if gcc supports FMA4. */ #undef HAVE_FMA4_SUPPORT +/* Define if gcc supports AVX2. */ +#undef HAVE_AVX2_SUPPORT + /* Define if the compiler\'s exception support is based on libunwind. */ #undef HAVE_CC_WITH_LIBUNWIND -- cgit v1.2.3