Skip to content

Commit f14435c

Browse files
authored
Merge pull request #3810 from martin-frbg/fix3800
Add fallbacks to RaptorLake entry from PR3800
2 parents 4743d80 + 1865b15 commit f14435c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cpuid_x86.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,10 @@ int get_cpuname(void){
15491549
case 7: // Raptor Lake
15501550
if(support_avx2())
15511551
return CPUTYPE_HASWELL;
1552+
if(support_avx())
1553+
return CPUTYPE_SANDYBRIDGE;
1554+
else
1555+
return CPUTYPE_NEHALEM;
15521556
}
15531557
break;
15541558
}
@@ -2344,8 +2348,14 @@ int get_coretype(void){
23442348
case 11:
23452349
switch (model) {
23462350
case 7: // Raptor Lake
2347-
if(support_avx2())
2351+
#ifndef NO_AVX2
2352+
if(support_avx2())
23482353
return CORE_HASWELL;
2354+
#endif
2355+
if(support_avx())
2356+
return CORE_SANDYBRIDGE;
2357+
else
2358+
return CORE_NEHALEM;
23492359
}
23502360
case 15:
23512361
if (model <= 0x2) return CORE_NORTHWOOD;

0 commit comments

Comments
 (0)