]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add bdver4 for multiversioning and fix AMD model detection.
authorVenkataramanan Kumar <venkataramanan.kumar@amd.com>
Sun, 18 Oct 2015 18:40:20 +0000 (18:40 +0000)
committerVenkataramanan Kumar <vekumar@gcc.gnu.org>
Sun, 18 Oct 2015 18:40:20 +0000 (18:40 +0000)
2015-10-19  Venkataramanan Kumar  <Venkataramanan.kumar@amd.com>

Backport from mainline
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: r228953

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

index 2b54397483ee6d03cc2e767d3335420a35cd27dc..7fab2d947d3d6350cde17c32bdcc148089051538 100644 (file)
@@ -1,3 +1,11 @@
+2015-10-19  Venkataramanan Kumar  <Venkataramanan.kumar@amd.com>
+
+       Backport from mainline
+       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-09-23  John David Anglin  <danglin@gcc.gnu.org>
 
        * config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
index 7972cedaa11eb0165ac6ce952c5ba5bf7997f175..cfe4aae65481020454f34d1195d1c104346dfda9 100644 (file)
@@ -153,6 +153,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:
@@ -397,7 +400,7 @@ __cpu_indicator_init (void)
       if (family == 0x0f)
        {
          family += extended_family;
-         model += (extended_model << 4);
+         model += extended_model;
        }
 
       /* Get CPU type.  */