public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Alsberg <alsbergt@cs.huji.ac.il>
To: Paul Brook <paul@codesourcery.com>
Cc: GCC Mailing List <gcc@gcc.gnu.org>
Subject: Re: -mtune != -march (>=) - optimizing for a higher architecture
Date: Sat, 25 Sep 2004 19:37:00 -0000	[thread overview]
Message-ID: <20040925175040.GA67405@cs.huji.ac.il> (raw)
In-Reply-To: <200409251350.59205.paul@codesourcery.com>

On Sat, Sep 25, 2004 at 01:50:59PM +0100, Paul Brook wrote:
> On Saturday 25 September 2004 10:06, Tom Alsberg wrote:
> > Hi there...
> >
> > Recently I built GCC 3.4.2 for Linux, and read through a bit of its
> > documentation.  In (gcc.info)i386 and x86-64 Options, it is said under
> > `-march=CPU-TYPE':  specifying `-march=CPU-TYPE' implies
> > `-mtune=CPU-TYPE'.
> >
> > I wonder, then - how could I compile code that would be optimized for
> > one x86 CPU family member (say, pentium3), but that would run on all
> > x86 CPUs since some older one (say, i586), and fully take advantage of
> > that older (but still newer than i386) one's instruction and register
> > set, etc?
> 
> Specify both -march= and -mtune=

OK, so this would work as I asked?  Thanks, then...

I suggest a documentation correction, then, though...  As in the
documentation, it states under `-march=CPU-TYPE' in
(gcc.info)i386 and x86-64 Options: 

Moreover, specifying `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.

Which I would understand to mean that -march=pentium would imply 
-mtune=pentium, and thus adding -mtune=pentium3 won't apply.

> Paul

  Thanks,
  -- Tom

> P.S. This is the wrong place to be asking this sort of question. 

I'm sorry for that.  Didn't grasp the exact description of this list.
Further usage help requests from me will go to gcc-help...

> This list is for development *of" gcc, not development *with* gcc. 
> You might try gcc-help@gcc.gnu.org for further questions.

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page:	http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent 
what
my fingers have typed on the keyboard, save anything further.

  reply	other threads:[~2004-09-25 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25 11:44 Tom Alsberg
2004-09-25 14:56 ` Paul Brook
2004-09-25 19:37   ` Tom Alsberg [this message]
2004-09-25 21:50     ` Reducing the size of the binaries Juan Ignacio Garzón
2004-09-25 21:51       ` Oscar Fuentes
2004-09-25 21:51       ` Kevin Puetz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040925175040.GA67405@cs.huji.ac.il \
    --to=alsbergt@cs.huji.ac.il \
    --cc=gcc@gcc.gnu.org \
    --cc=paul@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).