about summary refs log tree commit diff
path: root/sysdeps/x86/tst-get-cpu-features.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-02-04 10:39:34 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-02-07 08:01:14 -0800
commit5ab25c88758810269607a066fcac399e29863510 (patch)
treefff85c2b2b481b413d71872bd5753f870557d89a /sysdeps/x86/tst-get-cpu-features.c
parentc3479fb7939898ec22c655c383454d6e8b982a67 (diff)
downloadglibc-5ab25c88758810269607a066fcac399e29863510.tar.gz
glibc-5ab25c88758810269607a066fcac399e29863510.tar.xz
glibc-5ab25c88758810269607a066fcac399e29863510.zip
x86: Add PTWRITE feature detection [BZ #27346]
1. Add CPUID_INDEX_14_ECX_0 for CPUID leaf 0x14 to detect PTWRITE feature
in EBX of CPUID leaf 0x14 with ECX == 0.
2. Add PTWRITE detection to CPU feature tests.
3. Add 2 static CPU feature tests.
Diffstat (limited to 'sysdeps/x86/tst-get-cpu-features.c')
-rw-r--r--sysdeps/x86/tst-get-cpu-features.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c
index b5e7f6e7b0..583e1e6d49 100644
--- a/sysdeps/x86/tst-get-cpu-features.c
+++ b/sysdeps/x86/tst-get-cpu-features.c
@@ -203,6 +203,7 @@ do_test (void)
   CHECK_CPU_FEATURE (LAM);
   CHECK_CPU_FEATURE (AESKLE);
   CHECK_CPU_FEATURE (WIDE_KL);
+  CHECK_CPU_FEATURE (PTWRITE);
 
   printf ("Usable CPU features:\n");
   CHECK_CPU_FEATURE_USABLE (SSE3);
@@ -364,6 +365,7 @@ do_test (void)
   CHECK_CPU_FEATURE_USABLE (FSRCS);
   CHECK_CPU_FEATURE_USABLE (AESKLE);
   CHECK_CPU_FEATURE_USABLE (WIDE_KL);
+  CHECK_CPU_FEATURE_USABLE (PTWRITE);
 
   return 0;
 }