Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2001 13:33:14 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        Alexander Leidinger <Alexander@Leidinger.net>, arch@FreeBSD.ORG
Subject:   Re: cvs commit: src/share/mk sys.mk
Message-ID:  <Pine.BSF.4.21.0102241315540.25623-100000@besplex.bde.org>
In-Reply-To: <20010223010514.A41551@mollari.cthul.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 23 Feb 2001, Kris Kennaway wrote:

> On Thu, Feb 22, 2001 at 10:53:52PM +0100, Alexander Leidinger wrote:
> > > Hmm, that's not what's documented in the gcc info docs.
> > 
> > The docs are wrong.
> > 
> > > `-march=CPU TYPE'
> > >      Generate instructions for the machine type CPU TYPE.  The choices
> > >      for CPU TYPE are the same as for `-mcpu'.  Moreover, specifying
> > >      `-march=CPU TYPE' implies `-mcpu=CPU TYPE'.
> > 
> > That's not true, test it on your own (see my previous mail with my test
> > program) if you think the doc is right (or have a look at "man gcc" on a
> > system with gcc 2.95.3 (e.g. a recent -current)).

No, the docs are correct here.

Don't look at "man gcc".  It is not maintained except by non-FSF
volunteers (see the WARNING section on the first page of it).  In
practice, this means that it hasn't changed significantly since
rev.1.1.1.1 in 1994.

> Okay, I've built several binaries and libraries with -march=pentiumpro
> and -march=pentiumpro -mcpu=pentiumpro, and verified with diff -b that
> the output in both cases is indeed identical.  It looks like the docs
> are correct.

ITYM "incorrect".

This just shows that your tests didn't test the small areas where
-march makes a difference (other than implying -mcpu).  Examination
of gcc.295/config/i386/i386.{md,h} shows that it it only mainly (only?)
affects areas related to the i686 fcmov instruction.  The following
program uses these areas, so compiling it with -march=pentiumpro and
-mcpu=pentiumpro gives different results:

---
double d;
int i;

int
main(void)
{
	return (d == i);
}
---

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0102241315540.25623-100000>