Commit 0dbb19f0 by Andreas Krebbel Committed by Andreas Krebbel

S/390: Add support for arch<n> arch/tune options.

This patch adds an alternate CPU level naming following the
architecture level number in the Principles of Operations manual.  So
instead of having z196, zEC12, and z13 you can use arch9, arch10, and
arch11.  The old cpu names stay valid and should preferably be used.

The alternate names are supposed to improve compatibility with the IBM
XL compiler toolchain which uses the arch numbering.

gcc/testsuite/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gcc.target/s390/target-attribute/tattr-m64-33.c: New test.

gcc/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.opt: Support alternate cpu level naming (archXX).
	* config.gcc: Support alternate archXX cpu levels with
	--with-arch= and --with-tune=.
	* config/s390/linux.h: Translate new archXX cpu levels to the
	original names when calling GAS.
	* config/s390/tpf.h: Likewise.
	* doc/invoke.texi: Document the alternate cpu level names.

From-SVN: r241643
parent c19066a7
2016-10-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.opt: Support alternate cpu level naming (archXX).
* config.gcc: Support alternate archXX cpu levels with
--with-arch= and --with-tune=.
* config/s390/linux.h: Translate new archXX cpu levels to the
original names when calling GAS.
* config/s390/tpf.h: Likewise.
* doc/invoke.texi: Document the alternate cpu level names.
2016-10-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/77919
......@@ -4172,7 +4172,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)
"" | native | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | arch3 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11)
# OK
;;
*)
......
......@@ -47,9 +47,19 @@ along with GCC; see the file COPYING3. If not see
/* Target specific assembler settings. */
/* Rewrite -march=arch* options to the original CPU name in order to
make it work with older binutils. */
#undef ASM_SPEC
#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}"
#define ASM_SPEC \
"%{m31&m64}%{mesa&mzarch}%{march=z*}" \
"%{march=arch3:-march=g5}" \
"%{march=arch5:-march=z900}" \
"%{march=arch6:-march=z990}" \
"%{march=arch7:-march=z9-ec}" \
"%{march=arch8:-march=z10}" \
"%{march=arch9:-march=z196}" \
"%{march=arch10:-march=zEC12}" \
"%{march=arch11:-march=z13}"
/* Target specific linker settings. */
......
......@@ -62,33 +62,57 @@ EnumValue
Enum(processor_type) String(g5) Value(PROCESSOR_9672_G5)
EnumValue
Enum(processor_type) String(arch3) Value(PROCESSOR_9672_G5)
EnumValue
Enum(processor_type) String(g6) Value(PROCESSOR_9672_G6)
EnumValue
Enum(processor_type) String(z900) Value(PROCESSOR_2064_Z900)
EnumValue
Enum(processor_type) String(arch5) Value(PROCESSOR_2064_Z900)
EnumValue
Enum(processor_type) String(z990) Value(PROCESSOR_2084_Z990)
EnumValue
Enum(processor_type) String(arch6) Value(PROCESSOR_2084_Z990)
EnumValue
Enum(processor_type) String(z9-109) Value(PROCESSOR_2094_Z9_109)
EnumValue
Enum(processor_type) String(z9-ec) Value(PROCESSOR_2094_Z9_EC)
EnumValue
Enum(processor_type) String(arch7) Value(PROCESSOR_2094_Z9_EC)
EnumValue
Enum(processor_type) String(z10) Value(PROCESSOR_2097_Z10)
EnumValue
Enum(processor_type) String(arch8) Value(PROCESSOR_2097_Z10)
EnumValue
Enum(processor_type) String(z196) Value(PROCESSOR_2817_Z196)
EnumValue
Enum(processor_type) String(arch9) Value(PROCESSOR_2817_Z196)
EnumValue
Enum(processor_type) String(zEC12) Value(PROCESSOR_2827_ZEC12)
EnumValue
Enum(processor_type) String(arch10) Value(PROCESSOR_2827_ZEC12)
EnumValue
Enum(processor_type) String(z13) Value(PROCESSOR_2964_Z13)
EnumValue
Enum(processor_type) String(arch11) Value(PROCESSOR_2964_Z13)
EnumValue
Enum(processor_type) String(native) Value(PROCESSOR_NATIVE) DriverOnly
mbackchain
......
......@@ -90,9 +90,20 @@ along with GCC; see the file COPYING3. If not see
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
/* Rewrite -march=arch* options to the original CPU name in order to
make it work with older binutils. */
#undef ASM_SPEC
#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*} \
-alshd=%b.lst"
#define ASM_SPEC \
"%{m31&m64}%{mesa&mzarch}%{march=z*}" \
"%{march=arch3:-march=g5}" \
"%{march=arch5:-march=z900}" \
"%{march=arch6:-march=z990}" \
"%{march=arch7:-march=z9-ec}" \
"%{march=arch8:-march=z10}" \
"%{march=arch9:-march=z196}" \
"%{march=arch10:-march=zEC12}" \
"%{march=arch11:-march=z13}" \
" -alshd=%b.lst"
#undef LIB_SPEC
#define LIB_SPEC "-lCTIS -lCISO -lCLBM -lCTAL -lCFVS -lCTBX -lCTXO \
......
......@@ -22221,10 +22221,18 @@ The default is to not print debug information.
@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{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.
@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}, and
@samp{native}.
The default is @option{-march=z900}. @samp{g5}/@samp{arch3} and
@samp{g6} are deprecated and will be removed with future releases.
Specifying @samp{native} as cpu type can be used to select the best
architecture option for the host processor.
@option{-march=native} has no effect if GCC does not recognize the
processor.
@item -mtune=@var{cpu-type}
@opindex mtune
......
2016-10-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/target-attribute/tattr-m64-33.c: New test.
2016-10-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/77919
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment