diff --git a/libcpuid/check-consistency.py b/libcpuid/check-consistency.py index ad937f9..80e4b6e 100755 --- a/libcpuid/check-consistency.py +++ b/libcpuid/check-consistency.py @@ -60,7 +60,7 @@ for fn in glob.glob("%s/*.c" % sys.argv[1]): line = 1 nfeat = 0 for s in f.readlines(): - if rexp.match(s): + if rexp.match(s) and "CPU_FEATURE_LEVEL_" not in s: nfeat += 1 res = rexp.findall(s) assert len(res) == 1, "Too many matches" diff --git a/libcpuid/libcpuid_util.c b/libcpuid/libcpuid_util.c index b64117a..57900f1 100644 --- a/libcpuid/libcpuid_util.c +++ b/libcpuid/libcpuid_util.c @@ -422,10 +422,11 @@ void decode_architecture_version_x86(struct cpu_id_t* data) const struct { const int family; const cpu_feature_level_t feature_level; } architecture_matchtable_ia_32[] = { - { 4, CPU_FEATURE_LEVEL_I486 }, - { 5, CPU_FEATURE_LEVEL_I586 }, - { 6, CPU_FEATURE_LEVEL_I686 }, - { 15, CPU_FEATURE_LEVEL_I686 }, // Intel Pentium 4, AMD K8 + { 3, CPU_FEATURE_LEVEL_I386 }, + { 4, CPU_FEATURE_LEVEL_I486 }, + { 5, CPU_FEATURE_LEVEL_I586 }, + { 6, CPU_FEATURE_LEVEL_I686 }, + { 15, CPU_FEATURE_LEVEL_I686 }, // Intel Pentium 4, AMD K8 }; const cpu_feature_t architecture_x86_64_v1[] = {