From owner-freebsd-arch Fri Feb 23 18:42:27 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 0DC5437B491 for ; Fri, 23 Feb 2001 18:42:24 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id NAA24829; Sat, 24 Feb 2001 13:42:10 +1100 Date: Sat, 24 Feb 2001 13:33:14 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Kris Kennaway Cc: Alexander Leidinger , arch@FreeBSD.ORG Subject: Re: cvs commit: src/share/mk sys.mk In-Reply-To: <20010223010514.A41551@mollari.cthul.hu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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