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: S/390: -march= and -mcpu= options


>>>>> Hartmut Penner writes:

> I agree, mtune is more intuitive. My decision for mcpu was based on the
> fact, that it is used in most backend, and especially on the x86 port. If
> there is a agreement on the mailing list, that mtune is preferred, I would
> change it for S/390 accordingly.

	The original discussion did reach consensus, but not what has been
discussed in this thread.  The agreement is that three options are
necessary: -march=, -mtune=, and -mcpu=.

-march=		Enable optional architecture features for a particular CPU
		(e.g., GCC target_flags).

-mtune=		Choose a scheduling model for a particular CPU.

-mcpu=		Choose both architecture features and scheduling model.


To compile with backwards compatibility for MMX but tuned for the latest
Pentium4 processor pipelin, one would use

	gcc -march=pentium-mmx -mtune=pentium4

To compile with all options optimally set for Athlon, one would use

	gcc -mcpu=athlon

In the zSeries case, to compile with backwards compatibility for G5 but
tuned for z900, one would use

	gcc -march=g5 -mtune=z900

To utilize all z900 features, one would use

	gcc -mcpu=z900

David


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