about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-03-25 11:11:42 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-05-09 11:56:20 +0200
commit4cf055a2a331b7361622dc9ac8993b59c6f0ef59 (patch)
tree9fc86e933d4f3efb6b1a7b4d6bc95e049cbd4d1a
parentd603d94994a1d326ebc9e93c8be892acc834a114 (diff)
downloadglibc-4cf055a2a331b7361622dc9ac8993b59c6f0ef59.tar.gz
glibc-4cf055a2a331b7361622dc9ac8993b59c6f0ef59.tar.xz
glibc-4cf055a2a331b7361622dc9ac8993b59c6f0ef59.zip
tst-audit10: Fix compilation on compilers without bit_AVX512F [BZ #19860]
	[BZ# 19860]
	* sysdeps/x86_64/tst-audit10.c (avx512_enabled): Always return
	zero if the compiler does not provide the AVX512F bit.

(cherry picked from commit f327f5b47be57bc05a4077344b381016c1bb2c11)
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/x86_64/tst-audit10.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fdbb92e973..39eeca2325 100644
--- 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-08  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/x86_64/tst-audit10.c: #include <cpu-features.h>.
diff --git a/sysdeps/x86_64/tst-audit10.c b/sysdeps/x86_64/tst-audit10.c
index a487b408bb..0df2275f59 100644
--- a/sysdeps/x86_64/tst-audit10.c
+++ b/sysdeps/x86_64/tst-audit10.c
@@ -17,13 +17,13 @@
    <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