glibc/sysdeps/x86_64/multiarch
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
..
Makefile x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
bcopy.S
ifunc-avx2.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ifunc-impl-list.c x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
ifunc-memcmp.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ifunc-memmove.h x86-64: Check Prefer_FSRM in ifunc-memmove.h 2018-05-21 16:54:59 -07:00
ifunc-memset.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ifunc-sse4_2.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ifunc-strcasecmp.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ifunc-unaligned-ssse3.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ifunc-wmemset.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memchr-avx2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memchr-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memchr.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
memcmp-avx2-movbe.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcmp-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcmp-sse4.S x86-64: Use _CET_NOTRACK in memcmp-sse4.S 2018-07-18 08:07:32 -07:00
memcmp-ssse3.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcmp.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
memcpy-ssse3-back.S x86-64: Use _CET_NOTRACK in memcpy-ssse3-back.S 2018-07-18 06:38:23 -07:00
memcpy-ssse3.S x86-64: Use _CET_NOTRACK in memcpy-ssse3.S 2018-07-18 06:39:46 -07:00
memcpy.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcpy_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove-avx-unaligned-erms.S X86-64: Use non-temporal store in memcpy on large data 2016-04-12 08:10:47 -07:00
memmove-avx512-no-vzeroupper.S Don't write beyond destination in __mempcpy_avx512_no_vzeroupper (bug 23196) 2018-05-23 09:50:57 +02:00
memmove-avx512-unaligned-erms.S Require binutils 2.24 to build x86-64 glibc [BZ #20139] 2016-07-01 06:03:05 -07:00
memmove-sse2-unaligned-erms.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove-ssse3-back.S
memmove-ssse3.S
memmove-vec-unaligned-erms.S x86-64: Skip zero length in __mem[pcpy|move|set]_erms 2018-05-23 11:25:42 -07:00
memmove.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mempcpy.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
mempcpy_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mempcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memrchr-avx2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memrchr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset-avx2-unaligned-erms.S x86-64: Optimize wmemset with SSE2/AVX2/AVX512 2017-06-05 11:09:59 -07:00
memset-avx512-no-vzeroupper.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset-avx512-unaligned-erms.S x86-64: Optimize wmemset with SSE2/AVX2/AVX512 2017-06-05 11:09:59 -07:00
memset-sse2-unaligned-erms.S x86: Don't include <init-arch.h> in assembly codes 2018-08-03 08:05:00 -07:00
memset-vec-unaligned-erms.S x86-64: Skip zero length in __mem[pcpy|move|set]_erms 2018-05-23 11:25:42 -07:00
memset.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
memset_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
rawmemchr-avx2.S x86-64: Optimize memchr/rawmemchr/wmemchr with SSE2/AVX2 2017-06-09 05:13:31 -07:00
rawmemchr-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
rawmemchr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sched_cpucount.c x86: Extend CPUID support in struct cpu_features 2018-12-03 05:54:56 -08:00
stpcpy-sse2-unaligned.S
stpcpy-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stpcpy-ssse3.S
stpcpy.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
stpncpy-c.c x86-64: Implement strcpy family IFUNC selectors in C 2017-06-12 09:06:09 -07:00
stpncpy-sse2-unaligned.S
stpncpy-ssse3.S
stpncpy.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcasecmp.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcasecmp_l-avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcasecmp_l-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcasecmp_l-sse4_2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcasecmp_l-ssse3.S
strcasecmp_l.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcat-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcat-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcat-ssse3.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcat.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strchr-avx2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchr-sse2-no-bsf.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchr-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchr.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strchrnul-avx2.S x86-64: Optimize strchr/strchrnul/wcschr with AVX2 2017-06-09 05:42:29 -07:00
strchrnul-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchrnul.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcmp-avx2.S x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
strcmp-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcmp-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcmp-sse4_2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcmp-sse42.S x86-64: Use _CET_NOTRACK in strcmp-sse42.S 2018-07-18 06:37:09 -07:00
strcmp-ssse3.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcmp.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strcpy-sse2-unaligned.S x86-64: Use _CET_NOTRACK in strcpy-sse2-unaligned.S 2018-07-18 06:33:06 -07:00
strcpy-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcpy.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strcspn-c.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcspn-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcspn.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strlen-avx2.S x86-64: Remove the unnecessary testl in strlen-avx2.S 2018-05-14 03:41:35 -07:00
strlen-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strlen.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strncase.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncase_l-avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncase_l-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncase_l-sse4_2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncase_l-ssse3.S
strncase_l.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncat-c.c x86-64: Use IFUNC strncat inside libc.so 2018-05-16 09:04:35 -07:00
strncat-sse2-unaligned.S
strncat-ssse3.S
strncat.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strncmp-avx2.S x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
strncmp-sse2.S x86: Make strncmp usable from rtld 2018-06-12 15:00:33 +02:00
strncmp-sse4_2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncmp-ssse3.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncmp.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strncpy-c.c x86-64: Implement strcpy family IFUNC selectors in C 2017-06-12 09:06:09 -07:00
strncpy-sse2-unaligned.S
strncpy-ssse3.S
strncpy.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strnlen-avx2.S x86-64: Optimize strlen/strnlen/wcslen/wcsnlen with AVX2 2017-06-09 05:18:18 -07:00
strnlen-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strnlen.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strpbrk-c.c x86-64: Implement strcspn/strpbrk/strspn IFUNC selectors in C 2017-06-15 08:59:05 -07:00
strpbrk-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strpbrk.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strrchr-avx2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strrchr.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strspn-c.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strspn-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strspn.c Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
strstr-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strstr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-multiarch.c x86: Extend CPUID support in struct cpu_features 2018-12-03 05:54:56 -08:00
varshift.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
varshift.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcschr-avx2.S x86-64: Optimize strchr/strchrnul/wcschr with AVX2 2017-06-09 05:42:29 -07:00
wcschr-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcschr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcscmp-avx2.S x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
wcscmp-sse2.S x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
wcscmp.c x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
wcscpy-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcscpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcscpy.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcslen-avx2.S x86-64: Optimize strlen/strnlen/wcslen/wcsnlen with AVX2 2017-06-09 05:18:18 -07:00
wcslen-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcslen.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcsncmp-avx2.S x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
wcsncmp-sse2.c x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
wcsncmp.c x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 2018-06-01 16:32:43 -05:00
wcsnlen-avx2.S x86-64: Optimize strlen/strnlen/wcslen/wcsnlen with AVX2 2017-06-09 05:18:18 -07:00
wcsnlen-c.c x86-64: Move wcsnlen.S to multiarch/wcsnlen-sse4_1.S 2017-06-06 06:12:32 -07:00
wcsnlen-sse4_1.S x86-64: Move wcsnlen.S to multiarch/wcsnlen-sse4_1.S 2017-06-06 06:12:32 -07:00
wcsnlen.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcsrchr-avx2.S x86-64: Optimize strrchr/wcsrchr with AVX2 2017-06-09 05:45:52 -07:00
wcsrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcsrchr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemchr-avx2.S x86-64: Optimize memchr/rawmemchr/wmemchr with SSE2/AVX2 2017-06-09 05:13:31 -07:00
wmemchr-sse2.S x86-64: Optimize memchr/rawmemchr/wmemchr with SSE2/AVX2 2017-06-09 05:13:31 -07:00
wmemchr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemcmp-avx2-movbe.S x86-64: Optimize memcmp/wmemcmp with AVX2 and MOVBE 2017-06-05 12:52:55 -07:00
wmemcmp-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wmemcmp-sse4.S
wmemcmp-ssse3.S
wmemcmp.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemset.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemset_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemset_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00