libgcc changes for AMD znver1.
authorVenkataramanan Kumar <venkataramanan.kumar@amd.com>
Fri, 30 Oct 2015 13:20:42 +0000 (13:20 +0000)
committerVenkataramanan Kumar <vekumar@gcc.gnu.org>
Fri, 30 Oct 2015 13:20:42 +0000 (13:20 +0000)
2015-10-30  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

* config/i386/i386.c (get_builtin_code_for_version): Set priority
for PROCESSOR_ZNVER1.
(enum processor_model): Add M_AMDFAM17H_znver1.
(struct arch_names_table): Likewise.
* doc/extend.texi: ADD znver1.

2015-10-30  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

* config/i386/cpuinfo.c (enum processor_types): Add AMDFAM17H.
(processor_subtypes): Add znver1.
(get_amd_cpu): Detect znver1.

From-SVN: r229575

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/doc/extend.texi
libgcc/ChangeLog
libgcc/config/i386/cpuinfo.c

index 4e0d45d9c97af9af4a4c33a3454dd25318ebff6c..e6b8b27bc6f7de2f4f3961b0e88514ec78e76b39 100644 (file)
@@ -1,3 +1,11 @@
+2015-10-30  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
+
+       * config/i386/i386.c (get_builtin_code_for_version): Set priority
+       for PROCESSOR_ZNVER1.
+       (enum processor_model): Add M_AMDFAM17H_znver1.
+       (struct arch_names_table): Likewise.
+       * doc/extend.texi: ADD znver1.
+
 2015-10-30  Richard Biener  <rguenther@suse.de>
 
        * gimple-fold.c (fold_gimple_assign): Do not dispatch to
index 913dc00e02c65eefead3e7a5efd267083ab927a5..1e6c8a3537fe3575a65f1ca29d192f415a2e16e9 100644 (file)
@@ -35898,6 +35898,10 @@ get_builtin_code_for_version (tree decl, tree *predicate_list)
              arg_str = "bdver4";
              priority = P_PROC_AVX2;
              break;
+           case PROCESSOR_ZNVER1:
+             arg_str = "znver1";
+             priority = P_PROC_AVX2;
+             break;
            }
        }
 
@@ -36808,6 +36812,7 @@ fold_builtin_cpu (tree fndecl, tree *args)
     M_AMDFAM15H_BDVER2,
     M_AMDFAM15H_BDVER3,
     M_AMDFAM15H_BDVER4,
+    M_AMDFAM17H_ZNVER1,
     M_INTEL_COREI7_IVYBRIDGE,
     M_INTEL_COREI7_HASWELL,
     M_INTEL_COREI7_BROADWELL,
@@ -36850,6 +36855,7 @@ fold_builtin_cpu (tree fndecl, tree *args)
       {"bdver3", M_AMDFAM15H_BDVER3},
       {"bdver4", M_AMDFAM15H_BDVER4},
       {"btver2", M_AMD_BTVER2},
+      {"znver1", M_AMDFAM17H_ZNVER1},
     };
 
   static struct _isa_names_table
index 9f8785eb145aa0b5a1b170d452910d90fef7d709..16fde70515ad3c2b26d59b2d6719bd2ce3d71b40 100644 (file)
@@ -17016,6 +17016,9 @@ AMD Family 15h Bulldozer version 4.
 
 @item btver2
 AMD Family 16h CPU.
+
+@item znver1
+AMD Family 17h CPU.
 @end table
 
 Here is an example:
index 5ce44ec8bee4a6cab1712a31baaf7d1aa22df6c9..d964b2438795d4ae9aa39399bb0fb582151067d5 100644 (file)
@@ -1,3 +1,9 @@
+2015-10-30  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
+
+       * config/i386/cpuinfo.c (enum processor_types): Add AMDFAM17H.
+       (processor_subtypes): Add znver1.
+       (get_amd_cpu): Detect znver1.
+
 2015-10-29  Christophe Lyon  <christophe.lyon@linaro.org>
 
        * config.host (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*):
index 1313ca3a704eefd66befd37ab65702cc5e3741e7..b0ebfcf7fc79334face24092ef4172862955ff95 100644 (file)
@@ -59,6 +59,7 @@ enum processor_types
   INTEL_KNL,
   AMD_BTVER1,
   AMD_BTVER2,  
+  AMDFAM17H,
   CPU_TYPE_MAX
 };
 
@@ -74,6 +75,7 @@ enum processor_subtypes
   AMDFAM15H_BDVER2,
   AMDFAM15H_BDVER3,
   AMDFAM15H_BDVER4,
+  AMDFAM17H_ZNVER1,
   INTEL_COREI7_IVYBRIDGE,
   INTEL_COREI7_HASWELL,
   INTEL_COREI7_BROADWELL,
@@ -177,6 +179,12 @@ get_amd_cpu (unsigned int family, unsigned int model)
     case 0x16:
       __cpu_model.__cpu_type = AMD_BTVER2;
       break;
+    case 0x17:
+      __cpu_model.__cpu_type = AMDFAM17H;
+      /* AMD family 17h version 1.  */
+      if (model <= 0x1f)
+       __cpu_model.__cpu_subtype = AMDFAM17H_ZNVER1;
+      break;
     default:
       break;
     }