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 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
__longjmp_cancel.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
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 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
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 x86: Cleanup cpu-features-offsets.sym 2018-08-03 06:42:09 -07:00
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 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-hwcap.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
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 Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
elide.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
float128-abi.h Add float128 support for x86_64, x86. 2017-06-26 22:02:24 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
hp-timing.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
init-arch.h x86: Remove __ASSEMBLER__ check in init-arch.h 2020-07-11 10:03:05 -07:00
jmp_buf-ssp.sym x86: Support shadow stack pointer in setjmp/longjmp 2018-07-14 05:59:53 -07:00
ldsodefs.h x86: Move CET control to _dl_x86_feature_control [BZ #25887] 2020-05-18 06:15:02 -07:00
libc-start.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-start.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
link_map.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
longjmp.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makeconfig Add _Float64x function aliases. 2017-11-27 14:16:47 +00:00
Makefile x86: Remove the unused __x86_prefetchw 2020-07-11 09:34:03 -07:00
string_private.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tininess.h Use sysdeps/x86/tininess.h for i386 and x86_64 2012-10-30 20:38:31 -07:00
tst-cet-legacy-1.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-1a.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-2.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-2a.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-3.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-4.c x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397] 2020-03-18 04:35:54 -07:00
tst-cet-legacy-4a.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4b.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4c.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-5.c x86: Add --enable-cet=permissive 2020-05-18 08:38:53 -07:00
tst-cet-legacy-5a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-5b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-6.c x86: Add --enable-cet=permissive 2020-05-18 08:38:53 -07:00
tst-cet-legacy-6a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-6b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-7.c x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397] 2020-03-18 04:35:54 -07:00
tst-cet-legacy-8.c x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397] 2020-03-18 04:35:54 -07:00
tst-cet-legacy-mod-1.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-mod-2.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-mod-4.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-mod-5.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-mod-5a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-5b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-5c.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-mod-6.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-mod-6a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-6b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-6c.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-cet-legacy-mod-6d.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -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 x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
Versions Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00