diff options
author | Andreas Krebbel <krebbel@linux.ibm.com> | 2022-04-12 07:41:33 +0200 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.ibm.com> | 2022-04-12 07:58:57 +0200 |
commit | 82a4c5c704433249aa2adc89ef58b6b70e50c930 (patch) | |
tree | deb1a75ba3882d76bdda40962e936637399f1772 /gcc/config/s390 | |
parent | 0899b22d9329c1e8fc12d6f0deee0f87dcc0163a (diff) | |
download | gcc-82a4c5c704433249aa2adc89ef58b6b70e50c930.zip gcc-82a4c5c704433249aa2adc89ef58b6b70e50c930.tar.gz gcc-82a4c5c704433249aa2adc89ef58b6b70e50c930.tar.bz2 |
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.
Diffstat (limited to 'gcc/config/s390')
-rw-r--r-- | gcc/config/s390/driver-native.cc | 6 | ||||
-rw-r--r-- | gcc/config/s390/s390-opts.h | 2 | ||||
-rw-r--r-- | gcc/config/s390/s390.cc | 14 | ||||
-rw-r--r-- | gcc/config/s390/s390.h | 16 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 6 | ||||
-rw-r--r-- | gcc/config/s390/s390.opt | 5 |
6 files changed, 25 insertions, 24 deletions
diff --git a/gcc/config/s390/driver-native.cc b/gcc/config/s390/driver-native.cc index 48524c4..b5eb222 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 1ec8463..4ef82ac 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 d2af6d8..1342a2e 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 5a64048..c44fcdf 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 d0f233e..aecfe4b 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 5068486..9e8d3bf 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 |