AVX512VL not being a standalone feature anyway, but always needing
to be combined with some other AVX512*, replace uses of
cpu_has_avx512vl by just the feature bit check.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: Re-base over dropping of Xeon Phi support.
--- a/tools/tests/x86_emulator/evex-disp8.c
+++ b/tools/tests/x86_emulator/evex-disp8.c
@@ -1000,7 +1000,8 @@ static void test_group(const struct test
{
for ( j = 0; j < nr_vl; ++j )
{
- if ( vl[0] == VL_512 && vl[j] != VL_512 && !cpu_has_avx512vl )
+ if ( vl[0] == VL_512 && vl[j] != VL_512 &&
+ !cpu_policy.feat.avx512vl )
continue;
switch ( tests[i].esz )
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -131,7 +131,7 @@ static bool simd_check_avx512f(void)
static bool simd_check_avx512f_vl(void)
{
- return cpu_has_avx512f && cpu_has_avx512vl;
+ return cpu_has_avx512f && cpu_policy.feat.avx512vl;
}
#define simd_check_avx512vl_sg simd_check_avx512f_vl
@@ -143,7 +143,7 @@ static bool simd_check_avx512dq(void)
static bool simd_check_avx512dq_vl(void)
{
- return cpu_has_avx512dq && cpu_has_avx512vl;
+ return cpu_has_avx512dq && cpu_policy.feat.avx512vl;
}
static bool simd_check_avx512bw(void)
@@ -154,7 +154,7 @@ static bool simd_check_avx512bw(void)
static bool simd_check_avx512bw_vl(void)
{
- return cpu_has_avx512bw && cpu_has_avx512vl;
+ return cpu_has_avx512bw && cpu_policy.feat.avx512vl;
}
static bool simd_check_avx512vbmi(void)
@@ -164,7 +164,7 @@ static bool simd_check_avx512vbmi(void)
static bool simd_check_avx512vbmi_vl(void)
{
- return cpu_has_avx512_vbmi && cpu_has_avx512vl;
+ return cpu_has_avx512_vbmi && cpu_policy.feat.avx512vl;
}
static bool simd_check_avx512vbmi2(void)
@@ -260,7 +260,7 @@ static bool simd_check_avx512fp16(void)
static bool simd_check_avx512fp16_vl(void)
{
- return cpu_has_avx512_fp16 && cpu_has_avx512vl;
+ return cpu_has_avx512_fp16 && cpu_policy.feat.avx512vl;
}
static void simd_set_regs(struct cpu_user_regs *regs)
--- a/tools/tests/x86_emulator/x86-emulate.h
+++ b/tools/tests/x86_emulator/x86-emulate.h
@@ -159,7 +159,6 @@ void wrpkru(unsigned int val);
#define cpu_has_avx512cd (cpu_policy.feat.avx512cd && xcr0_mask(0xe6))
#define cpu_has_sha cpu_policy.feat.sha
#define cpu_has_avx512bw (cpu_policy.feat.avx512bw && xcr0_mask(0xe6))
-#define cpu_has_avx512vl (cpu_policy.feat.avx512vl && xcr0_mask(0xe6))
#define cpu_has_avx512_vbmi (cpu_policy.feat.avx512_vbmi && xcr0_mask(0xe6))
#define cpu_has_avx512_vbmi2 (cpu_policy.feat.avx512_vbmi2 && xcr0_mask(0xe6))
#define cpu_has_gfni cpu_policy.feat.gfni