glibc/sysdeps/x86
Carlos O'Donell b3d17c1cf2 Bug 20689: Fix FMA and AVX2 detection on Intel
In the Intel Architecture Instruction Set Extensions Programming
reference the recommended way to test for FMA in section
'2.2.1 Detection of FMA' is:

"Application Software must identify that hardware supports AVX as
explained in ... after that it must also detect support for FMA..."

We don't do that in glibc. We use osxsave to detect the use of xgetbv,
and after that we check for AVX and FMA orthogonally. It is conceivable
that you could have the AVX bit clear and the FMA bit in an undefined
state.

This commit fixes FMA and AVX2 detection to depend on usable AVX
as required by the recommended Intel sequences.

v1: https://www.sourceware.org/ml/libc-alpha/2016-10/msg00241.html
v2: https://www.sourceware.org/ml/libc-alpha/2016-10/msg00265.html
2016-10-17 19:39:54 -04:00
..
bits Avoid array-bounds warning for strncat on i586 (bug 20260) 2016-06-29 17:15:40 +02:00
fpu Add iseqsig. 2016-10-06 22:19:38 +00:00
Makefile Remove x86 ifunc-defines.sym and rtld-global-offsets.sym 2016-05-11 05:51:39 -07:00
Versions Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
cacheinfo.c X86: Don't assert on older Intel CPUs [BZ #20647] 2016-10-12 08:22:52 -07:00
cpu-features-offsets.sym Remove x86 ifunc-defines.sym and rtld-global-offsets.sym 2016-05-11 05:51:39 -07:00
cpu-features.c Bug 20689: Fix FMA and AVX2 detection on Intel 2016-10-17 19:39:54 -04:00
cpu-features.h X86-64: Add _dl_runtime_resolve_avx[512]_{opt|slow} [BZ #20508] 2016-09-06 08:51:07 -07:00
dl-get-cpu-features.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
elide.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
init-arch.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc-start.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
string_private.h Add _STRING_INLINE_unaligned and string_private.h 2016-02-18 14:55:29 -02:00
tininess.h Use sysdeps/x86/tininess.h for i386 and x86_64 2012-10-30 20:38:31 -07:00
tst-get-cpu-features-static.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
tst-get-cpu-features.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00