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


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


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