File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1707,16 +1707,39 @@ int get_cpuname(void){
17071707 if (model == 0xf && stepping < 0xe )
17081708 return CPUTYPE_NANO ;
17091709 return CPUTYPE_NEHALEM ;
1710+ case 0x7 :
1711+ switch (exmodel ) {
1712+ case 5 :
1713+ if (support_avx2 ())
1714+ return CPUTYPE_ZEN ;
1715+ else
1716+ return CPUTYPE_DUNNINGTON ;
1717+ default :
1718+ return CPUTYPE_NEHALEM ;
1719+ }
17101720 default :
1711- if (family >= 0x7 )
1721+ if (family >= 0x8 )
17121722 return CPUTYPE_NEHALEM ;
17131723 else
17141724 return CPUTYPE_VIAC3 ;
17151725 }
17161726 }
17171727
17181728 if (vendor == VENDOR_ZHAOXIN ){
1719- return CPUTYPE_NEHALEM ;
1729+ switch (family ) {
1730+ case 0x7 :
1731+ switch (exmodel ) {
1732+ case 5 :
1733+ if (support_avx2 ())
1734+ return CPUTYPE_ZEN ;
1735+ else
1736+ return CPUTYPE_DUNNINGTON ;
1737+ default :
1738+ return CPUTYPE_NEHALEM ;
1739+ }
1740+ default :
1741+ return CPUTYPE_NEHALEM ;
1742+ }
17201743 }
17211744
17221745 if (vendor == VENDOR_RISE ){
@@ -2416,16 +2439,39 @@ int get_coretype(void){
24162439 if (model == 0xf && stepping < 0xe )
24172440 return CORE_NANO ;
24182441 return CORE_NEHALEM ;
2442+ case 0x7 :
2443+ switch (exmodel ) {
2444+ case 5 :
2445+ if (support_avx2 ())
2446+ return CORE_ZEN ;
2447+ else
2448+ return CORE_DUNNINGTON ;
2449+ default :
2450+ return CORE_NEHALEM ;
2451+ }
24192452 default :
2420- if (family >= 0x7 )
2453+ if (family >= 0x8 )
24212454 return CORE_NEHALEM ;
24222455 else
24232456 return CORE_VIAC3 ;
24242457 }
24252458 }
24262459
24272460 if (vendor == VENDOR_ZHAOXIN ) {
2428- return CORE_NEHALEM ;
2461+ switch (family ) {
2462+ case 0x7 :
2463+ switch (exmodel ) {
2464+ case 5 :
2465+ if (support_avx2 ())
2466+ return CORE_ZEN ;
2467+ else
2468+ return CORE_DUNNINGTON ;
2469+ default :
2470+ return CORE_NEHALEM ;
2471+ }
2472+ default :
2473+ return CORE_NEHALEM ;
2474+ }
24292475 }
24302476
24312477 return CORE_UNKNOWN ;
Original file line number Diff line number Diff line change @@ -875,14 +875,37 @@ static gotoblas_t *get_coretype(void){
875875 if (model == 0xf && stepping < 0xe )
876876 return & gotoblas_NANO ;
877877 return & gotoblas_NEHALEM ;
878+ case 0x7 :
879+ switch (exmodel ) {
880+ case 5 :
881+ if (support_avx2 ())
882+ return & gotoblas_ZEN ;
883+ else
884+ return & gotoblas_DUNNINGTON ;
885+ default :
886+ return & gotoblas_NEHALEM ;
887+ }
878888 default :
879- if (family >= 0x7 )
889+ if (family >= 0x8 )
880890 return & gotoblas_NEHALEM ;
881891 }
882892 }
883893
884894 if (vendor == VENDOR_ZHAOXIN ) {
885- return & gotoblas_NEHALEM ;
895+ switch (family ) {
896+ case 0x7 :
897+ switch (exmodel ) {
898+ case 5 :
899+ if (support_avx2 ())
900+ return & gotoblas_ZEN ;
901+ else
902+ return & gotoblas_DUNNINGTON ;
903+ default :
904+ return & gotoblas_NEHALEM ;
905+ }
906+ default :
907+ return & gotoblas_NEHALEM ;
908+ }
886909 }
887910
888911 return NULL ;
You can’t perform that action at this time.
0 commit comments