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
- From: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- To: Richard dot Earnshaw at arm dot com
- Cc: aoliva at redhat dot com (Alexandre Oliva), weigand at immd1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), dje at watson dot ibm dot com, drow at mvista dot com, hpenner at de dot ibm dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Jan 2003 19:06:41 +0100 (MET)
- Subject: Re: S/390: -march= and -mcpu= options
Richard Earnshaw wrote:
> The problem here is that tuning for an architecture (ie an abstract ISA)
> can be meaningless. There can be multiple implementations of an ISA with
> different trade-offs. You just can't guess and give good results.
I think the question here is really in what terms the 'architecture'
is specified (I guess this is also what David Edelsohn was talking
about earlier on). If the set of tags after -march= is different
from the set of tags after -mtune=, then this becomes a issue.
However, I was imagining that after -march=, you simply specific an
*CPU* name; the implication being 'assume the ISA as implemented by
the CPU xxx'.
At least on S/390, I cannot think of any practical means of specifying
an ISA; the official description of the ISA on a S/390 G6 CPU, for example,
would be: Enterprise Systems Architecture/390 with the following
optional architecture features installed: string-instruction facility,
immediate-and-relative-instruction facility, compare-and-move-extended
facility, checksum facility, floating-point extension facilities. (This
includes only those facilities that GCC currently makes use of, the full
list would be quite a bit longer.)
IMO it would be impractical to require the user to specify the
architecture on this level; what the user wants to say is 'use
whatever architecture facilities a G6 provides' ...
Now, *if* the user specifies a CPU name as argument to -march=,
and does not specify any -mtune= switch, I would consider it
reasonable to default -mtune= to that CPU that was given with
-march=.
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de