[Committed] S/390: Support z14 as CPU name.

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.

From-SVN: r250739
This commit is contained in:
Andreas Krebbel 2017-07-31 11:31:09 +00:00 committed by Andreas Krebbel
parent 0688f9c152
commit 2731a5b331
7 changed files with 53 additions and 23 deletions

View 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

View 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
;;
*)

View 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;
}
}

View 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;
}

View 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
};

View 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;

View 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