]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s390: Deprecate ESA/390 support
authorStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Tue, 11 Mar 2025 08:28:06 +0000 (09:28 +0100)
committerStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Tue, 11 Mar 2025 08:28:06 +0000 (09:28 +0100)
Deprecate support for the ESA/390 architecture which will be eventually
removed, and encourage the usage of the z/Architecture instead.

Furthermore, default for -m31 to -mzarch whereas previously we defaulted
to -mesa.

gcc/ChangeLog:

* config.gcc: Fail in case of option --with-mode=esa.
* config/s390/s390.cc (s390_option_override_internal): Default
to z/Architecture mode.
* config/s390/s390.h (DRIVER_SELF_SPECS): Ditto.
* config/s390/s390.opt: Emit a warning for option -mesa.
* doc/invoke.texi: Document the change.

gcc/testsuite/ChangeLog:

* gcc.target/s390/20020926-1.c: Deal with deprecation warning.
* gcc.target/s390/dwarfregtable-1.c: Ditto.
* gcc.target/s390/fp2int1.c: Ditto.
* gcc.target/s390/pr102222.c: Ditto.
* gcc.target/s390/pr106355-3.c: Ditto.
* gcc.target/s390/pr61078.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-10.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-12.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-14.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-18.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-2.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-20.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-22.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-24.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-26.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-28.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-30.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-32.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-4.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-6.c: Ditto.
* gcc.target/s390/target-attribute/tattr-m31-8.c: Ditto.

26 files changed:
gcc/config.gcc
gcc/config/s390/s390.cc
gcc/config/s390/s390.h
gcc/config/s390/s390.opt
gcc/doc/invoke.texi
gcc/testsuite/gcc.target/s390/20020926-1.c
gcc/testsuite/gcc.target/s390/dwarfregtable-1.c
gcc/testsuite/gcc.target/s390/fp2int1.c
gcc/testsuite/gcc.target/s390/pr102222.c
gcc/testsuite/gcc.target/s390/pr106355-3.c
gcc/testsuite/gcc.target/s390/pr61078.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-10.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-12.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-14.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-18.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-2.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-20.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-22.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-24.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-26.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-28.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-30.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-32.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-4.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-6.c
gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-8.c

index a518e976b82e8feaecf5c31a6293e04a0519f6cd..c4816e26f82f54e54c1f181908ffe0f76590b069 100644 (file)
@@ -5768,9 +5768,13 @@ case "${target}" in
                done
 
                case ${with_mode} in
-               "" | esa | zarch)
+               "" | zarch)
                        # OK
                        ;;
+               esa)
+                       echo "Support for ESA/390 is deprecated; use z/Architecture instead." 1>&2
+                       exit 1
+                       ;;
                *)
                        echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
                        exit 1
