b1dca6
commit 7674695cf7e28528be7243ceb30c9a600bbaa7b5
b1dca6
Author: H.J. Lu <hjl.tools@gmail.com>
b1dca6
Date:   Thu Oct 8 08:19:15 2020 -0700
b1dca6
b1dca6
    <sys/platform/x86.h>: Add Intel UINTR support
b1dca6
    
b1dca6
    Add Intel UINTR support to <sys/platform/x86.h>.
b1dca6
b1dca6
diff --git a/manual/platform.texi b/manual/platform.texi
b1dca6
index 95b0ed0642c9f8a9..0dd12a4353a93bf2 100644
b1dca6
--- a/manual/platform.texi
b1dca6
+++ b/manual/platform.texi
b1dca6
@@ -583,6 +583,9 @@ using a TSC deadline value.
b1dca6
 @item
b1dca6
 @code{TSXLDTRK} -- TSXLDTRK instructions.
b1dca6
 
b1dca6
+@item
b1dca6
+@code{UINTR} -- User interrupts.
b1dca6
+
b1dca6
 @item
b1dca6
 @code{UMIP} -- User-mode instruction prevention.
b1dca6
 
b1dca6
diff --git a/sysdeps/x86/sys/platform/x86.h b/sysdeps/x86/sys/platform/x86.h
b1dca6
index bcc81ab5f8ac8265..2760b81a56e6c7d7 100644
b1dca6
--- a/sysdeps/x86/sys/platform/x86.h
b1dca6
+++ b/sysdeps/x86/sys/platform/x86.h
b1dca6
@@ -241,7 +241,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
b1dca6
 #define bit_cpu_AVX512_4VNNIW	(1u << 2)
b1dca6
 #define bit_cpu_AVX512_4FMAPS	(1u << 3)
b1dca6
 #define bit_cpu_FSRM		(1u << 4)
b1dca6
-#define bit_cpu_INDEX_7_EDX_5	(1u << 5)
b1dca6
+#define bit_cpu_UINTR		(1u << 5)
b1dca6
 #define bit_cpu_INDEX_7_EDX_6	(1u << 6)
b1dca6
 #define bit_cpu_INDEX_7_EDX_7	(1u << 7)
b1dca6
 #define bit_cpu_AVX512_VP2INTERSECT (1u << 8)
b1dca6
@@ -460,7 +460,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
b1dca6
 #define index_cpu_AVX512_4VNNIW COMMON_CPUID_INDEX_7
b1dca6
 #define index_cpu_AVX512_4FMAPS	COMMON_CPUID_INDEX_7
b1dca6
 #define index_cpu_FSRM		COMMON_CPUID_INDEX_7
b1dca6
-#define index_cpu_INDEX_7_EDX_5	COMMON_CPUID_INDEX_7
b1dca6
+#define index_cpu_UINTR		COMMON_CPUID_INDEX_7
b1dca6
 #define index_cpu_INDEX_7_EDX_6	COMMON_CPUID_INDEX_7
b1dca6
 #define index_cpu_INDEX_7_EDX_7	COMMON_CPUID_INDEX_7
b1dca6
 #define index_cpu_AVX512_VP2INTERSECT COMMON_CPUID_INDEX_7
b1dca6
@@ -679,7 +679,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
b1dca6
 #define reg_AVX512_4VNNIW	edx
b1dca6
 #define reg_AVX512_4FMAPS	edx
b1dca6
 #define reg_FSRM		edx
b1dca6
-#define reg_INDEX_7_EDX_5	edx
b1dca6
+#define reg_UINTR		edx
b1dca6
 #define reg_INDEX_7_EDX_6	edx
b1dca6
 #define reg_INDEX_7_EDX_7	edx
b1dca6
 #define reg_AVX512_VP2INTERSECT	edx
b1dca6
diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c
b1dca6
index 3ec94e0c9a191f36..6fa092a8c10486a0 100644
b1dca6
--- a/sysdeps/x86/tst-get-cpu-features.c
b1dca6
+++ b/sysdeps/x86/tst-get-cpu-features.c
b1dca6
@@ -180,6 +180,7 @@ do_test (void)
b1dca6
   CHECK_CPU_FEATURE (AVX512_4VNNIW);
b1dca6
   CHECK_CPU_FEATURE (AVX512_4FMAPS);
b1dca6
   CHECK_CPU_FEATURE (FSRM);
b1dca6
+  CHECK_CPU_FEATURE (UINTR);
b1dca6
   CHECK_CPU_FEATURE (AVX512_VP2INTERSECT);
b1dca6
   CHECK_CPU_FEATURE (MD_CLEAR);
b1dca6
   CHECK_CPU_FEATURE (SERIALIZE);