Add bdver4 for multiversioning and fix AMD model detection.
authorVenkataramanan Kumar <venkataramanan.kumar@amd.com>
Sun, 11 Oct 2015 08:06:14 +0000 (08:06 +0000)
committerVenkataramanan Kumar <vekumar@gcc.gnu.org>
Sun, 11 Oct 2015 08:06:14 +0000 (08:06 +0000)
2015-10-09  Venkataramanan kumar <venkataramanan.kumar@amd.com>

        * config/i386/cpuinfo.c (get_amd_cpu): Detect bdver4.
        (__cpu_indicator_init): Fix model selection for AMD CPUs.

From-SVN: r228691

libgcc/ChangeLog
libgcc/config/i386/cpuinfo.c

index bb3a722b511809e76c511393be8f6d829b9ed554..8676747211c4d447b011f4b6a17380f426761b38 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-09  Venkataramanan kumar <venkataramanan.kumar@amd.com>
+
+       * config/i386/cpuinfo.c (get_amd_cpu): Detect bdver4.
+       (__cpu_indicator_init): Fix model selection for AMD CPUs.
+
 2015-10-05  Kirill Yukhin  <kirill.yukhin@intel.com>
 
        * config/i386/cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".
index 0cbbc85305683dc1598d085ba29103434d3e7193..1313ca3a704eefd66befd37ab65702cc5e3741e7 100644 (file)
@@ -169,6 +169,9 @@ get_amd_cpu (unsigned int family, unsigned int model)
       /* Bulldozer version 3 "Steamroller"  */
       if (model >= 0x30 && model <= 0x4f)
        __cpu_model.__cpu_subtype = AMDFAM15H_BDVER3;
+      /* Bulldozer version 4 "Excavator"   */
+      if (model >= 0x60 && model <= 0x7f)
+       __cpu_model.__cpu_subtype = AMDFAM15H_BDVER4;
       break;
     /* AMD Family 16h "btver2" */
     case 0x16:
@@ -455,7 +458,7 @@ __cpu_indicator_init (void)
       if (family == 0x0f)
        {
          family += extended_family;
-         model += (extended_model << 4);
+         model += extended_model;
        }
 
       /* Get CPU type.  */