Skip to content

Commit 692023e

Browse files
committed
Switch case ordering for exmodel 12 to be sorted
1 parent 5a534a6 commit 692023e

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

cpuid_x86.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,6 +1513,11 @@ int get_cpuname(void)
15131513
break;
15141514
case 12: //family 6 exmodel 12
15151515
switch (model) {
1516+
case 6: // Arrow Lake
1517+
if (support_avx512()) return CPUTYPE_SAPPHIRERAPIDS;
1518+
if (support_avx2()) return CPUTYPE_HASWELL;
1519+
if (support_avx()) return CPUTYPE_SANDYBRIDGE;
1520+
else return CPUTYPE_NEHALEM;
15161521
case 12: // Panther Lake
15171522
if (support_avx2()) return CPUTYPE_HASWELL;
15181523
if (support_avx()) return CPUTYPE_SANDYBRIDGE;
@@ -1525,11 +1530,6 @@ int get_cpuname(void)
15251530
if (support_avx2()) return CPUTYPE_HASWELL;
15261531
if (support_avx()) return CPUTYPE_SANDYBRIDGE;
15271532
else return CPUTYPE_NEHALEM;
1528-
case 6: // Arrow Lake
1529-
if (support_avx512()) return CPUTYPE_SAPPHIRERAPIDS;
1530-
if (support_avx2()) return CPUTYPE_HASWELL;
1531-
if (support_avx()) return CPUTYPE_SANDYBRIDGE;
1532-
else return CPUTYPE_NEHALEM;
15331533
}
15341534
break;
15351535
}
@@ -2242,13 +2242,6 @@ int get_coretype(void)
22422242
}
22432243
case 12:
22442244
switch (model) {
2245-
case 15: // Emerald Rapids
2246-
if (support_amx_bf16()) return CORE_SAPPHIRERAPIDS;
2247-
if (support_avx512_bf16()) return CORE_COOPERLAKE;
2248-
if (support_avx512()) return CORE_SKYLAKEX;
2249-
if (support_avx2()) return CORE_HASWELL;
2250-
if (support_avx()) return CORE_SANDYBRIDGE;
2251-
else return CORE_NEHALEM;
22522245
case 6: // Arrow Lake
22532246
if (support_amx_bf16()) return CORE_SAPPHIRERAPIDS;
22542247
if (support_avx512_bf16()) return CORE_COOPERLAKE;
@@ -2261,6 +2254,13 @@ int get_coretype(void)
22612254
if (support_avx2()) return CORE_HASWELL;
22622255
if (support_avx()) return CORE_SANDYBRIDGE;
22632256
else return CORE_NEHALEM;
2257+
case 15: // Emerald Rapids
2258+
if (support_amx_bf16()) return CORE_SAPPHIRERAPIDS;
2259+
if (support_avx512_bf16()) return CORE_COOPERLAKE;
2260+
if (support_avx512()) return CORE_SKYLAKEX;
2261+
if (support_avx2()) return CORE_HASWELL;
2262+
if (support_avx()) return CORE_SANDYBRIDGE;
2263+
else return CORE_NEHALEM;
22642264
}
22652265
}
22662266
case 15:

0 commit comments

Comments
 (0)