summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2022-04-12 07:41:33 +0200
committerAndreas Krebbel <krebbel@linux.ibm.com>2022-04-12 07:58:57 +0200
commit82a4c5c704433249aa2adc89ef58b6b70e50c930 (patch)
treedeb1a75ba3882d76bdda40962e936637399f1772
parent0899b22d9329c1e8fc12d6f0deee0f87dcc0163a (diff)
downloadgcc-82a4c5c704433249aa2adc89ef58b6b70e50c930.tar.gz
IBM zSystems: Add support for z16 as CPU name.
So far z16 was identified as arch14. After the machine has been announced we can now add the real name. gcc/ChangeLog: * common/config/s390/s390-common.cc: Rename PF_ARCH14 to PF_Z16. * config.gcc: Add z16 as march/mtune switch. * config/s390/driver-native.cc (s390_host_detect_local_cpu): Recognize z16 with -march=native. * config/s390/s390-opts.h (enum processor_type): Rename PROCESSOR_ARCH14 to PROCESSOR_3931_Z16. * config/s390/s390.cc (PROCESSOR_ARCH14): Rename to ... (PROCESSOR_3931_Z16): ... throughout the file. (s390_processor processor_table): Add z16 as cpu string. * config/s390/s390.h (enum processor_flags): Rename PF_ARCH14 to PF_Z16. (TARGET_CPU_ARCH14): Rename to ... (TARGET_CPU_Z16): ... this. (TARGET_CPU_ARCH14_P): Rename to ... (TARGET_CPU_Z16_P): ... this. (TARGET_ARCH14): Rename to ... (TARGET_Z16): ... this. (TARGET_ARCH14_P): Rename to ... (TARGET_Z16_P): ... this. * config/s390/s390.md (cpu_facility): Rename arch14 to z16 and check TARGET_Z16 instead of TARGET_ARCH14. * config/s390/s390.opt: Add z16 to processor_type. * doc/invoke.texi: Document z16 and arch14.
-rw-r--r--gcc/common/config/s390/s390-common.cc4
-rw-r--r--gcc/config.gcc2
-rw-r--r--gcc/config/s390/driver-native.cc6
-rw-r--r--gcc/config/s390/s390-opts.h2
-rw-r--r--gcc/config/s390/s390.cc14
-rw-r--r--gcc/config/s390/s390.h16
-rw-r--r--gcc/config/s390/s390.md6
-rw-r--r--gcc/config/s390/s390.opt5
-rw-r--r--gcc/doc/invoke.texi3
9 files changed, 30 insertions, 28 deletions
diff --git a/gcc/common/config/s390/s390-common.cc b/gcc/common/config/s390/s390-common.cc
index caec2f14c6c..72a5ef47eaa 100644
--- a/gcc/common/config/s390/s390-common.cc
+++ b/gcc/common/config/s390/s390-common.cc
@@ -50,10 +50,10 @@ EXPORTED_CONST int processor_flags_table[] =
/* z15 */ PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT
| PF_EXTIMM | PF_DFP | PF_Z10 | PF_Z196 | PF_ZEC12 | PF_TX
| PF_Z13 | PF_VX | PF_VXE | PF_Z14 | PF_VXE2 | PF_Z15,
- /* arch14 */ PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT
+ /* z16 */ PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT
| PF_EXTIMM | PF_DFP | PF_Z10 | PF_Z196 | PF_ZEC12 | PF_TX
| PF_Z13 | PF_VX | PF_VXE | PF_Z14 | PF_VXE2 | PF_Z15
- | PF_NNPA | PF_ARCH14
+ | PF_NNPA | PF_Z16
};
/* Change optimizations to be performed, depending on the
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 48a5bbcf787..c5064dd3766 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5532,7 +5532,7 @@ case "${target}" in
for which in arch tune; do
eval "val=\$with_$which"
case ${val} in
- "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 | arch14 )
+ "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | z16 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 | arch14 )
# OK
;;
*)
diff --git a/gcc/config/s390/driver-native.cc b/gcc/config/s390/driver-native.cc
index 48524c49251..b5eb222872d 100644
--- a/gcc/config/s390/driver-native.cc
+++ b/gcc/config/s390/driver-native.cc
@@ -123,8 +123,12 @@ s390_host_detect_local_cpu (int argc, const char **argv)
case 0x8562:
cpu = "z15";
break;
+ case 0x3931:
+ case 0x3932:
+ cpu = "z16";
+ break;
default:
- cpu = "arch14";
+ cpu = "z16";
break;
}
}
diff --git a/gcc/config/s390/s390-opts.h b/gcc/config/s390/s390-opts.h
index 1ec84631a5f..4ef82ac5d34 100644
--- a/gcc/config/s390/s390-opts.h
+++ b/gcc/config/s390/s390-opts.h
@@ -38,7 +38,7 @@ enum processor_type
PROCESSOR_2964_Z13,
PROCESSOR_3906_Z14,
PROCESSOR_8561_Z15,
- PROCESSOR_ARCH14,
+ PROCESSOR_3931_Z16,
PROCESSOR_NATIVE,
PROCESSOR_max
};
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index d2af6d8813d..1342a2e7db0 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -337,7 +337,7 @@ const struct s390_processor processor_table[] =
{ "z13", "z13", PROCESSOR_2964_Z13, &zEC12_cost, 11 },
{ "z14", "arch12", PROCESSOR_3906_Z14, &zEC12_cost, 12 },
{ "z15", "arch13", PROCESSOR_8561_Z15, &zEC12_cost, 13 },
- { "arch14", "arch14", PROCESSOR_ARCH14, &zEC12_cost, 14 },
+ { "z16", "arch14", PROCESSOR_3931_Z16, &zEC12_cost, 14 },
{ "native", "", PROCESSOR_NATIVE, NULL, 0 }
};
@@ -853,12 +853,6 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
error ("Builtin %qF requires z15 or higher", fndecl);
return const0_rtx;
}
-
- if ((bflags & B_NNPA) && !TARGET_NNPA)
- {
- error ("Builtin %qF requires arch14 or higher.", fndecl);
- return const0_rtx;
- }
}
if (fcode >= S390_OVERLOADED_BUILTIN_VAR_OFFSET
&& fcode < S390_ALL_BUILTIN_MAX)
@@ -8525,7 +8519,7 @@ s390_issue_rate (void)
case PROCESSOR_2827_ZEC12:
case PROCESSOR_2964_Z13:
case PROCESSOR_3906_Z14:
- case PROCESSOR_ARCH14:
+ case PROCESSOR_3931_Z16:
default:
return 1;
}
@@ -14879,7 +14873,7 @@ s390_get_sched_attrmask (rtx_insn *insn)
mask |= S390_SCHED_ATTR_MASK_GROUPOFTWO;
break;
case PROCESSOR_8561_Z15:
- case PROCESSOR_ARCH14:
+ case PROCESSOR_3931_Z16:
if (get_attr_z15_cracked (insn))
mask |= S390_SCHED_ATTR_MASK_CRACKED;
if (get_attr_z15_expanded (insn))
@@ -14927,7 +14921,7 @@ s390_get_unit_mask (rtx_insn *insn, int *units)
mask |= 1 << 3;
break;
case PROCESSOR_8561_Z15:
- case PROCESSOR_ARCH14:
+ case PROCESSOR_3931_Z16:
*units = 4;
if (get_attr_z15_unit_lsu (insn))
mask |= 1 << 0;
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 5a64048a5a1..c44fcdf6023 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -43,7 +43,7 @@ enum processor_flags
PF_VXE2 = 8192,
PF_Z15 = 16384,
PF_NNPA = 32768,
- PF_ARCH14 = 65536
+ PF_Z16 = 65536
};
/* This is necessary to avoid a warning about comparing different enum
@@ -110,10 +110,10 @@ enum processor_flags
(s390_arch_flags & PF_VXE2)
#define TARGET_CPU_VXE2_P(opts) \
(opts->x_s390_arch_flags & PF_VXE2)
-#define TARGET_CPU_ARCH14 \
- (s390_arch_flags & PF_ARCH14)
-#define TARGET_CPU_ARCH14_P(opts) \
- (opts->x_s390_arch_flags & PF_ARCH14)
+#define TARGET_CPU_Z16 \
+ (s390_arch_flags & PF_Z16)
+#define TARGET_CPU_Z16_P(opts) \
+ (opts->x_s390_arch_flags & PF_Z16)
#define TARGET_CPU_NNPA \
(s390_arch_flags & PF_NNPA)
#define TARGET_CPU_NNPA_P(opts) \
@@ -177,9 +177,9 @@ enum processor_flags
(TARGET_VX && TARGET_CPU_VXE2)
#define TARGET_VXE2_P(opts) \
(TARGET_VX_P (opts) && TARGET_CPU_VXE2_P (opts))
-#define TARGET_ARCH14 (TARGET_ZARCH && TARGET_CPU_ARCH14)
-#define TARGET_ARCH14_P(opts) \
- (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_ARCH14_P (opts))
+#define TARGET_Z16 (TARGET_ZARCH && TARGET_CPU_Z16)
+#define TARGET_Z16_P(opts) \
+ (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_Z16_P (opts))
#define TARGET_NNPA \
(TARGET_ZARCH && TARGET_CPU_NNPA)
#define TARGET_NNPA_P(opts) \
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index d0f233e016b..aecfe4ba408 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -522,7 +522,7 @@
(const (symbol_ref "s390_tune_attr")))
(define_attr "cpu_facility"
- "standard,ieee,zarch,cpu_zarch,longdisp,extimm,dfp,z10,z196,zEC12,vx,z13,z14,vxe,z15,vxe2,arch14,nnpa"
+ "standard,ieee,zarch,cpu_zarch,longdisp,extimm,dfp,z10,z196,zEC12,vx,z13,z14,vxe,z15,vxe2,z16,nnpa"
(const_string "standard"))
(define_attr "enabled" ""
@@ -588,8 +588,8 @@
(match_test "TARGET_VXE2"))
(const_int 1)
- (and (eq_attr "cpu_facility" "arch14")
- (match_test "TARGET_ARCH14"))
+ (and (eq_attr "cpu_facility" "z16")
+ (match_test "TARGET_Z16"))
(const_int 1)
(and (eq_attr "cpu_facility" "nnpa")
diff --git a/gcc/config/s390/s390.opt b/gcc/config/s390/s390.opt
index 50684868692..9e8d3bfd404 100644
--- a/gcc/config/s390/s390.opt
+++ b/gcc/config/s390/s390.opt
@@ -116,7 +116,10 @@ EnumValue
Enum(processor_type) String(arch13) Value(PROCESSOR_8561_Z15)
EnumValue
-Enum(processor_type) String(arch14) Value(PROCESSOR_ARCH14)
+Enum(processor_type) String(arch14) Value(PROCESSOR_3931_Z16)
+
+EnumValue
+Enum(processor_type) String(z16) Value(PROCESSOR_3931_Z16)
EnumValue
Enum(processor_type) String(native) Value(PROCESSOR_NATIVE) DriverOnly
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1a51759e6e4..dd2d3879f86 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -29776,7 +29776,8 @@ system representing a certain processor type. Possible values for
@var{cpu-type} are @samp{z900}/@samp{arch5}, @samp{z990}/@samp{arch6},
@samp{z9-109}, @samp{z9-ec}/@samp{arch7}, @samp{z10}/@samp{arch8},
@samp{z196}/@samp{arch9}, @samp{zEC12}, @samp{z13}/@samp{arch11},
-@samp{z14}/@samp{arch12}, @samp{z15}/@samp{arch13}, and @samp{native}.
+@samp{z14}/@samp{arch12}, @samp{z15}/@samp{arch13},
+@samp{z16}/@samp{arch14}, and @samp{native}.
The default is @option{-march=z900}.