Hello! As reported in the PR, AMDFAM15H model 0x2 should return AMDFAM15H_BDVER2 subtype.
2018-05-31 Uros Bizjak <ubiz...@gmail.com> PR target/85591 * config/i386/cpuinfo.c (get_amd_cpu): Return AMDFAM15H_BDVER2 for AMDFAM15H model 0x2. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros.
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c index 8c9878c..a7bb9da 100644 --- a/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c @@ -83,17 +83,20 @@ get_amd_cpu (unsigned int family, unsigned int model) /* AMD Family 15h "Bulldozer". */ case 0x15: __cpu_model.__cpu_type = AMDFAM15H; + + if (model == 0x2) + __cpu_model.__cpu_subtype = AMDFAM15H_BDVER2; /* Bulldozer version 1. */ - if ( model <= 0xf) + else if (model <= 0xf) __cpu_model.__cpu_subtype = AMDFAM15H_BDVER1; /* Bulldozer version 2 "Piledriver" */ - if (model >= 0x10 && model <= 0x2f) + else if (model <= 0x2f) __cpu_model.__cpu_subtype = AMDFAM15H_BDVER2; /* Bulldozer version 3 "Steamroller" */ - if (model >= 0x30 && model <= 0x4f) + else if (model <= 0x4f) __cpu_model.__cpu_subtype = AMDFAM15H_BDVER3; /* Bulldozer version 4 "Excavator" */ - if (model >= 0x60 && model <= 0x7f) + else if (model <= 0x7f) __cpu_model.__cpu_subtype = AMDFAM15H_BDVER4; break; /* AMD Family 16h "btver2" */