Skip to contentSkip to conversation

x86: add AVX512_VPOPCNTDQ features

PATCH Applied He Chen 2 participants 2 messages Jan 13, 2017

lore
Share & tools
lore

He Chen

author
#0 lore raw

PATCH v2 1/1 x86: add AVX512_VPOPCNTDQ features

AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords. variable precision.

---
Changes from v1:
* Rename vpopcntdq to avx512-vpopcntdq.

---
 target/i386/cpu.c | 2 +-
 target/i386/cpu.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
target/i386/cpu.c +1 -1
index b0640f1..1a4b164 100644
@@ -435,7 +435,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
             NULL, "avx512vbmi", "umip", "pku",
             "ospke", NULL, NULL, NULL,
             NULL, NULL, NULL, NULL,
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "avx512-vpopcntdq", NULL,
             "la57", NULL, NULL, NULL,
             NULL, NULL, "rdpid", NULL,
             NULL, NULL, NULL, NULL,
target/i386/cpu.h +1 -0
index a04e46b..37b209e 100644
@@ -630,6 +630,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
 #define CPUID_7_0_ECX_UMIP     (1U << 2)
 #define CPUID_7_0_ECX_PKU      (1U << 3)
 #define CPUID_7_0_ECX_OSPKE    (1U << 4)
+#define CPUID_7_0_ECX_AVX512_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
 #define CPUID_7_0_ECX_LA57     (1U << 16)
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
 
Signature · 1 line
2.7.4