]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Committed] S/390: Support z14 as CPU name.
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Jul 2017 11:31:09 +0000 (11:31 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Jul 2017 11:31:09 +0000 (11:31 +0000)
With IBM z14 officially announced we can add support for z14 as
preferred CPU name.  We still pass arch12 to Binutils in order to keep
older Binutils versions supported.

gcc/ChangeLog:

2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config.gcc: Add z14.
* config/s390/driver-native.c (s390_host_detect_local_cpu): Add
CPU model numbers for z13s and z14.
* config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
arch12 with z14.
* config/s390/s390-opts.h (enum processor_type): Rename
PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
* config/s390/s390.c (processor_table): Add field for CPU name to
be passed to Binutils.
(s390_asm_output_machine_for_arch): Use the new field in
processor_table for Binutils.
(s390_expand_builtin): Replace arch12 with z14.
(s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
(s390_get_sched_attrmask): Likewise.
(s390_get_unit_mask): Likewise.
* config/s390/s390.opt: Add z14 to processor_type enum.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250739 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/s390/driver-native.c
gcc/config/s390/s390-c.c
gcc/config/s390/s390-opts.h
gcc/config/s390/s390.c
gcc/config/s390/s390.opt

index 7b9ab5780794977c44fe2805e4f238cf1529dcb6..27e4af12cbce6d73b9188d3fb958f927e3a9c144 100644 (file)
@@ -1,3 +1,22 @@
+2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config.gcc: Add z14.
+       * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
+       CPU model numbers for z13s and z14.
+       * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
+       arch12 with z14.
+       * config/s390/s390-opts.h (enum processor_type): Rename
+       PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
+       * config/s390/s390.c (processor_table): Add field for CPU name to
+       be passed to Binutils.
+       (s390_asm_output_machine_for_arch): Use the new field in
+       processor_table for Binutils.
+       (s390_expand_builtin): Replace arch12 with z14.
+       (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
+       (s390_get_sched_attrmask): Likewise.
+       (s390_get_unit_mask): Likewise.
+       * config/s390/s390.opt: Add z14 to processor_type enum.
+
 2017-07-31  Martin Jambor  <mjambor@suse.cz>
 
        PR hsa/81477
index f28164646c3b7998d16dfa9c279972ccf15ee1b2..fdf4cb845ae1d6b724acb8a5a455bc3742fb976e 100644 (file)
@@ -4368,7 +4368,7 @@ case "${target}" in
                for which in arch tune; do
                        eval "val=\$with_$which"
                        case ${val} in
-                       "" | native | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | arch3 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12)
+                       "" | native | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | arch3 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12)
                                # OK
                                ;;
                        *)
index 4bcddb4bab638e63e28e28081db906a989ddee6e..acb983613c24ed0291321935b16622d4271154ae 100644 (file)
@@ -112,10 +112,14 @@ s390_host_detect_local_cpu (int argc, const char **argv)
              cpu = "zEC12";
              break;
            case 0x2964:
+           case 0x2965:
              cpu = "z13";
              break;
+           case 0x3906:
+             cpu = "z14";
+             break;
            default:
-             cpu = "arch12";
+             cpu = "z14";
              break;
            }
        }
