2012-06-04 18:46:37 +00:00
|
|
|
@node Platform, Contributors, Maintenance, Top
|
|
|
|
@c %MENU% Describe all platform-specific facilities provided
|
|
|
|
@appendix Platform-specific facilities
|
|
|
|
|
|
|
|
@Theglibc{} can provide machine-specific functionality.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* PowerPC:: Facilities Specific to the PowerPC Architecture
|
2018-01-29 18:25:23 +00:00
|
|
|
* RISC-V:: Facilities Specific to the RISC-V Architecture
|
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-06-30 01:30:54 +00:00
|
|
|
* X86:: Facilities Specific to the X86 Architecture
|
2012-06-04 18:46:37 +00:00
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node PowerPC
|
|
|
|
@appendixsec PowerPC-specific Facilities
|
|
|
|
|
|
|
|
Facilities specific to PowerPC that are not specific to a particular
|
|
|
|
operating system are declared in @file{sys/platform/ppc.h}.
|
|
|
|
|
|
|
|
@deftypefun {uint64_t} __ppc_get_timebase (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
2012-06-04 18:46:37 +00:00
|
|
|
Read the current value of the Time Base Register.
|
|
|
|
|
|
|
|
The @dfn{Time Base Register} is a 64-bit register that stores a monotonically
|
|
|
|
incremented value updated at a system-dependent frequency that may be
|
|
|
|
different from the processor frequency. More information is available in
|
|
|
|
@cite{Power ISA 2.06b - Book II - Section 5.2}.
|
|
|
|
|
|
|
|
@code{__ppc_get_timebase} uses the processor's time base facility directly
|
|
|
|
without requiring assistance from the operating system, so it is very
|
|
|
|
efficient.
|
|
|
|
@end deftypefun
|
2012-09-25 19:48:28 +00:00
|
|
|
|
|
|
|
@deftypefun {uint64_t} __ppc_get_timebase_freq (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtunsafe{@mtuinit{}}@asunsafe{@asucorrupt{:init}}@acunsafe{@acucorrupt{:init}}}
|
|
|
|
@c __ppc_get_timebase_freq=__get_timebase_freq @mtuinit @acsfd
|
|
|
|
@c __get_clockfreq @mtuinit @asucorrupt:init @acucorrupt:init @acsfd
|
|
|
|
@c the initialization of the static timebase_freq is not exactly
|
|
|
|
@c safe, because hp_timing_t cannot be atomically set up.
|
|
|
|
@c syscall:get_tbfreq ok
|
|
|
|
@c open dup @acsfd
|
|
|
|
@c read dup ok
|
|
|
|
@c memcpy dup ok
|
|
|
|
@c memmem dup ok
|
|
|
|
@c close dup @acsfd
|
2012-09-25 19:48:28 +00:00
|
|
|
Read the current frequency at which the Time Base Register is updated.
|
|
|
|
|
|
|
|
This frequency is not related to the processor clock or the bus clock.
|
|
|
|
It is also possible that this frequency is not constant. More information is
|
|
|
|
available in @cite{Power ISA 2.06b - Book II - Section 5.2}.
|
|
|
|
@end deftypefun
|
2013-05-23 15:06:24 +00:00
|
|
|
|
|
|
|
The following functions provide hints about the usage of resources that are
|
|
|
|
shared with other processors. They can be used, for example, if a program
|
|
|
|
waiting on a lock intends to divert the shared resources to be used by other
|
|
|
|
processors. More information is available in @cite{Power ISA 2.06b - Book II -
|
|
|
|
Section 3.2}.
|
|
|
|
|
|
|
|
@deftypefun {void} __ppc_yield (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
2013-05-23 15:06:24 +00:00
|
|
|
Provide a hint that performance will probably be improved if shared resources
|
|
|
|
dedicated to the executing processor are released for use by other processors.
|
|
|
|
@end deftypefun
|
|
|
|
|
|
|
|
@deftypefun {void} __ppc_mdoio (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
2013-05-23 15:06:24 +00:00
|
|
|
Provide a hint that performance will probably be improved if shared resources
|
|
|
|
dedicated to the executing processor are released until all outstanding storage
|
|
|
|
accesses to caching-inhibited storage have been completed.
|
|
|
|
@end deftypefun
|
|
|
|
|
|
|
|
@deftypefun {void} __ppc_mdoom (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
2013-05-23 15:06:24 +00:00
|
|
|
Provide a hint that performance will probably be improved if shared resources
|
|
|
|
dedicated to the executing processor are released until all outstanding storage
|
|
|
|
accesses to cacheable storage for which the data is not in the cache have been
|
|
|
|
completed.
|
2013-05-26 16:06:30 +00:00
|
|
|
@end deftypefun
|
2013-05-24 18:29:30 +00:00
|
|
|
|
|
|
|
@deftypefun {void} __ppc_set_ppr_med (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
2013-05-24 18:29:30 +00:00
|
|
|
Set the Program Priority Register to medium value (default).
|
|
|
|
|
|
|
|
The @dfn{Program Priority Register} (PPR) is a 64-bit register that controls
|
|
|
|
the program's priority. By adjusting the PPR value the programmer may
|
|
|
|
improve system throughput by causing the system resources to be used
|
|
|
|
more efficiently, especially in contention situations.
|
|
|
|
The three unprivileged states available are covered by the functions
|
|
|
|
@code{__ppc_set_ppr_med} (medium -- default), @code{__ppc_set_ppc_low} (low)
|
|
|
|
and @code{__ppc_set_ppc_med_low} (medium low). More information
|
|
|
|
available in @cite{Power ISA 2.06b - Book II - Section 3.1}.
|
|
|
|
@end deftypefun
|
|
|
|
|
|
|
|
@deftypefun {void} __ppc_set_ppr_low (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
2013-05-24 18:29:30 +00:00
|
|
|
Set the Program Priority Register to low value.
|
|
|
|
@end deftypefun
|
|
|
|
|
|
|
|
@deftypefun {void} __ppc_set_ppr_med_low (void)
|
2014-02-01 01:40:29 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
2013-05-24 18:29:30 +00:00
|
|
|
Set the Program Priority Register to medium low value.
|
2013-05-23 15:06:24 +00:00
|
|
|
@end deftypefun
|
2015-08-10 13:58:12 +00:00
|
|
|
|
|
|
|
Power ISA 2.07 extends the priorities that can be set to the Program Priority
|
|
|
|
Register (PPR). The following functions implement the new priority levels:
|
|
|
|
very low and medium high.
|
|
|
|
|
|
|
|
@deftypefun {void} __ppc_set_ppr_very_low (void)
|
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
|
|
|
Set the Program Priority Register to very low value.
|
|
|
|
@end deftypefun
|
|
|
|
|
|
|
|
@deftypefun {void} __ppc_set_ppr_med_high (void)
|
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
|
|
|
Set the Program Priority Register to medium high value. The medium high
|
|
|
|
priority is privileged and may only be set during certain time intervals by
|
|
|
|
problem-state programs. If the program priority is medium high when the time
|
|
|
|
interval expires or if an attempt is made to set the priority to medium high
|
|
|
|
when it is not allowed, the priority is set to medium.
|
|
|
|
@end deftypefun
|
2018-01-29 18:25:23 +00:00
|
|
|
|
|
|
|
@node RISC-V
|
|
|
|
@appendixsec RISC-V-specific Facilities
|
|
|
|
|
|
|
|
Cache management facilities specific to RISC-V systems that implement the Linux
|
|
|
|
ABI are declared in @file{sys/cachectl.h}.
|
|
|
|
|
2018-02-16 16:21:47 +00:00
|
|
|
@deftypefun {void} __riscv_flush_icache (void *@var{start}, void *@var{end}, unsigned long int @var{flags})
|
2018-01-29 18:25:23 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
|
|
|
Enforce ordering between stores and instruction cache fetches. The range of
|
|
|
|
addresses over which ordering is enforced is specified by @var{start} and
|
|
|
|
@var{end}. The @var{flags} argument controls the extent of this ordering, with
|
|
|
|
the default behavior (a @var{flags} value of 0) being to enforce the fence on
|
|
|
|
all threads in the current process. Setting the
|
|
|
|
@code{SYS_RISCV_FLUSH_ICACHE_LOCAL} bit allows users to indicate that enforcing
|
|
|
|
ordering on only the current thread is necessary. All other flag bits are
|
|
|
|
reserved.
|
|
|
|
@end deftypefun
|
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-06-30 01:30:54 +00:00
|
|
|
|
|
|
|
@node X86
|
|
|
|
@appendixsec X86-specific Facilities
|
|
|
|
|
|
|
|
Facilities specific to X86 that are not specific to a particular
|
|
|
|
operating system are declared in @file{sys/platform/x86.h}.
|
|
|
|
|
2020-12-25 15:30:46 +00:00
|
|
|
@deftypefun {const struct cpuid_feature *} __x86_get_cpuid_feature_leaf (unsigned int @var{leaf})
|
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-06-30 01:30:54 +00:00
|
|
|
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
|
|
|
|
Return a pointer to x86 CPU feature structure used by query macros for x86
|
2020-12-25 15:30:46 +00:00
|
|
|
CPU feature @var{leaf}.
|
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-06-30 01:30:54 +00:00
|
|
|
@end deftypefun
|
|
|
|
|
2021-06-05 13:42:20 +00:00
|
|
|
@deftypefn Macro int CPU_FEATURE_PRESENT (@var{name})
|
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-06-30 01:30:54 +00:00
|
|
|
This macro returns a nonzero value (true) if the processor has the feature
|
|
|
|
@var{name}.
|
|
|
|
@end deftypefn
|
|
|
|
|
2021-06-05 13:42:20 +00:00
|
|
|
@deftypefn Macro int CPU_FEATURE_ACTIVE (@var{name})
|
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-06-30 01:30:54 +00:00
|
|
|
This macro returns a nonzero value (true) if the processor has the feature
|
2021-06-05 13:42:20 +00:00
|
|
|
@var{name} and the feature is active. There may be other preconditions,
|
|
|
|
like sufficient stack space or further setup for AMX, which must be
|
|
|
|
satisfied before the feature can be used.
|
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-06-30 01:30:54 +00:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
The supported processor features are:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{ACPI} -- Thermal Monitor and Software Controlled Clock Facilities.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{ADX} -- ADX instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{APIC} -- APIC On-Chip.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AES} -- The AES instruction extensions.
|
|
|
|
|
2020-09-15 12:49:27 +00:00
|
|
|
@item
|
|
|
|
@code{AESKLE} -- AES Key Locker instructions are enabled by OS.
|
|
|
|
|
2021-06-22 19:41:28 +00:00
|
|
|
@item
|
|
|
|
@code{AMD_IBPB} -- Indirect branch predictor barrier (IBPB) for AMD cpus.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AMD_IBRS} -- Indirect branch restricted speculation (IBPB) for AMD cpus.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AMD_SSBD} -- Speculative Store Bypass Disable (SSBD) for AMD cpus.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AMD_STIBP} -- Single thread indirect branch predictors (STIBP) for AMD cpus.
|
|
|
|
|
2021-07-15 11:52:44 +00:00
|
|
|
@item
|
|
|
|
@code{AMD_VIRT_SSBD} -- Speculative Store Bypass Disable (SSBD) for AMD cpus (older systems).
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{AMX_BF16} -- Tile computational operations on bfloat16 numbers.
|
|
|
|
|
2023-04-05 16:21:43 +00:00
|
|
|
@item
|
|
|
|
@code{AMX_COMPLEX} -- Tile computational operations on complex FP16 numbers.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{AMX_INT8} -- Tile computational operations on 8-bit numbers.
|
|
|
|
|
2023-04-05 16:21:38 +00:00
|
|
|
@item
|
|
|
|
@code{AMX_FP16} -- Tile computational operations on FP16 numbers.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{AMX_TILE} -- Tile architecture.
|
|
|
|
|
2023-07-26 15:20:16 +00:00
|
|
|
@item
|
|
|
|
@code{APX_F} -- The APX instruction extensions.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{ARCH_CAPABILITIES} -- IA32_ARCH_CAPABILITIES MSR.
|
|
|
|
|
2023-04-05 16:21:36 +00:00
|
|
|
@item
|
|
|
|
@code{ArchPerfmonExt} -- Architectural Performance Monitoring Extended
|
|
|
|
Leaf (EAX = 23H).
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{AVX} -- The AVX instruction extensions.
|
|
|
|
|
2023-09-20 20:44:50 +00:00
|
|
|
@item
|
|
|
|
@code{AVX10} -- The AVX10 instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX10_XMM} -- Whether AVX10 includes xmm registers.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX10_YMM} -- Whether AVX10 includes ymm registers.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX10_ZMM} -- Whether AVX10 includes zmm registers.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{AVX2} -- The AVX2 instruction extensions.
|
|
|
|
|
2023-04-05 16:21:39 +00:00
|
|
|
@item
|
|
|
|
@code{AVX_IFMA} -- The AVX-IFMA instruction extensions.
|
|
|
|
|
2023-04-05 16:21:42 +00:00
|
|
|
@item
|
|
|
|
@code{AVX_NE_CONVERT} -- The AVX-NE-CONVERT instruction extensions.
|
|
|
|
|
2020-10-08 15:33:45 +00:00
|
|
|
@item
|
|
|
|
@code{AVX_VNNI} -- The AVX-VNNI instruction extensions.
|
|
|
|
|
2023-04-05 16:21:41 +00:00
|
|
|
@item
|
|
|
|
@code{AVX_VNNI_INT8} -- The AVX-VNNI-INT8 instruction extensions.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{AVX512_4FMAPS} -- The AVX512_4FMAPS instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_4VNNIW} -- The AVX512_4VNNIW instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_BF16} -- The AVX512_BF16 instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_BITALG} -- The AVX512_BITALG instruction extensions.
|
|
|
|
|
2020-10-08 15:24:47 +00:00
|
|
|
@item
|
|
|
|
@code{AVX512_FP16} -- The AVX512_FP16 instruction extensions.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{AVX512_IFMA} -- The AVX512_IFMA instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_VBMI} -- The AVX512_VBMI instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_VBMI2} -- The AVX512_VBMI2 instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_VNNI} -- The AVX512_VNNI instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_VP2INTERSECT} -- The AVX512_VP2INTERSECT instruction
|
|
|
|
extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512_VPOPCNTDQ} -- The AVX512_VPOPCNTDQ instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512BW} -- The AVX512BW instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512CD} -- The AVX512CD instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512ER} -- The AVX512ER instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512DQ} -- The AVX512DQ instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512F} -- The AVX512F instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512PF} -- The AVX512PF instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{AVX512VL} -- The AVX512VL instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{BMI1} -- BMI1 instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{BMI2} -- BMI2 instructions.
|
|
|
|
|
2023-04-05 16:21:29 +00:00
|
|
|
@item
|
|
|
|
@code{BUS_LOCK_DETECT} -- Bus lock debug exceptions.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{CLDEMOTE} -- CLDEMOTE instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{CLFLUSHOPT} -- CLFLUSHOPT instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{CLFSH} -- CLFLUSH instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{CLWB} -- CLWB instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{CMOV} -- Conditional Move instructions.
|
|
|
|
|
2023-04-05 16:21:35 +00:00
|
|
|
@item
|
|
|
|
@code{CMPCCXADD} -- CMPccXADD instruction.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{CMPXCHG16B} -- CMPXCHG16B instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{CNXT_ID} -- L1 Context ID.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{CORE_CAPABILITIES} -- IA32_CORE_CAPABILITIES MSR.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{CX8} -- CMPXCHG8B instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{DCA} -- Data prefetch from a memory mapped device.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{DE} -- Debugging Extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{DEPR_FPU_CS_DS} -- Deprecates FPU CS and FPU DS values.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{DS} -- Debug Store.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{DS_CPL} -- CPL Qualified Debug Store.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{DTES64} -- 64-bit DS Area.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{EIST} -- Enhanced Intel SpeedStep technology.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{ENQCMD} -- Enqueue Stores instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{ERMS} -- Enhanced REP MOVSB/STOSB.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{F16C} -- 16-bit floating-point conversion instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{FMA} -- FMA extensions using YMM state.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{FMA4} -- FMA4 instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{FPU} -- X87 Floating Point Unit On-Chip.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{FSGSBASE} -- RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE instructions.
|
|
|
|
|
2020-10-08 15:50:44 +00:00
|
|
|
@item
|
|
|
|
@code{FSRCS} -- Fast Short REP CMP and SCA.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{FSRM} -- Fast Short REP MOV.
|
|
|
|
|
2020-10-08 15:50:44 +00:00
|
|
|
@item
|
|
|
|
@code{FSRS} -- Fast Short REP STO.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{FXSR} -- FXSAVE and FXRSTOR instructions.
|
|
|
|
|
2020-10-08 15:50:44 +00:00
|
|
|
@item
|
|
|
|
@code{FZLRM} -- Fast Zero-Length REP MOV.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{GFNI} -- GFNI instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{HLE} -- HLE instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{HTT} -- Max APIC IDs reserved field is Valid.
|
|
|
|
|
2020-10-08 15:38:03 +00:00
|
|
|
@item
|
|
|
|
@code{HRESET} -- History reset.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{HYBRID} -- Hybrid processor.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{IBRS_IBPB} -- Indirect branch restricted speculation (IBRS) and
|
|
|
|
the indirect branch predictor barrier (IBPB).
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{IBT} -- Intel Indirect Branch Tracking instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{INVARIANT_TSC} -- Invariant TSC.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{INVPCID} -- INVPCID instruction.
|
|
|
|
|
2020-09-15 12:49:27 +00:00
|
|
|
@item
|
|
|
|
@code{KL} -- AES Key Locker instructions.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{L1D_FLUSH} -- IA32_FLUSH_CMD MSR.
|
|
|
|
|
2023-04-05 16:21:28 +00:00
|
|
|
@item
|
|
|
|
@code{LA57} -- 57-bit linear addresses and five-level paging.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{LAHF64_SAHF64} -- LAHF/SAHF available in 64-bit mode.
|
|
|
|
|
2023-04-05 16:21:27 +00:00
|
|
|
@item
|
|
|
|
@code{LAM} -- Linear Address Masking.
|
|
|
|
|
2023-04-05 16:21:34 +00:00
|
|
|
@item
|
|
|
|
@code{LASS} -- Linear Address Space Separation.
|
|
|
|
|
2023-04-05 16:21:32 +00:00
|
|
|
@item
|
|
|
|
@code{LBR} -- Architectural LBR.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{LM} -- Long mode.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{LWP} -- Lightweight profiling.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{LZCNT} -- LZCNT instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MCA} -- Machine Check Architecture.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MCE} -- Machine Check Exception.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MD_CLEAR} -- MD_CLEAR.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MMX} -- Intel MMX Technology.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MONITOR} -- MONITOR/MWAIT instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MOVBE} -- MOVBE instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MOVDIRI} -- MOVDIRI instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MOVDIR64B} -- MOVDIR64B instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MPX} -- Intel Memory Protection Extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{MSR} -- Model Specific Registers RDMSR and WRMSR instructions.
|
|
|
|
|
2023-04-05 16:21:40 +00:00
|
|
|
@item
|
|
|
|
@code{MSRLIST} -- RDMSRLIST/WRMSRLIST instructions and IA32_BARRIER
|
|
|
|
MSR.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{MTRR} -- Memory Type Range Registers.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{NX} -- No-execute page protection.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{OSPKE} -- OS has set CR4.PKE to enable protection keys.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{OSXSAVE} -- The OS has set CR4.OSXSAVE[bit 18] to enable
|
|
|
|
XSETBV/XGETBV instructions to access XCR0 and to support processor
|
|
|
|
extended state management using XSAVE/XRSTOR.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PAE} -- Physical Address Extension.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PAGE1GB} -- 1-GByte page.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PAT} -- Page Attribute Table.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PBE} -- Pending Break Enable.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PCID} -- Process-context identifiers.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PCLMULQDQ} -- PCLMULQDQ instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PCONFIG} -- PCONFIG instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PDCM} -- Perfmon and Debug Capability.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PGE} -- Page Global Bit.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PKS} -- Protection keys for supervisor-mode pages.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PKU} -- Protection keys for user-mode pages.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{POPCNT} -- POPCNT instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PREFETCHW} -- PREFETCHW instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PREFETCHWT1} -- PREFETCHWT1 instruction.
|
|
|
|
|
2023-04-05 16:21:44 +00:00
|
|
|
@item
|
|
|
|
@code{PREFETCHI} -- PREFETCHIT0/1 instructions.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{PSE} -- Page Size Extension.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PSE_36} -- 36-Bit Page Size Extension.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{PSN} -- Processor Serial Number.
|
|
|
|
|
2021-02-04 18:39:34 +00:00
|
|
|
@item
|
|
|
|
@code{PTWRITE} -- PTWRITE instruction.
|
|
|
|
|
2023-04-05 16:21:33 +00:00
|
|
|
@item
|
|
|
|
@code{RAO_INT} -- RAO-INT instructions.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{RDPID} -- RDPID instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{RDRAND} -- RDRAND instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{RDSEED} -- RDSEED instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{RDT_A} -- Intel Resource Director Technology (Intel RDT) Allocation
|
|
|
|
capability.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{RDT_M} -- Intel Resource Director Technology (Intel RDT) Monitoring
|
|
|
|
capability.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{RDTSCP} -- RDTSCP instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{RTM} -- RTM instruction extensions.
|
|
|
|
|
2021-06-30 17:47:06 +00:00
|
|
|
@item
|
|
|
|
@code{RTM_ALWAYS_ABORT} -- Transactions always abort, making RTM unusable.
|
|
|
|
|
2023-04-05 16:21:31 +00:00
|
|
|
@item
|
|
|
|
@code{RTM_FORCE_ABORT} -- TSX_FORCE_ABORT MSR.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{SDBG} -- IA32_DEBUG_INTERFACE MSR for silicon debug.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SEP} -- SYSENTER and SYSEXIT instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SERIALIZE} -- SERIALIZE instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SGX} -- Intel Software Guard Extensions.
|
|
|
|
|
2023-04-05 16:21:30 +00:00
|
|
|
@item
|
|
|
|
@code{SGX_KEYS} -- Attestation Services for SGX.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{SGX_LC} -- SGX Launch Configuration.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SHA} -- SHA instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SHSTK} -- Intel Shadow Stack instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SMAP} -- Supervisor-Mode Access Prevention.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SMEP} -- Supervisor-Mode Execution Prevention.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SMX} -- Safer Mode Extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SS} -- Self Snoop.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSBD} -- Speculative Store Bypass Disable (SSBD).
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSE} -- Streaming SIMD Extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSE2} -- Streaming SIMD Extensions 2.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSE3} -- Streaming SIMD Extensions 3.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSE4_1} -- Streaming SIMD Extensions 4.1.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSE4_2} -- Streaming SIMD Extensions 4.2.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSE4A} -- SSE4A instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SSSE3} -- Supplemental Streaming SIMD Extensions 3.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{STIBP} -- Single thread indirect branch predictors (STIBP).
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SVM} -- Secure Virtual Machine.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{SYSCALL_SYSRET} -- SYSCALL/SYSRET instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TBM} -- Trailing bit manipulation instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TM} -- Thermal Monitor.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TM2} -- Thermal Monitor 2.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TRACE} -- Intel Processor Trace.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TSC} -- Time Stamp Counter. RDTSC instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TSC_ADJUST} -- IA32_TSC_ADJUST MSR.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TSC_DEADLINE} -- Local APIC timer supports one-shot operation
|
|
|
|
using a TSC deadline value.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{TSXLDTRK} -- TSXLDTRK instructions.
|
|
|
|
|
2020-10-08 15:19:15 +00:00
|
|
|
@item
|
|
|
|
@code{UINTR} -- User interrupts.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{UMIP} -- User-mode instruction prevention.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{VAES} -- VAES instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{VME} -- Virtual 8086 Mode Enhancements.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{VMX} -- Virtual Machine Extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{VPCLMULQDQ} -- VPCLMULQDQ instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{WAITPKG} -- WAITPKG instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{WBNOINVD} -- WBINVD/WBNOINVD instructions.
|
|
|
|
|
2020-09-15 12:49:27 +00:00
|
|
|
@item
|
|
|
|
@code{WIDE_KL} -- AES wide Key Locker instructions.
|
|
|
|
|
2023-04-05 16:21:37 +00:00
|
|
|
@item
|
|
|
|
@code{WRMSRNS} -- WRMSRNS instruction.
|
|
|
|
|
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-06-30 01:30:54 +00:00
|
|
|
@item
|
|
|
|
@code{X2APIC} -- x2APIC.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XFD} -- Extended Feature Disable (XFD).
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XGETBV_ECX_1} -- XGETBV with ECX = 1.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XOP} -- XOP instruction extensions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XSAVE} -- The XSAVE/XRSTOR processor extended states feature, the
|
|
|
|
XSETBV/XGETBV instructions, and XCR0.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XSAVEC} -- XSAVEC instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XSAVEOPT} -- XSAVEOPT instruction.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XSAVES} -- XSAVES/XRSTORS instructions.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{XTPRUPDCTRL} -- xTPR Update Control.
|
|
|
|
|
|
|
|
@end itemize
|
|
|
|
|
|
|
|
You could query if a processor supports @code{AVX} with:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#include <sys/platform/x86.h>
|
|
|
|
|
|
|
|
int
|
2021-06-05 13:42:20 +00:00
|
|
|
avx_present (void)
|
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-06-30 01:30:54 +00:00
|
|
|
@{
|
2021-06-05 13:42:20 +00:00
|
|
|
return CPU_FEATURE_PRESENT (AVX);
|
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-06-30 01:30:54 +00:00
|
|
|
@}
|
|
|
|
@end smallexample
|
|
|
|
|
2021-06-05 13:42:20 +00:00
|
|
|
and if @code{AVX} is active and may be used with:
|
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-06-30 01:30:54 +00:00
|
|
|
|
|
|
|
@smallexample
|
|
|
|
#include <sys/platform/x86.h>
|
|
|
|
|
|
|
|
int
|
2021-06-05 13:42:20 +00:00
|
|
|
avx_active (void)
|
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-06-30 01:30:54 +00:00
|
|
|
@{
|
2021-06-05 13:42:20 +00:00
|
|
|
return CPU_FEATURE_ACTIVE (AVX);
|
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-06-30 01:30:54 +00:00
|
|
|
@}
|
|
|
|
@end smallexample
|