S/390: Deprecate g5 and g6 CPU levels

gcc/ChangeLog:

2015-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/driver-native.c (s390_host_detect_local_cpu): Pick
	z900 -march -mtune even on g5 and g6 machines.
	* config/s390/s390.c (s390_option_override_internal): New argument
	to distingiush between options and target attributes.  Emit
	deprecation warning for g5 and g6 arch/tune options.
	(s390_option_override): Set new s390_option_override_internal
	argument to true.
	(s390_valid_target_attribute_tree): Set new
	s390_option_override_internal argument to false.
	* config/s390/s390.h: Default to z900 in the driver.
	* doc/invoke.texi: Document the deprecation of g5 and g6.

gcc/testsuite/ChangeLog:

2015-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gcc.target/s390/hotpatch-8.c: Add -Wno-deprecated to options.
	* gcc.target/s390/hotpatch-9.c: Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231806 138bc75d-0d04-0410-961f-82ee72b054a4
This commit is contained in:
krebbel 2015-12-18 09:20:53 +00:00
parent 95ec1e88fc
commit 3bd8520f09
8 changed files with 65 additions and 18 deletions

View File

@ -1,3 +1,17 @@
2015-12-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/driver-native.c (s390_host_detect_local_cpu): Pick
z900 -march -mtune even on g5 and g6 machines.
* config/s390/s390.c (s390_option_override_internal): New argument
to distingiush between options and target attributes. Emit
deprecation warning for g5 and g6 arch/tune options.
(s390_option_override): Set new s390_option_override_internal
argument to true.
(s390_valid_target_attribute_tree): Set new
s390_option_override_internal argument to false.
* config/s390/s390.h: Default to z900 in the driver.
* doc/invoke.texi: Document the deprecation of g5 and g6.
2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
* config/i386/djgpp-stdint.h: update typedefs for integer types

View File

@ -84,9 +84,8 @@ s390_host_detect_local_cpu (int argc, const char **argv)
machine_id = strtol (p, NULL, 16);
switch (machine_id)
{
/* g5 and g6 default to z900 */
case 0x9672:
cpu = "g5";
break;
case 0x2064:
case 0x2066:
cpu = "z900";

View File

@ -13569,9 +13569,27 @@ s390_function_specific_restore (struct gcc_options *opts,
}
static void
s390_option_override_internal (struct gcc_options *opts,
s390_option_override_internal (bool main_args_p,
struct gcc_options *opts,
const struct gcc_options *opts_set)
{
const char *prefix;
const char *suffix;
/* Set up prefix/suffix so the error messages refer to either the command
line argument, or the attribute(target). */
if (main_args_p)
{
prefix = "-m";
suffix = "";
}
else
{
prefix = "option(\"";
suffix = "\")";
}
/* Architecture mode defaults according to ABI. */
if (!(opts_set->x_target_flags & MASK_ZARCH))
{
@ -13583,13 +13601,26 @@ s390_option_override_internal (struct gcc_options *opts,
/* Set the march default in case it hasn't been specified on cmdline. */
if (!opts_set->x_s390_arch)
opts->x_s390_arch = TARGET_ZARCH_P (opts->x_target_flags)
? PROCESSOR_2064_Z900 : PROCESSOR_9672_G5;
opts->x_s390_arch = PROCESSOR_2064_Z900;
else if (opts->x_s390_arch == PROCESSOR_9672_G5
|| opts->x_s390_arch == PROCESSOR_9672_G6)
warning (OPT_Wdeprecated, "%sarch=%s%s is deprecated and will be removed "
"in future releases; use at least %sarch=z900%s",
prefix, opts->x_s390_arch == PROCESSOR_9672_G5 ? "g5" : "g6",
suffix, prefix, suffix);
opts->x_s390_arch_flags = processor_flags_table[(int) opts->x_s390_arch];
/* Determine processor to tune for. */
if (!opts_set->x_s390_tune)
opts->x_s390_tune = opts->x_s390_arch;
else if (opts->x_s390_tune == PROCESSOR_9672_G5
|| opts->x_s390_tune == PROCESSOR_9672_G6)
warning (OPT_Wdeprecated, "%stune=%s%s is deprecated and will be removed "
"in future releases; use at least %stune=z900%s",
prefix, opts->x_s390_tune == PROCESSOR_9672_G5 ? "g5" : "g6",
suffix, prefix, suffix);
opts->x_s390_tune_flags = processor_flags_table[opts->x_s390_tune];
/* Sanity checks. */
@ -13800,7 +13831,7 @@ s390_option_override (void)
/* Set up function hooks. */
init_machine_status = s390_init_machine_status;
s390_option_override_internal (&global_options, &global_options_set);
s390_option_override_internal (true, &global_options, &global_options_set);
/* Save the initial options in case the user does function specific
options. */
@ -14102,7 +14133,7 @@ s390_valid_target_attribute_tree (tree args,
dest[i] |= src[i];
/* Do any overrides, such as arch=xxx, or tune=xxx support. */
s390_option_override_internal (opts, &new_opts_set);
s390_option_override_internal (false, opts, &new_opts_set);
/* Save the current options unless we are validating options for
#pragma. */
t = build_target_option_node (opts);

View File

@ -214,7 +214,7 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
MARCH_MTUNE_NATIVE_SPECS, \
"%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}}", \
"%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \
"%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}"
"%{!march=*:-march=z900}"
/* Constants needed to control the TEST DATA CLASS (TDC) instruction. */
#define S390_TDC_POSITIVE_ZERO (1 << 11)

View File

@ -20892,14 +20892,12 @@ The default is to not print debug information.
@item -march=@var{cpu-type}
@opindex march
Generate code that runs on @var{cpu-type}, which is the name of a system
representing a certain processor type. Possible values for
@var{cpu-type} are @samp{g5}, @samp{g6}, @samp{z900}, @samp{z990},
@samp{z9-109}, @samp{z9-ec}, @samp{z10}, @samp{z196}, @samp{zEC12},
and @samp{z13}.
When generating code using the instructions available on z/Architecture,
the default is @option{-march=z900}. Otherwise, the default is
@option{-march=g5}.
Generate code that runs on @var{cpu-type}, which is the name of a
system representing a certain processor type. Possible values for
@var{cpu-type} are @samp{z900}, @samp{z990}, @samp{z9-109},
@samp{z9-ec}, @samp{z10}, @samp{z196}, @samp{zEC12}, and @samp{z13}.
The default is @option{-march=z900}. @samp{g5} and @samp{g6} are
deprecated and will be removed with future releases.
@item -mtune=@var{cpu-type}
@opindex mtune

View File

@ -1,3 +1,8 @@
2015-12-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/hotpatch-8.c: Add -Wno-deprecated to options.
* gcc.target/s390/hotpatch-9.c: Likewise.
2015-12-18 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/68831

View File

@ -1,7 +1,7 @@
/* Functional tests for the function hotpatching feature. */
/* { dg-do compile { target { ! lp64 } } } */
/* { dg-options "-mesa -march=g5 -mhotpatch=0,3" } */
/* { dg-options "-mesa -march=g5 -Wno-deprecated -mhotpatch=0,3" } */
#include <stdio.h>

View File

@ -1,7 +1,7 @@
/* Functional tests for the function hotpatching feature. */
/* { dg-do compile { target { ! lp64 } } } */
/* { dg-options "-mesa -march=g5 -mhotpatch=0,4" } */
/* { dg-options "-mesa -march=g5 -Wno-deprecated -mhotpatch=0,4" } */
#include <stdio.h>