index 35c35458791599562b15b85b9e4c96559cf214e5..07224ad7f394e5f815a750cbca48360143390aaf 100644 (file)
@@ -886,7 +886,7 @@ s390_resolve_overloaded_builtin (location_t loc,
 
   if (!TARGET_VXE && (ob_flags & B_VXE))
     {
-      error_at (loc, "%qF requires -march=arch12 or higher", ob_fndecl);
+      error_at (loc, "%qF requires z14 or higher", ob_fndecl);
       return error_mark_node;
     }
 
@@ -963,7 +963,7 @@ s390_resolve_overloaded_builtin (location_t loc,
   if (!TARGET_VXE
       && bflags_overloaded_builtin_var[last_match_index] & B_VXE)
     {
-      error_at (loc, "%qs matching variant requires -march=arch12 or higher",
+      error_at (loc, "%qs matching variant requires z14 or higher",
                IDENTIFIER_POINTER (DECL_NAME (ob_fndecl)));
       return error_mark_node;
     }
index 65ac4f8ebbd56d1271d61afa635d53e852f25697..6d506e2c9e3969c1b59617b4c3f9780605b4a425 100644 (file)
@@ -38,7 +38,7 @@ enum processor_type
   PROCESSOR_2817_Z196,
   PROCESSOR_2827_ZEC12,
   PROCESSOR_2964_Z13,
-  PROCESSOR_ARCH12,
+  PROCESSOR_3906_Z14,
   PROCESSOR_NATIVE,
   PROCESSOR_max
 };
index bbae89be29d51b21645ed317bccccc8bb7b07add..77b0e7f5404e2170bd35684e56d5c5b02884794b 100644 (file)
@@ -318,24 +318,27 @@ struct processor_costs zEC12_cost =
 
 static struct
 {
+  /* The preferred name to be used in user visible output.  */
   const char *const name;
+  /* CPU name as it should be passed to Binutils via .machine  */
+  const char *const binutils_name;
   const enum processor_type processor;
   const struct processor_costs *cost;
 }
 const processor_table[] =
 {
-  { "g5",     PROCESSOR_9672_G5,     &z900_cost },
-  { "g6",     PROCESSOR_9672_G6,     &z900_cost },
-  { "z900",   PROCESSOR_2064_Z900,   &z900_cost },
-  { "z990",   PROCESSOR_2084_Z990,   &z990_cost },
-  { "z9-109", PROCESSOR_2094_Z9_109, &z9_109_cost },
-  { "z9-ec",  PROCESSOR_2094_Z9_EC,  &z9_109_cost },
-  { "z10",    PROCESSOR_2097_Z10,    &z10_cost },
-  { "z196",   PROCESSOR_2817_Z196,   &z196_cost },
-  { "zEC12",  PROCESSOR_2827_ZEC12,  &zEC12_cost },
-  { "z13",    PROCESSOR_2964_Z13,    &zEC12_cost },
-  { "arch12", PROCESSOR_ARCH12,      &zEC12_cost },
-  { "native", PROCESSOR_NATIVE,      NULL }
+  { "g5",     "g5",     PROCESSOR_9672_G5,     &z900_cost },
+  { "g6",     "g6",     PROCESSOR_9672_G6,     &z900_cost },
+  { "z900",   "z900",   PROCESSOR_2064_Z900,   &z900_cost },
+  { "z990",   "z990",   PROCESSOR_2084_Z990,   &z990_cost },
+  { "z9-109", "z9-109", PROCESSOR_2094_Z9_109, &z9_109_cost },
+  { "z9-ec",  "z9-ec",  PROCESSOR_2094_Z9_EC,  &z9_109_cost },
+  { "z10",    "z10",    PROCESSOR_2097_Z10,    &z10_cost },
+  { "z196",   "z196",   PROCESSOR_2817_Z196,   &z196_cost },
+  { "zEC12",  "zEC12",  PROCESSOR_2827_ZEC12,  &zEC12_cost },
+  { "z13",    "z13",    PROCESSOR_2964_Z13,    &zEC12_cost },
+  { "z14",    "arch12", PROCESSOR_3906_Z14,    &zEC12_cost },
+  { "native", "",       PROCESSOR_NATIVE,      NULL }
 };
 
 extern int reload_completed;
@@ -847,7 +850,7 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
 
       if ((bflags & B_VXE) && !TARGET_VXE)
        {
-         error ("Builtin %qF requires arch12 or higher.", fndecl);
+         error ("Builtin %qF requires z14 or higher.", fndecl);
          return const0_rtx;
        }
     }
@@ -7359,7 +7362,8 @@ s390_asm_output_machine_for_arch (FILE *asm_out_file)
 {
   fprintf (asm_out_file, "\t.machinemode %s\n",
           (TARGET_ZARCH) ? "zarch" : "esa");
-  fprintf (asm_out_file, "\t.machine \"%s", processor_table[s390_arch].name);
+  fprintf (asm_out_file, "\t.machine \"%s",
+          processor_table[s390_arch].binutils_name);
   if (S390_USE_ARCHITECTURE_MODIFIERS)
     {
       int cpu_flags;
@@ -8093,7 +8097,7 @@ s390_issue_rate (void)
         instruction gets issued per cycle.  */
     case PROCESSOR_2827_ZEC12:
     case PROCESSOR_2964_Z13:
-    case PROCESSOR_ARCH12:
+    case PROCESSOR_3906_Z14:
     default:
       return 1;
     }
@@ -14309,7 +14313,7 @@ s390_get_sched_attrmask (rtx_insn *insn)
        mask |= S390_SCHED_ATTR_MASK_GROUPALONE;
       break;
     case PROCESSOR_2964_Z13:
-    case PROCESSOR_ARCH12:
+    case PROCESSOR_3906_Z14:
       if (get_attr_z13_cracked (insn))
        mask |= S390_SCHED_ATTR_MASK_CRACKED;
       if (get_attr_z13_expanded (insn))
@@ -14333,7 +14337,7 @@ s390_get_unit_mask (rtx_insn *insn, int *units)
   switch (s390_tune)
     {
     case PROCESSOR_2964_Z13:
-    case PROCESSOR_ARCH12:
+    case PROCESSOR_3906_Z14:
       *units = 3;
       if (get_attr_z13_unit_lsu (insn))
        mask |= 1 << 0;
index f277ac55effac293578f83058807ed8e4e1a1521..4dab1b655a3e3feb9c79b89bfc247d99d24f94ff 100644 (file)
@@ -113,7 +113,10 @@ EnumValue
 Enum(processor_type) String(arch11) Value(PROCESSOR_2964_Z13)
 
 EnumValue
-Enum(processor_type) String(arch12) Value(PROCESSOR_ARCH12)
+Enum(processor_type) String(z14) Value(PROCESSOR_3906_Z14)
+
+EnumValue
+Enum(processor_type) String(arch12) Value(PROCESSOR_3906_Z14)
 
 EnumValue
 Enum(processor_type) String(native) Value(PROCESSOR_NATIVE) DriverOnly