]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
tst-audit10: Fix compilation on compilers without bit_AVX512F [BZ #19860]
authorFlorian Weimer <fweimer@redhat.com>
Fri, 25 Mar 2016 10:11:42 +0000 (11:11 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 25 Mar 2016 10:11:42 +0000 (11:11 +0100)
[BZ# 19860]
* sysdeps/x86_64/tst-audit10.c (avx512_enabled): Always return
zero if the compiler does not provide the AVX512F bit.

ChangeLog
sysdeps/x86_64/tst-audit10.c

index 1739a0f59fa83dc383b62bd9a4e7a01c8bbcccd1..609873854edf80f58278fbfd15a9d983081803ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-25  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ# 19860]
+       * sysdeps/x86_64/tst-audit10.c (avx512_enabled): Always return
+       zero if the compiler does not provide the AVX512F bit.
+
 2016-03-24  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #19848]
index a487b408bb0b009d130ccbea480ab1a34227cdfb..0df2275f59adda9671a7ecc62a5a8a4106f29601 100644 (file)
    <http://www.gnu.org/licenses/>.  */
 
 #include <cpuid.h>
-#include <cpu-features.h>
 
 int tst_audit10_aux (void);
 
 static int
 avx512_enabled (void)
 {
+#ifdef bit_AVX512F
   unsigned int eax, ebx, ecx, edx;
 
   if (__get_cpuid (1, &eax, &ebx, &ecx, &edx) == 0
@@ -38,6 +38,9 @@ avx512_enabled (void)
 
   /* Verify that ZMM, YMM and XMM states are enabled.  */
   return (eax & 0xe6) == 0xe6;
+#else
+  return 0;
+#endif
 }
 
 static int