[v1.04][X86] Fix bug (hopefully)

This commit is contained in:
Dr-Noob
2024-02-04 11:35:29 +00:00
parent eaa9b38ecc
commit eec2353b69

View File

@@ -486,8 +486,8 @@ struct cpuInfo* get_cpu_info(void) {
cpu->cpu_name = get_str_cpu_name_internal(); cpu->cpu_name = get_str_cpu_name_internal();
} }
else { else {
cpu->cpu_name = NULL;
printWarn("Can't read CPU name from cpuid (needed extended level is 0x%.8X, max is 0x%.8X)", 0x80000004, cpu->maxExtendedLevels); printWarn("Can't read CPU name from cpuid (needed extended level is 0x%.8X, max is 0x%.8X)", 0x80000004, cpu->maxExtendedLevels);
cpu->cpu_name = infer_cpu_name_from_uarch(cpu->arch);
} }
cpu->topology_extensions = false; cpu->topology_extensions = false;
@@ -555,8 +555,6 @@ struct cpuInfo* get_cpu_info(void) {
if(cpu->topo == NULL) return cpu; if(cpu->topo == NULL) return cpu;
} }
if (cpu->cpu_name == NULL)
cpu->cpu_name = infer_cpu_name_from_uarch(cpu->arch);
cpu->num_cpus = modules; cpu->num_cpus = modules;
cpu->peak_performance = get_peak_performance(cpu, accurate_pp()); cpu->peak_performance = get_peak_performance(cpu, accurate_pp());