This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/4] S390 -march=native related fixes
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: vogt at linux dot vnet dot ibm dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Jul 2015 19:05:27 +0200 (CEST)
- Subject: Re: [PATCH 3/4] S390 -march=native related fixes
- Authentication-results: sourceware.org; auth=none
Dominik Vogt wrote:
> * config/s390/driver-native.c (s390_host_detect_local_cpu): Handle
> processor capabilities with -march=native.
> * config/s390/s390.h (MARCH_MTUNE_NATIVE_SPECS): Likewise.
> (DRIVER_SELF_SPECS): Likewise. Join specs for 31 and 64 bit.
> * (S390_TARGET_BITS_STRING): Macro to simplify specs.
(That last "*" is superfluous.)
This looks correct to me now, just a cosmetic comment:
> +/* Defaulting rules. */
> +#define DRIVER_SELF_SPECS \
> + "%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}} ", \
> + MARCH_MTUNE_NATIVE_SPECS, \
> + "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}} ", \
> + "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}} "
There's no need to add those spaces at the end -- the self specs
are all independent string, they don't need to end in a space.
Also, I had thought to put MARCH_MTUNE_NATIVE_SPECS right at the
top of list, like so:
#define DRIVER_SELF_SPECS \
MARCH_MTUNE_NATIVE_SPECS, \
"%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}}", \
"%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \
"%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}"
But there should not be any functional difference between the two,
it just looks a bit nicer maybe.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com