index 2f516967e7b12927eeb2fcb79e517f9866cba0f7..645aedba67f00eed80df41a1455732ed916a48d9 100644 (file)
@@ -16231,12 +16231,7 @@ s390_option_override_internal (struct gcc_options *opts,
 {
   /* Architecture mode defaults according to ABI.  */
   if (!(opts_set->x_target_flags & MASK_ZARCH))
-    {
-      if (TARGET_64BIT)
-       opts->x_target_flags |= MASK_ZARCH;
-      else
-       opts->x_target_flags &= ~MASK_ZARCH;
-    }
+    opts->x_target_flags |= MASK_ZARCH;
 
   /* Set the march default in case it hasn't been specified on cmdline.  */
   if (!opts_set->x_s390_arch)
index 6f7195db04e18486e7b4b8fd36f4fc9ac1b07a7c..5731ae99bcd5ff614f28e2b0a174fc45dcb6e297 100644 (file)
@@ -302,7 +302,7 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
 #define DRIVER_SELF_SPECS                                      \
   MARCH_MTUNE_NATIVE_SPECS,                                    \
   "%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}}",             \
-  "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}",            \
+  "%{!mesa:%{!mzarch:-mzarch}}",                               \
   "%{!march=*:-march=z900}"
 
 /* Target machine storage layout.  */
index f064597f8367046763983d1903bb67c373f62454..f0cb07a871a6c2f0e32e853e6b3c729f99bc65b8 100644 (file)
@@ -136,7 +136,7 @@ Target Mask(DEBUG_ARG) Save
 Additional debug prints.
 
 mesa
-Target RejectNegative Negative(mzarch) InverseMask(ZARCH)
+Target RejectNegative Negative(mzarch) InverseMask(ZARCH) Warn(%<-mesa%> is deprecated and support for ESA/390 will be removed; use %<-mzarch%> instead)
 ESA/390 architecture.
 
 mhard-dfp
index afa269b2f5ddda857a8f785e0c0b69d5618a12e4..4fbb4cda101ebd14891a3ad80aa5b1bc069b45c6 100644 (file)
@@ -33114,7 +33114,10 @@ GNU/Linux for S/390 ABI@.  When @option{-m64} is specified, generate
 code compliant to the GNU/Linux for zSeries ABI@.  This allows GCC in
 particular to generate 64-bit instructions.  For the @samp{s390}
 targets, the default is @option{-m31}, while the @samp{s390x}
-targets default to @option{-m64}.
+targets default to @option{-m64}.  Note, previously, @option{-m31} defaulted to
+@option{-mesa} unless @option{-mzarch} was explicitely specified.  Now,
+@option{-m31} defaults to @option{-mzarch} unless @option{-mesa} is explicitely
+specified since ESA/390 support is deprecated and will be removed.
 
 @opindex mzarch
 @opindex mesa
@@ -33128,6 +33131,7 @@ not possible with @option{-m64}.
 When generating code compliant to the GNU/Linux for S/390 ABI,
 the default is @option{-mesa}.  When generating code compliant
 to the GNU/Linux for zSeries ABI, the default is @option{-mzarch}.
+Option @option{-mesa} is deprecated and support for ESA/390 will be removed.
 
 @opindex mhtm
 @opindex mno-htm
index aaa1342769682c7360df203d5368db095af29d36..868a0ad8689c5f1998a43a1e85d41a9eec4d3bb3 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile { target { s390-*-* } } } */
 /* { dg-options "-O2 -mesa" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 int test (int *addr)
 {
index b125498745155ab5c260ea1ef2e0a8c4f81ecd77..6c7d231f50ec5243e74f3fd7fa7612db82ae86e4 100644 (file)
@@ -2,6 +2,7 @@
 
 /* { dg-do compile { target { ! lp64 } } } */
 /* { dg-options "-mesa" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 #define DWARF_FRAME_REGISTERS 34
 
index 4a90a8b91deda3ad6748e633f262aa96e2d629ea..4b359b7741bb7d407af3fd23d3cc5b0385d44e57 100644 (file)
@@ -7,6 +7,7 @@
 /* { dg-do run { target s390-*-* } } */
 /* { dg-options "-O3 -mesa" } */
 /* { dg-require-effective-target fenv_exceptions } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 #define _GNU_SOURCE
 #include <stdlib.h>
index 47d075e47fcc7a79e861a6f4d0f2783ca2342e28..8ab14721c2a488dd1e72f72521deb861d885889f 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -m31 -mesa" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 struct squashfs_reg_inode_header_1 read_inode_inode;
 
index 39daea44fc4a3d205272144cbd47da57fe9a920b..f4f7f366bfae6fabd39ff973ea99ce3762dfc716 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { s390-*-* } } } */
 /* { dg-options "-foptimize-sibling-calls -mesa" } */
 /* { dg-final { scan-assembler {brasl\t%r\d+,bar} } } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /* This tests function s390_call_saved_register_used where
    REG_P (parm_rtx) and nregs == 2 holds.  */
index 40f6ad7df098465d9e8db489d7a94e1741162b10..827c3fe6bf83bee5ba79213e03af13196dc010f2 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do run { target { ! lp64 } } } */
 /* { dg-options "-O2 -mesa" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 extern void abort (void);
 
index f1beb1d8773e25ac8f6ff3989bc170d063f20957..421a08e49fba2d35561b17b39dc848d9395f3319 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index 8868f91df52f7ed565a93b3cf52dba94f3fbef62..61fb7e9db5d5d261a422903a3ac325ca2e63ed78 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index f928befa057665dd6a4215cece3a9be5b4e80540..6b3780ec825e15ed0b84c7853f9eb79765e387b3 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index 878f0020b4377b192c0c4336a6191887b039e6fc..2459bae92fad353c79f90f9e2d409ef135ff8b99 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index c663b9eb75c828742ed362d021e95106cbe9aea8..e32040c207cd3c479c93664155717ac22e6f7f18 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index e9eacaa07a20bc21b8b0252884ee4afe35c0bbea..75a1e88d059fd01a47dd4f9b85c64e0d86dfddf7 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index 15954759ac96018def81cae7ec41373288332c34..573e931673f38b96655ccaee434bf17609d135c8 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z13 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -mhard-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index 87e4da5750a3f9b60fc796f17a7e54eeef799484..49f908b951dd54d3fa4f6f784e24ee210c6611d9 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mno-backchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index e4b49dc052f1021bc5884a2fd3932460f4d65dc0..4d8e023fcf0faaca092a5ba8a8aefa8d0061d1c4 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index ae784a6353364f71a5d42dc70d49bf996ac93dbf..4d23cad71537564885feced08a5f8e6544b8763a 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index f82d9ee216f5f3a5b60f43484dca9d79b9e2efe0..cbe4c9135bff8987d6d35cd06e5e826a4eaf30c6 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index 6bdc55af5d9a580df64d2da2528bc8a800e82efd..ea6f482eccdf82edfff62ec14fac7d132e64b2d1 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index 5780f96500f17713856b998392dfb09ed34a8816..08358bbaf0626bffeda24b7135d86fcaaff2db60 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index a946ff85177ffc768cba761adb94ebd5865afa99..2692c864886487b14522cff695cb3d72e73d01a4 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **
index fee9644a50578c1f284763a2d658efe4466a96f3..a601511f2ced69568760fec822e3bfe73cd558cc 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do assemble { target { ! lp64 } } } */
 /* { dg-require-effective-target target_attribute } */
 /* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
+/* { dg-excess-errors "-mesa is deprecated" } */
 
 /**
  **