mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +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)
|
files_code[fn].append(entry)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
features_whitelist = ["CPU_FEATURE_SSE5"]
|
||||||
for feature in allf:
|
for feature in allf:
|
||||||
matching_files = []
|
matching_files = []
|
||||||
for fn in files_code:
|
for fn in files_code:
|
||||||
if feature in files_code[fn]:
|
if feature in files_code[fn]:
|
||||||
matching_files.append(fn)
|
matching_files.append(fn)
|
||||||
if len(matching_files) == 0:
|
if len(matching_files) == 0 and feature not in features_whitelist:
|
||||||
if firstError:
|
if firstError:
|
||||||
print "FAILED:"
|
print "FAILED:"
|
||||||
firstError = False
|
firstError = False
|
||||||
|
|
|
@ -685,9 +685,9 @@ const char* cpu_feature_str(cpu_feature_t feature)
|
||||||
{ CPU_FEATURE_SGX, "sgx" },
|
{ CPU_FEATURE_SGX, "sgx" },
|
||||||
{ CPU_FEATURE_RDSEED, "rdseed" },
|
{ CPU_FEATURE_RDSEED, "rdseed" },
|
||||||
{ CPU_FEATURE_ADX, "adx" },
|
{ CPU_FEATURE_ADX, "adx" },
|
||||||
{ CPU_FEATURE_AVX512VNNI, "avx512_vnni" },
|
{ CPU_FEATURE_AVX512VNNI, "avx512vnni" },
|
||||||
{ CPU_FEATURE_AVX512VBMI, "avx512_vbmi" },
|
{ CPU_FEATURE_AVX512VBMI, "avx512vbmi" },
|
||||||
{ CPU_FEATURE_AVX512VBMI2, "avx512_vbmi2" },
|
{ CPU_FEATURE_AVX512VBMI2, "avx512vbmi2" },
|
||||||
};
|
};
|
||||||
unsigned i, n = COUNT_OF(matchtable);
|
unsigned i, n = COUNT_OF(matchtable);
|
||||||
if (n != NUM_CPU_FEATURES) {
|
if (n != NUM_CPU_FEATURES) {
|
||||||
|
|
|
@ -103,4 +103,4 @@ amd_fn8000001dh[3]=ffffffff ffffffff ffffffff ffffffff
|
||||||
-1
|
-1
|
||||||
128 (non-authoritative)
|
128 (non-authoritative)
|
||||||
Cannon Lake (Core i3)
|
Cannon Lake (Core i3)
|
||||||
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl rdseed adx avx512_vbmi
|
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl rdseed adx avx512vbmi
|
||||||
|
|
|
@ -103,4 +103,4 @@ amd_fn8000001dh[3]=ffffffff ffffffff ffffffff ffffffff
|
||||||
-1
|
-1
|
||||||
128 (non-authoritative)
|
128 (non-authoritative)
|
||||||
Cannon Lake (Core i3)
|
Cannon Lake (Core i3)
|
||||||
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl rdseed adx avx512_vbmi
|
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl rdseed adx avx512vbmi
|
||||||
|
|
|
@ -103,4 +103,4 @@ amd_fn8000001dh[3]=ffffffff ffffffff ffffffff ffffffff
|
||||||
-1
|
-1
|
||||||
128 (non-authoritative)
|
128 (non-authoritative)
|
||||||
Ice Lake (Core i5)
|
Ice Lake (Core i5)
|
||||||
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl sgx rdseed adx avx512_vnni avx512_vbmi avx512_vbmi2
|
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl sgx rdseed adx avx512vnni avx512vbmi avx512vbmi2
|
||||||
|
|
|
@ -103,4 +103,4 @@ amd_fn8000001dh[3]=ffffffff ffffffff ffffffff ffffffff
|
||||||
-1
|
-1
|
||||||
128 (non-authoritative)
|
128 (non-authoritative)
|
||||||
Ice Lake (Core i7)
|
Ice Lake (Core i7)
|
||||||
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl sgx rdseed adx avx512_vnni avx512_vbmi avx512_vbmi2
|
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 avx512f avx512dq avx512cd sha_ni avx512bw avx512vl sgx rdseed adx avx512vnni avx512vbmi avx512vbmi2
|
||||||
|
|
|
@ -99,4 +99,4 @@ intel_fn11[3]=00000000 00000000 00000003 00000056
|
||||||
-1
|
-1
|
||||||
128 (non-authoritative)
|
128 (non-authoritative)
|
||||||
Skylake (Xeon Scalable)
|
Skylake (Xeon Scalable)
|
||||||
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 syscall xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 hle rtm avx512f avx512dq avx512cd avx512bw avx512vl rdseed adx avx512_vnni
|
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 syscall xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 hle rtm avx512f avx512dq avx512cd avx512bw avx512vl rdseed adx avx512vnni
|
||||||
|
|
Loading…
Reference in a new issue