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


On Mon, Dec 23, 2002 at 02:52:24PM -0500, David Edelsohn wrote:
> >>>>> 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

Then why is -mcpu= necessary, if there is no backwards compatibility
issue on S/390?  It's a shorthand for -march=z900 -mtune=z900, if I'm
reading your comments above correctly.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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