glibc/sysdeps/i386/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
..
doasin.c Update. 2001-03-12 00:04:52 +00:00
e_acos.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_acosf.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_acosh.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_acoshf.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_acoshl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_acosl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_asin.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_asinf.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atan2.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atan2f.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atan2l.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atanh.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atanhf.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atanhl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp2.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp2l.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp10.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_exp_data.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
e_exp.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_expl.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_fmod.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_fmodf.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_fmodl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_hypot.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_hypotf.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_ilogb.S Remove useless __ilogb*_finite aliases 2012-04-18 00:40:13 +02:00
e_ilogbf.S Remove useless __ilogb*_finite aliases 2012-04-18 00:40:13 +02:00
e_ilogbl.S Remove useless __ilogb*_finite aliases 2012-04-18 00:40:13 +02:00
e_log2_data.c Add new log2 implementation 2018-09-12 17:36:33 +01:00
e_log2.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log2l.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log10.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log10f.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_log_data.c Add new log implementation 2018-09-12 17:33:30 +01:00
e_log.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_pow_log_data.c Add new pow implementation 2018-09-19 10:04:51 +01:00
e_pow.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_remainder.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_remainderf.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_scalb.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_scalbf.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
e_sqrt.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_sqrtf.S Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
fclrexcpt.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fedisblxcpt.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
feenablxcpt.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fegetenv.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fegetmode.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
feholdexcpt.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fesetenv.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fesetexcept.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fesetmode.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fesetround.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
feupdateenv.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fgetexcptflg.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fsetexcptflg.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ftestexcept.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
i386-math-asm.h 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 Update i686 libm-test-ulps 2020-07-09 23:43:25 -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
math_err.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
math-tests-snan.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
mpatan2.c Update. 2001-03-12 00:04:52 +00:00
mpatan.c Update. 2001-03-12 00:04:52 +00:00
mpsqrt.c Update. 2001-03-12 00:04:52 +00:00
s_asinh.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_asinhf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_asinhl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_atan.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_atanf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_atanl.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
s_cbrt.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_cbrtf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_cbrtl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_ceil.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_ceilf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_ceill.S Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +00:00
s_copysign.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_copysignf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_copysignl.S Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +00:00
s_expm1.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_expm1f.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +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_f32xaddf64.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_f32xdivf64.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_f32xmulf64.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_f32xsubf64.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fabs.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_fabsf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_fabsl.S Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +00:00
s_fdim.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_finite.S Update. 2002-09-10 01:40:26 +00:00
s_finitef.S Update. 2002-09-10 01:40:26 +00:00
s_finitel.S Update. 2002-09-10 01:40:26 +00:00
s_floor.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_floorf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_floorl.S Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +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 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_frexp.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_frexpf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_frexpl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_isinfl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_isnanl.c Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
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_log1p.S Refactor i386 libm code forcing underflow exceptions. 2015-09-24 21:41:00 +00:00
s_log1pf.S Refactor i386 libm code forcing underflow exceptions. 2015-09-24 21:41:00 +00:00
s_log1pl.S Fix i386/x86_64 log1pl (sNaN) (bug 20229). 2016-06-08 23:11:42 +00:00
s_logb.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_logbf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_logbl.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
s_lrint.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_lrintf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_lrintl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_nearbyint.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_nearbyintf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_nearbyintl.S Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +00:00
s_nextafterl.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nexttoward.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nexttowardf.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_remquo.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_remquof.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_remquol.S Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +00:00
s_rint.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_rintf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_rintl.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
s_scalbln.c Update. 1999-07-14 00:54:57 +00:00
s_scalblnf.c Update. 1999-07-14 00:54:57 +00:00
s_scalblnl.c Update. 1999-07-14 00:54:57 +00:00
s_scalbn.S Avoid excess range in results from i386 scalb functions (bug 18981). 2015-09-18 20:34:59 +00:00
s_scalbnf.S Avoid excess range in results from i386 scalb functions (bug 18981). 2015-09-18 20:34:59 +00:00
s_scalbnl.S Make scalbn set errno (bug 6803). 2015-09-16 21:11:00 +00:00
s_significand.S Update. 1999-07-14 00:54:57 +00:00
s_significandf.S Update. 1999-07-14 00:54:57 +00:00
s_significandl.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
s_trunc.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_truncf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_truncl.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Versions Update. 2000-06-14 00:55:24 +00:00
w_exp2.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_exp.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_log2.c Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
w_log.c Remove the error handling wrapper from log 2018-11-21 09:56:27 +00:00
w_pow.c Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
w_sqrt_compat.c Add support for sqrt asm redirects 2018-03-15 19:21:35 +00:00
w_sqrt.c Add support for sqrt asm redirects 2018-03-15 19:21:35 +00:00