[11/19] <sys/platform/x86.h>: Add ArchPerfmonExt support
Commit Message
Add Architectural Performance Monitoring Extended Leaf (EAX = 23H)
support to <sys/platform/x86.h>.
---
manual/platform.texi | 4 ++++
sysdeps/x86/bits/platform/x86.h | 1 +
sysdeps/x86/tst-get-cpu-features.c | 1 +
3 files changed, 6 insertions(+)
Comments
On Wed, Apr 5, 2023 at 11:26 AM H.J. Lu via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Add Architectural Performance Monitoring Extended Leaf (EAX = 23H)
> support to <sys/platform/x86.h>.
> ---
> manual/platform.texi | 4 ++++
> sysdeps/x86/bits/platform/x86.h | 1 +
> sysdeps/x86/tst-get-cpu-features.c | 1 +
> 3 files changed, 6 insertions(+)
>
> diff --git a/manual/platform.texi b/manual/platform.texi
> index e4d2c00886..ecee3a7b39 100644
> --- a/manual/platform.texi
> +++ b/manual/platform.texi
> @@ -206,6 +206,10 @@ The supported processor features are:
> @item
> @code{ARCH_CAPABILITIES} -- IA32_ARCH_CAPABILITIES MSR.
>
> +@item
> +@code{ArchPerfmonExt} -- Architectural Performance Monitoring Extended
> +Leaf (EAX = 23H).
> +
> @item
> @code{AVX} -- The AVX instruction extensions.
>
> diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platform/x86.h
> index 0187964aba..74b7f951e1 100644
> --- a/sysdeps/x86/bits/platform/x86.h
> +++ b/sysdeps/x86/bits/platform/x86.h
> @@ -293,6 +293,7 @@ enum
> x86_cpu_AVX512_BF16 = x86_cpu_index_7_ecx_1_eax + 5,
> x86_cpu_LASS = x86_cpu_index_7_ecx_1_eax + 6,
> x86_cpu_CMPCCXADD = x86_cpu_index_7_ecx_1_eax + 7,
> + x86_cpu_ArchPerfmonExt = x86_cpu_index_7_ecx_1_eax + 8,
> x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10,
> x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11,
> x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12,
> diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c
> index d8bc92560f..329d4aafb4 100644
> --- a/sysdeps/x86/tst-get-cpu-features.c
> +++ b/sysdeps/x86/tst-get-cpu-features.c
> @@ -205,6 +205,7 @@ do_test (void)
> CHECK_CPU_FEATURE_PRESENT (AVX512_BF16);
> CHECK_CPU_FEATURE_PRESENT (LASS);
> CHECK_CPU_FEATURE_PRESENT (CMPCCXADD);
> + CHECK_CPU_FEATURE_PRESENT (ArchPerfmonExt);
> CHECK_CPU_FEATURE_PRESENT (FZLRM);
> CHECK_CPU_FEATURE_PRESENT (FSRS);
> CHECK_CPU_FEATURE_PRESENT (FSRCS);
> --
> 2.39.2
>
LGTM
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
@@ -206,6 +206,10 @@ The supported processor features are:
@item
@code{ARCH_CAPABILITIES} -- IA32_ARCH_CAPABILITIES MSR.
+@item
+@code{ArchPerfmonExt} -- Architectural Performance Monitoring Extended
+Leaf (EAX = 23H).
+
@item
@code{AVX} -- The AVX instruction extensions.
@@ -293,6 +293,7 @@ enum
x86_cpu_AVX512_BF16 = x86_cpu_index_7_ecx_1_eax + 5,
x86_cpu_LASS = x86_cpu_index_7_ecx_1_eax + 6,
x86_cpu_CMPCCXADD = x86_cpu_index_7_ecx_1_eax + 7,
+ x86_cpu_ArchPerfmonExt = x86_cpu_index_7_ecx_1_eax + 8,
x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10,
x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11,
x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12,
@@ -205,6 +205,7 @@ do_test (void)
CHECK_CPU_FEATURE_PRESENT (AVX512_BF16);
CHECK_CPU_FEATURE_PRESENT (LASS);
CHECK_CPU_FEATURE_PRESENT (CMPCCXADD);
+ CHECK_CPU_FEATURE_PRESENT (ArchPerfmonExt);
CHECK_CPU_FEATURE_PRESENT (FZLRM);
CHECK_CPU_FEATURE_PRESENT (FSRS);
CHECK_CPU_FEATURE_PRESENT (FSRCS);