about summary refs log tree commit diff
path: root/sysdeps/x86/tst-get-cpu-features.c
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2023-09-20 15:44:50 -0500
committerNoah Goldstein <goldstein.w.n@gmail.com>2023-09-29 14:18:42 -0500
commitd90b43a4ed475dac5b0cd6e01ceb35c7b0f7f2ff (patch)
tree0015cc47ecb9affe00f1d8afbebf4a5c16d20e25 /sysdeps/x86/tst-get-cpu-features.c
parent5f913506f4bf4785f9cf2c2ac8d17dc9f877ff17 (diff)
downloadglibc-d90b43a4ed475dac5b0cd6e01ceb35c7b0f7f2ff.tar.gz
glibc-d90b43a4ed475dac5b0cd6e01ceb35c7b0f7f2ff.tar.xz
glibc-d90b43a4ed475dac5b0cd6e01ceb35c7b0f7f2ff.zip
x86: Add support for AVX10 preset and vec size in cpu-features
This commit add support for the new AVX10 cpu features:
https://cdrdv2-public.intel.com/784267/355989-intel-avx10-spec.pdf

We add checks for:
    - `AVX10`: Check if AVX10 is present.
    - `AVX10_{X,Y,Z}MM`: Check if a given vec class has AVX10 support.

`make check` passes and cpuid output was checked against GNR/DMR on an
emulator.
Diffstat (limited to 'sysdeps/x86/tst-get-cpu-features.c')
-rw-r--r--sysdeps/x86/tst-get-cpu-features.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c
index b27fa7324a..44edd18df2 100644
--- a/sysdeps/x86/tst-get-cpu-features.c
+++ b/sysdeps/x86/tst-get-cpu-features.c
@@ -219,6 +219,7 @@ do_test (void)
   CHECK_CPU_FEATURE_PRESENT (AVX_NE_CONVERT);
   CHECK_CPU_FEATURE_PRESENT (AMX_COMPLEX);
   CHECK_CPU_FEATURE_PRESENT (PREFETCHI);
+  CHECK_CPU_FEATURE_PRESENT (AVX10);
   CHECK_CPU_FEATURE_PRESENT (APX_F);
   CHECK_CPU_FEATURE_PRESENT (AESKLE);
   CHECK_CPU_FEATURE_PRESENT (WIDE_KL);
@@ -391,11 +392,18 @@ do_test (void)
   CHECK_CPU_FEATURE_ACTIVE (AVX_NE_CONVERT);
   CHECK_CPU_FEATURE_ACTIVE (AMX_COMPLEX);
   CHECK_CPU_FEATURE_ACTIVE (PREFETCHI);
+  CHECK_CPU_FEATURE_ACTIVE (AVX10);
   CHECK_CPU_FEATURE_ACTIVE (APX_F);
   CHECK_CPU_FEATURE_ACTIVE (AESKLE);
   CHECK_CPU_FEATURE_ACTIVE (WIDE_KL);
   CHECK_CPU_FEATURE_ACTIVE (PTWRITE);
 
+  if (CPU_FEATURE_ACTIVE (AVX10))
+    {
+      CHECK_CPU_FEATURE_ACTIVE (AVX10_XMM);
+      CHECK_CPU_FEATURE_ACTIVE (AVX10_YMM);
+      CHECK_CPU_FEATURE_ACTIVE (AVX10_ZMM);
+    }
   return 0;
 }