This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: S/390: -march= and -mcpu= options
On 24-Dec-2002, Ulrich Weigand <weigand@immd1.informatik.uni-erlangen.de> wrote:
> David Edelsohn wrote:
>
> > Your premise is wrong. z900 64-bit code cannot run on a G5
> > system, but G5 code can run on a z900 system. One may want to compile
> > applications tuned for systems with the widest deployment or tuned for
> > newest systems.
>
> Sure, I agree that we need something like a -mtune option, however it
> is called, that allows to generate code tuned for a new CPU but still
> running on old CPUs. However, *if* the user employs the -march option
> to allow generation of code that does *not* run on old CPUs, it would
> be strange to tune such code to an old CPU which it cannot run on,
> wouldn't it?
Yes.
Perhaps GCC should issue a warning message in this case.
> Thus, if there is no explicit -mtune option, it should IMO always
> default to the CPU type specified with -march.
Here I don't agree.
For example, consider x86.
The default arch should be 386, to ensure wide compatibility.
The default tuning should be for something a lot more modern,
e.g. Pentium-<mumble>.
If an application is compiled with the arch set to 486 (-march=486),
this should not alter the default tuning.
The only time it makes sense to override the default tuning is when
the default tuning is for a system which does not support the specified
arch.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.