mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
Fix code consistency
Result before this patch: Checking enum `cpu_feature_t': 113 elements; max size (CPU_FLAGS_MAX=128)... OK Checking enum `cpu_hint_t': 1 elements; max size (CPU_HINTS_MAX=16)... OK Checking enum `cpu_sgx_feature_t': 2 elements; max size (SGX_FLAGS_MAX=14)... OK Finding features: ..Mismatch - cpuid_main.c:688 - `AVX512VNNI' vs `avx512_vnni' ..Mismatch - cpuid_main.c:689 - `AVX512VBMI' vs `avx512_vbmi' ..Mismatch - cpuid_main.c:690 - `AVX512VBMI2' vs `avx512_vbmi2' cpuid_main.c: 113 features described Found 113 total features and 113 named features Checking whether all features have detection code... FAILED: ..No detection code for CPU_FEATURE_SSE5
This commit is contained in:
parent
ac5702b06b
commit
9abab57bdc
7 changed files with 10 additions and 9 deletions
|
@ -116,12 +116,13 @@ for fn in glob.glob("%s/*.c" % sys.argv[1]):
|
|||
files_code[fn].append(entry)
|
||||
f.close()
|
||||
|
||||
features_whitelist = ["CPU_FEATURE_SSE5"]
|
||||
for feature in allf:
|
||||
matching_files = []
|
||||
for fn in files_code:
|
||||
if feature in files_code[fn]:
|
||||
matching_files.append(fn)
|
||||
if len(matching_files) == 0:
|
||||
if len(matching_files) == 0 and feature not in features_whitelist:
|
||||
if firstError:
|
||||
print "FAILED:"
|
||||
firstError = False
|
||||
|
|
|
@ -685,9 +685,9 @@ const char* cpu_feature_str(cpu_feature_t feature)
|
|||
{ CPU_FEATURE_SGX, "sgx" },
|
||||
{ CPU_FEATURE_RDSEED, "rdseed" },
|
||||
{ CPU_FEATURE_ADX, "adx" },
|
||||
{ CPU_FEATURE_AVX512VNNI, "avx512_vnni" },
|
||||
{ CPU_FEATURE_AVX512VBMI, "avx512_vbmi" },
|
||||
{ CPU_FEATURE_AVX512VBMI2, "avx512_vbmi2" },
|
||||
{ CPU_FEATURE_AVX512VNNI, "avx512vnni" },
|
||||
{ CPU_FEATURE_AVX512VBMI, "avx512vbmi" },
|
||||
{ CPU_FEATURE_AVX512VBMI2, "avx512vbmi2" },
|
||||
};
|
||||
unsigned i, n = COUNT_OF(matchtable);
|
||||
if (n != NUM_CPU_FEATURES) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue