glibc/sysdeps/x86_64/fpu
H.J. Lu 9620398097 x86: Install <sys/platform/x86.h> [BZ #26124]
Install <sys/platform/x86.h> so that programmers can do

 #if __has_include(<sys/platform/x86.h>)
 #include <sys/platform/x86.h>
 #endif
 ...

   if (CPU_FEATURE_USABLE (SSE2))
 ...
   if (CPU_FEATURE_USABLE (AVX2))
 ...

<sys/platform/x86.h> exports only:

enum
{
  COMMON_CPUID_INDEX_1 = 0,
  COMMON_CPUID_INDEX_7,
  COMMON_CPUID_INDEX_80000001,
  COMMON_CPUID_INDEX_D_ECX_1,
  COMMON_CPUID_INDEX_80000007,
  COMMON_CPUID_INDEX_80000008,
  COMMON_CPUID_INDEX_7_ECX_1,
  /* Keep the following line at the end.  */
  COMMON_CPUID_INDEX_MAX
};

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];
};

/* Get a pointer to the CPU features structure.  */
extern const struct cpu_features *__x86_get_cpu_features
  (unsigned int max) __attribute__ ((const));

Since all feature checks are done through macros, programs compiled with
a newer <sys/platform/x86.h> are compatible with the older glibc binaries
as long as the layout of struct cpu_features is identical.  The features
array can be expanded with backward binary compatibility for both .o and
.so files.  When COMMON_CPUID_INDEX_MAX is increased to support new
processor features, __x86_get_cpu_features in the older glibc binaries
returns NULL and HAS_CPU_FEATURE/CPU_FEATURE_USABLE return false on the
new processor feature.  No new symbol version is neeeded.

Both CPU_FEATURE_USABLE and HAS_CPU_FEATURE are provided.  HAS_CPU_FEATURE
can be used to identify processor features.

Note: Although GCC has __builtin_cpu_supports, it only supports a subset
of <sys/platform/x86.h> and it is equivalent to CPU_FEATURE_USABLE.  It
doesn't support HAS_CPU_FEATURE.
2020-09-11 17:20:52 -07:00
..
multiarch x86-64: Fix FMA4 detection in ifunc [BZ #26534] 2020-09-02 05:07:37 -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: Update x86_64 ulps 2020-08-08 16:43:11 -03: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: Install <sys/platform/x86.h> [BZ #26124] 2020-09-11 17:20:52 -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