public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kelley Cook <kelley.r.cook@gm.com>
To: Greg Schafer <gschafer@zip.com.au>, gcc@gcc.gnu.org
Subject: Re: Default ix86_arch = i386
Date: Tue, 09 Jul 2002 11:16:00 -0000	[thread overview]
Message-ID: <3D2B0945.6030509@gm.com> (raw)
In-Reply-To: <20020709190738.A31376@tigers-lfs.nsw.bigpond.net.au>

Greg Schafer said:
>Hello gcc developers!
>
>Just wondering why gcc-3.1 defaults the ix86_arch to
>"i386" when the old gcc-2.95.x defaulted to "i586" ?
>
>Can anyone shed any light on the change and what the
>reasoning was? It looks like the change dates back as
>far as Sept' 99
>
>Thanks to everyone working on gcc.
>
>Greg

It actually hasn't changed...

For ia32 builds, the spec file that is created will contain a line
cpp_cpu_default: which will specify a default target tuning code. This default
will depend on whichever the target-triple gcc was configured with when you
built it.

When building gcc, if you don't specify a target-triple on the command line then
it defaults to whatever config.guess reports.  Under linux, config.guess grabs
the output from uname -m.  So if, for example, your linux kernel was compiled
using i386 (which is how most precompiled kernels come) then a gcc built under
it would default to i386.  If it was was optimized for an athlon then gcc would
default to creating code optimized for an athlon.

With post 2.95.x versions of gcc, "gcc -v" will tell you what target triple gcc
was configured  with.

Note that no matter which system you built the compiler with, unless you
manually supply an -march= line (or change the specs file to always do so), gcc
will default to creating a binary that will run on an i386 (though the
instructions will be optimally scheduled for whatever the target-triple says)
and therefore will not use newer instructions, such as the useful CMOVcc family
which was introduced with the PentiumPro.

HTH,
Kelley Cook


  reply	other threads:[~2002-07-09 16:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-09  5:07 Greg Schafer
2002-07-09 11:16 ` Kelley Cook [this message]
2002-07-10  4:29   ` Greg Schafer

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=3D2B0945.6030509@gm.com \
    --to=kelley.r.cook@gm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gschafer@zip.com.au \
    /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).