This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Commit 2d63a517e4084ec80403cd9f278690fa8b676cc4
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: Igor Zamyatin <igor dot zamyatin at intel dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Fri, 14 Mar 2014 08:30:40 -0700
- Subject: Re: Commit 2d63a517e4084ec80403cd9f278690fa8b676cc4
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobNeYiMjoxQ0zTJqrZwEmMaVJV1W5nY8cyW9aA55VC5WeA at mail dot gmail dot com> <CAMe9rOoA3oEsghYtFrSxaBN8qYpKMKPpAcY8rbD6R4CgYaK+=A at mail dot gmail dot com>
On Thu, Mar 13, 2014 at 7:41 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Mar 13, 2014 at 6:57 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>> After latest commit:
>>
>> commit 2d63a517e4084ec80403cd9f278690fa8b676cc4
>> Author: Igor Zamyatin <igor.zamyatin@intel.com>
>> Date: Thu Mar 13 11:10:22 2014 -0700
>>
>> Save and restore AVX-512 zmm registers to x86-64 ld.so
>> ...
>>
>> "make check" fails like this for me:
>>
>>
>> /tmp/ccJEXrrY.s: Assembler messages:
>> /tmp/ccJEXrrY.s:47: Error: no such instruction: `vmovdqa64 %zmm0,-176(%rbp)'
>> /tmp/ccJEXrrY.s:51: Error: bad register name `%zmm0'
>> /tmp/ccJEXrrY.s:57: Error: no such instruction: `vmovdqa64 %zmm1,-240(%rbp)'
>> /tmp/ccJEXrrY.s:58: Error: no such instruction: `vmovdqa64 %zmm2,-304(%rbp)'
>> /tmp/ccJEXrrY.s:59: Error: no such instruction: `vmovdqa64 %zmm3,-368(%rbp)'
>> /tmp/ccJEXrrY.s:60: Error: no such instruction: `vmovdqa64 %zmm4,-432(%rbp)'
>> /tmp/ccJEXrrY.s:61: Error: no such instruction: `vmovdqa64 %zmm5,-496(%rbp)'
>> /tmp/ccJEXrrY.s:62: Error: no such instruction: `vmovdqa64 %zmm6,-560(%rbp)'
>> /tmp/ccJEXrrY.s:63: Error: no such instruction: `vmovdqa64 %zmm7,-624(%rbp)'
>> /tmp/ccJEXrrY.s:65: Error: no such instruction: `vmovdqa64 %zmm0,-112(%rbp)'
>> /tmp/ccJEXrrY.s:84: Error: bad register name `%zmm0'
>> /tmp/ccJEXrrY.s:90: Error: no such instruction: `vmovdqa64 %zmm0,-112(%rbp)'
>> ...
>> make[2]: *** [/build/elf/tst-auditmod10a.os] Error 1
>>
>>
>> Likely my binutils/as are too old. Should this test be conditional?
>
> You have GCC 4.9 and a very old binutils. We didn't test this combination.
I am testing this patch. It checks AVX-512 assembler support first and
sets libc_cv_cc_avx512 to $libc_cv_asm_avx512, instead of yes. GCC
won't support AVX-512 if assembler doesn't support it. I will check it
in if all tests pass. Sorry for the inconvenience.
Thanks.
--
H.J.
--
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 5e5d61b..d34f9a8 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -23,15 +23,6 @@ if test $libc_cv_cc_avx = yes; then
fi
LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx])
-dnl Check if -mavx512f works.
-AC_CACHE_CHECK(for AVX512 support, libc_cv_cc_avx512, [dnl
-LIBC_TRY_CC_OPTION([-mavx512f], [libc_cv_cc_avx512=yes],
[libc_cv_cc_avx512=no])
-])
-if test $libc_cv_cc_avx512 = yes; then
- AC_DEFINE(HAVE_AVX512_SUPPORT)
-fi
-LIBC_CONFIG_VAR([config-cflags-avx512], [$libc_cv_cc_avx512])
-
dnl Check if asm supports AVX512.
AC_CACHE_CHECK(for AVX512 support in assembler, libc_cv_asm_avx512, [dnl
cat > conftest.s <<\EOF
@@ -47,6 +38,15 @@ if test $libc_cv_asm_avx512 == yes; then
AC_DEFINE(HAVE_AVX512_ASM_SUPPORT)
fi
+dnl Check if -mavx512f works.
+AC_CACHE_CHECK(for AVX512 support, libc_cv_cc_avx512, [dnl
+LIBC_TRY_CC_OPTION([-mavx512f],
[libc_cv_cc_avx512=$libc_cv_asm_avx512], [libc_cv_cc_avx512=no])
+])
+if test $libc_cv_cc_avx512 = yes; then
+ AC_DEFINE(HAVE_AVX512_SUPPORT)
+fi
+LIBC_CONFIG_VAR([config-cflags-avx512], [$libc_cv_cc_avx512])
+
dnl Check if -msse2avx works.
AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
LIBC_TRY_CC_OPTION([-msse2avx],