glibc/sysdeps/x86
H.J. Lu c22e4c2a14 x86: Extend CPUID support in struct cpu_features
Extend CPUID support for all feature bits from CPUID.  Add a new macro,
CPU_FEATURE_USABLE, which can be used to check if a feature is usable at
run-time, instead of HAS_CPU_FEATURE and HAS_ARCH_FEATURE.

Add COMMON_CPUID_INDEX_D_ECX_1, COMMON_CPUID_INDEX_80000007 and
COMMON_CPUID_INDEX_80000008 to check CPU feature bits in them.

Tested on i686 and x86-64 as well as using build-many-glibcs.py with
x86 targets.

	* sysdeps/x86/cacheinfo.c (intel_check_word): Updated for
	cpu_features_basic.
	(__cache_sysconf): Likewise.
	(init_cacheinfo): Likewise.
	* sysdeps/x86/cpu-features.c (get_extended_indeces): Also
	populate COMMON_CPUID_INDEX_80000007 and
	COMMON_CPUID_INDEX_80000008.
	(get_common_indices): Also populate COMMON_CPUID_INDEX_D_ECX_1.
	Use CPU_FEATURES_CPU_P (cpu_features, XSAVEC) to check if
	XSAVEC is available.  Set the bit_arch_XXX_Usable bits.
	(init_cpu_features): Use _Static_assert on
	index_arch_Fast_Unaligned_Load.
	__get_cpuid_registers and __get_arch_feature.  Updated for
	cpu_features_basic.  Set stepping in cpu_features.
	* sysdeps/x86/cpu-features.h: (FEATURE_INDEX_1): Changed to enum.
	(FEATURE_INDEX_2): New.
	(FEATURE_INDEX_MAX): Changed to enum.
	(COMMON_CPUID_INDEX_D_ECX_1): New.
	(COMMON_CPUID_INDEX_80000007): Likewise.
	(COMMON_CPUID_INDEX_80000008): Likewise.
	(cpuid_registers): Likewise.
	(cpu_features_basic): Likewise.
	(CPU_FEATURE_USABLE): Likewise.
	(bit_arch_XXX_Usable): Likewise.
	(cpu_features): Use cpuid_registers and cpu_features_basic.
	(bit_arch_XXX): Reweritten.
	(bit_cpu_XXX): Likewise.
	(index_cpu_XXX): Likewise.
	(reg_XXX): Likewise.
	* sysdeps/x86/tst-get-cpu-features.c: Include <stdio.h> and
	<support/check.h>.
	(CHECK_CPU_FEATURE): New.
	(CHECK_CPU_FEATURE_USABLE): Likewise.
	(cpu_kinds): Likewise.
	(do_test): Print vendor, family, model and stepping.  Check
	HAS_CPU_FEATURE and CPU_FEATURE_USABLE.
	(TEST_FUNCTION): Removed.
	Include <support/test-driver.c> instead of
	"../../test-skeleton.c".
	* sysdeps/x86_64/multiarch/sched_cpucount.c (__sched_cpucount):
	Check POPCNT instead of POPCOUNT.
	* sysdeps/x86_64/multiarch/test-multiarch.c (do_test): Likewise.
2018-12-03 05:54:56 -08:00
..
bits
fpu Use round functions not __round functions in glibc libm. 2018-09-27 12:35:23 +00:00
nptl
__longjmp_cancel.S
cacheinfo.c x86: Extend CPUID support in struct cpu_features 2018-12-03 05:54:56 -08:00
cet-tunables.h
check-cet.awk
configure
configure.ac
cpu-features-offsets.sym
cpu-features.c x86: Extend CPUID support in struct cpu_features 2018-12-03 05:54:56 -08:00
cpu-features.h x86: Extend CPUID support in struct cpu_features 2018-12-03 05:54:56 -08:00
cpu-tunables.c
dl-cet.c
dl-get-cpu-features.c
dl-hwcap.h
dl-procinfo.c
dl-procinfo.h
dl-procruntime.c
dl-prop.h Check multiple NT_GNU_PROPERTY_TYPE_0 notes [BZ #23509] 2018-11-08 10:07:10 -08:00
dl-tunables.list
elide.h
float128-abi.h
fpu_control.h
hp-timing.h x86: Support RDTSCP for benchtests 2018-10-24 02:19:34 -07:00
init-arch.h x86: Use _rdtsc intrinsic for HP_TIMING_NOW 2018-10-17 15:16:45 -07:00
jmp_buf-ssp.sym
ldsodefs.h
libc-start.c
libc-start.h
link_map.h Check multiple NT_GNU_PROPERTY_TYPE_0 notes [BZ #23509] 2018-11-08 10:07:10 -08:00
linkmap.h
longjmp.c
Makeconfig
Makefile x86/CET: Add a re-exec test with legacy bitmap 2018-11-23 07:31:07 -08:00
string_private.h
sysdep.h
tininess.h
tst-cet-legacy-1.c
tst-cet-legacy-1a.c x86/CET: Add a re-exec test with legacy bitmap 2018-11-23 07:31:07 -08:00
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-mod-1.c
tst-cet-legacy-mod-2.c
tst-cet-legacy-mod-4.c
tst-get-cpu-features-static.c
tst-get-cpu-features.c x86: Extend CPUID support in struct cpu_features 2018-12-03 05:54:56 -08:00
Versions