glibc/sysdeps/x86
H.J. Lu 107e6a3c22 x86: Support usable check for all CPU features
Support usable check for all CPU features with the following changes:

1. Change struct cpu_features to

struct cpuid_features
{
  struct cpuid_registers cpuid;
  struct cpuid_registers usable;
};

struct cpu_features
{
  struct cpu_features_basic basic;
  struct cpuid_features features[COMMON_CPUID_INDEX_MAX];
  unsigned int preferred[PREFERRED_FEATURE_INDEX_MAX];
...
};

so that there is a usable bit for each cpuid bit.
2. After the cpuid bits have been initialized, copy the known bits to the
usable bits.  EAX/EBX from INDEX_1 and EAX from INDEX_7 aren't used for
CPU feature detection.
3. Clear the usable bits which require OS support.
4. If the feature is supported by OS, copy its cpuid bit to its usable
bit.
5. Replace HAS_CPU_FEATURE and CPU_FEATURES_CPU_P with CPU_FEATURE_USABLE
and CPU_FEATURE_USABLE_P to check if a feature is usable.
6. Add DEPR_FPU_CS_DS for INDEX_7_EBX_13.
7. Unset MPX feature since it has been deprecated.

The results are

1. If the feature is known and doesn't requre OS support, its usable bit
is copied from the cpuid bit.
2. Otherwise, its usable bit is copied from the cpuid bit only if the
feature is known to supported by OS.
3. CPU_FEATURE_USABLE/CPU_FEATURE_USABLE_P are used to check if the
feature can be used.
4. HAS_CPU_FEATURE/CPU_FEATURE_CPU_P are used to check if CPU supports
the feature.
2020-07-13 06:05:16 -07:00
..
bits semaphore: consolidate arch headers into a generic one 2020-05-06 13:07:12 -07:00
fpu i386: Use builtin sqrtl 2020-06-22 11:09:49 -03:00
nptl
__longjmp_cancel.S
atomic-machine.h
cacheinfo.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
cet-control.h x86: Move CET control to _dl_x86_feature_control [BZ #25887] 2020-05-18 06:15:02 -07:00
check-cet.awk
configure x86: Add --enable-cet=permissive 2020-05-18 08:38:53 -07:00
configure.ac x86: Add --enable-cet=permissive 2020-05-18 08:38:53 -07:00
cpu-features-offsets.sym
cpu-features.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
cpu-features.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
cpu-tunables.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
dl-cet.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
dl-get-cpu-features.c
dl-hwcap.h
dl-lookupcfg.h
dl-procinfo.c
dl-procinfo.h
dl-procruntime.c x86: Add --enable-cet=permissive 2020-05-18 08:38:53 -07:00
dl-prop.h rtld: Clean up PT_NOTE and add PT_GNU_PROPERTY handling 2020-07-08 14:28:53 +01:00
dl-tunables.list x86: Add thresholds for "rep movsb/stosb" to tunables 2020-07-06 11:48:42 -07:00
elf-initfini.h
elide.h
float128-abi.h
fpu_control.h
hp-timing.h
init-arch.h x86: Remove __ASSEMBLER__ check in init-arch.h 2020-07-11 10:03:05 -07:00
jmp_buf-ssp.sym
ldsodefs.h x86: Move CET control to _dl_x86_feature_control [BZ #25887] 2020-05-18 06:15:02 -07:00
libc-start.c
libc-start.h
link_map.h
linkmap.h
longjmp.c
Makeconfig
Makefile x86: Remove the unused __x86_prefetchw 2020-07-11 09:34:03 -07:00
string_private.h
sysdep.h
tininess.h
tst-cet-legacy-1.c
tst-cet-legacy-1a.c
tst-cet-legacy-2.c
tst-cet-legacy-2a.c
tst-cet-legacy-3.c
tst-cet-legacy-4.c
tst-cet-legacy-4a.c
tst-cet-legacy-4b.c
tst-cet-legacy-4c.c
tst-cet-legacy-5.c x86: Add --enable-cet=permissive 2020-05-18 08:38:53 -07:00
tst-cet-legacy-5a.c
tst-cet-legacy-5b.c
tst-cet-legacy-6.c x86: Add --enable-cet=permissive 2020-05-18 08:38:53 -07:00
tst-cet-legacy-6a.c
tst-cet-legacy-6b.c
tst-cet-legacy-7.c
tst-cet-legacy-8.c
tst-cet-legacy-mod-1.c
tst-cet-legacy-mod-2.c
tst-cet-legacy-mod-4.c
tst-cet-legacy-mod-5.c
tst-cet-legacy-mod-5a.c
tst-cet-legacy-mod-5b.c
tst-cet-legacy-mod-5c.c
tst-cet-legacy-mod-6.c
tst-cet-legacy-mod-6a.c
tst-cet-legacy-mod-6b.c
tst-cet-legacy-mod-6c.c
tst-cet-legacy-mod-6d.c
tst-get-cpu-features-static.c
tst-get-cpu-features.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
Versions