Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tst-audit10: Fix compilation on compilers without bit_AVX512F [BZ #19…
…860]

	[BZ# 19860]
	* sysdeps/x86_64/tst-audit10.c (avx512_enabled): Always return
	zero if the compiler does not provide the AVX512F bit.
  • Loading branch information
Florian Weimer committed Mar 25, 2016
1 parent c898991 commit f327f5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions 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]
Expand Down
5 changes: 4 additions & 1 deletion sysdeps/x86_64/tst-audit10.c
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f327f5b

Please sign in to comment.