glibc/sysdeps/x86_64/fpu
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
..
multiarch x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
e_acosl.c
e_atan2l.c
e_exp2l.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp10l.S Fix exp10 inaccuracy and exceptions (bugs 13884, 13914). 2012-05-06 18:23:44 +00:00
e_expl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_fmodl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_ilogbl.S Remove useless __ilogb*_finite aliases 2012-04-18 00:40:13 +02:00
e_log2l.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log10l.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_logl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_powl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_remainderl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_scalbl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies Use x86_64 fpu/bits/fenv.h for i386 and x86_64 2012-06-06 10:13:19 -07:00
libm-test-ulps math: Add inputs that yield larger errors for float type (x86_64) 2020-03-31 21:48:54 -04:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
Makefile Revert "x86_64: Add SSE sfp-exceptions" 2020-04-20 14:56:05 -03:00
math_ldbl.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
math-tests-arch.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
math-tests-snan.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
math-use-builtins-sqrt.h x86_64: Use builtin sqrt{f,l} 2020-06-22 11:09:49 -03:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_atanl.c
s_ceill.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
s_copysign.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_copysignf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_copysignl.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
s_expm1l.S Fix x86/x86_64 expm1l inaccuracy and exceptions (bugs 13885, 13923). 2012-05-07 19:13:08 +00:00
s_fabs.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fabsf.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fabsl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_finitel.S Update. 2002-09-10 01:40:26 +00:00
s_floorl.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
s_fmax.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fmaxf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fmaxl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fmin.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fminf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fminl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fpclassifyl.c
s_isinfl.c
s_isnanl.c
s_llrint.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_llrintf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_llrintl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_log1pl.S Fix i386/x86_64 log1pl (sNaN) (bug 20229). 2016-06-08 23:11:42 +00:00
s_logbl.c
s_lrint.S lrint and llrint implementation for x86-64. 2002-04-08 08:14:22 +00:00
s_lrintf.S lrint and llrint implementation for x86-64. 2002-04-08 08:14:22 +00:00
s_lrintl.S lrint and llrint implementation for x86-64. 2002-04-08 08:14:22 +00:00
s_nearbyintl.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
s_nextafterl.c
s_nexttoward.c
s_nexttowardf.c
s_rintl.c
s_scalbnl.S Make scalbn set errno (bug 6803). 2015-09-16 21:11:00 +00:00
s_signbit.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_signbitf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_significandl.c
s_truncl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_cos2_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_cos4_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_cos4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_cos8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_exp2_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_exp4_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_exp4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_exp8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_exp_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_exp_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_log2_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_log4_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_log4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_log8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_log_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_log_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_pow2_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_pow4_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_pow4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_pow8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_pow_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_pow_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sin2_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sin4_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sin4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sin8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sincos2_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sincos4_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sincos4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_sincos8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_trig_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_trig_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_d_wrapper_impl.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_cosf4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_cosf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_cosf8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_cosf16_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_expf4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_expf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_expf8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_expf16_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_expf_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_expf_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_logf4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_logf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_logf8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_logf16_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_logf_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_logf_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_powf4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_powf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_powf8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_powf16_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_powf_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_powf_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sincosf4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sincosf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sincosf8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sincosf16_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sinf4_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sinf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sinf8_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_sinf16_core.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_trig_data.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_trig_data.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
svml_s_wrapper_impl.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-libmvec-sincos-avx2-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-double-libmvec-sincos-avx2.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-double-libmvec-sincos-avx512-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-double-libmvec-sincos-avx512.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-double-libmvec-sincos-avx-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-double-libmvec-sincos-avx.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-double-libmvec-sincos-main.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-libmvec-sincos.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-vlen2-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-vlen4-avx2-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-vlen4-avx2.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-vlen4-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-vlen4.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-vlen8-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-double-vlen8.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-libmvec-sincosf-avx2-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-float-libmvec-sincosf-avx2.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-float-libmvec-sincosf-avx512-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-float-libmvec-sincosf-avx512.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-float-libmvec-sincosf-avx-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-float-libmvec-sincosf-avx.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-float-libmvec-sincosf-main.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-libmvec-sincosf.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-vlen4-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-vlen8-avx2-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-vlen8-avx2.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-vlen8-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-vlen8.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-vlen16-wrappers.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
test-float-vlen16.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Versions Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
x86_64-math-asm.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00