This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] S390 -march=native related fixes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]