From owner-freebsd-hackers Fri Sep 6 17:56: 4 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 330EE37B42B for ; Fri, 6 Sep 2002 17:55:48 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B34C243E3B for ; Fri, 6 Sep 2002 17:55:47 -0700 (PDT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 7AC18AE147; Fri, 6 Sep 2002 17:55:47 -0700 (PDT) Date: Fri, 6 Sep 2002 17:55:47 -0700 From: Maxime Henrion To: Kris Kennaway Cc: Peter Wemm , Darren Pilgrim , Matthew Dillon , Dan Nelson , Terry Lambert , Jason Andresen , Dmitry Morozovsky , hackers@FreeBSD.ORG Subject: Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build) Message-ID: <20020907005547.GM86074@elvis.mu.org> References: <3D50664F.71603B49@pantherdragon.org> <20020807015511.A1A092A7D6@canning.wemm.org> <20020906203026.GA78157@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zx4FCpZtqtKETZ7O" Content-Disposition: inline In-Reply-To: <20020906203026.GA78157@xor.obsecurity.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --zx4FCpZtqtKETZ7O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Kris Kennaway wrote: > On Tue, Aug 06, 2002 at 06:55:11PM -0700, Peter Wemm wrote: > > > `-mcpu=CPU-TYPE' > > Tune to CPU-TYPE everything applicable about the generated code, > > except for the ABI and the set of available instructions. The > > choices for CPU-TYPE are `i386', `i486', `i586', `i686', > > `pentium', `pentium-mmx', `pentiumpro', `pentium2', `pentium3', > > `pentium4', `k6', `k6-2', `k6-3', `athlon', `athlon-tbird', > > `athlon-4', `athlon-xp' and `athlon-mp'. > > > > You can also add -msse, -msse2, -m3dnow to use those extensions. It would > > appear that our bsd.cpu.mk file is out of date and is missing the newer > > cpu types. > > How about the following patch (I've only tested 'pentium3'): [patch ripped] I've got a very similar patch which I believe to be a bit more complete because it also updates the MACHINE_CPU variable which lists the features available on a particular CPU. I attach it to this mail. Cheers, Maxime --zx4FCpZtqtKETZ7O Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cpu.patch" Index: bsd.cpu.mk =================================================================== RCS file: /space2/ncvs/src/share/mk/bsd.cpu.mk,v retrieving revision 1.16 diff -u -p -r1.16 bsd.cpu.mk --- bsd.cpu.mk 2 Aug 2002 18:04:22 -0000 1.16 +++ bsd.cpu.mk 11 Aug 2002 18:46:06 -0000 @@ -28,8 +28,8 @@ CPUTYPE = ultrasparc CPUTYPE = i686 . elif ${CPUTYPE} == "pentium" CPUTYPE = i586 -. elif ${CPUTYPE} == "athlon" -CPUTYPE = k7 +. elif ${CPUTYPE} == "k7" +CPUTYPE = athlon . endif . endif @@ -42,20 +42,30 @@ CPUTYPE = k7 # http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html . if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k7" +. if ${CPUTYPE} == "athlon-mp" +_CPUCFLAGS = -march=athlon-mp +. elif ${CPUTYPE} == "athlon-xp" +_CPUCFLAGS = -march=athlon-xp +. elif ${CPUTYPE} == "athlon-4" +_CPUCFLAGS = -march=athlon-4 +. elif ${CPUTYPE} == "athlon-tbird" +_CPUCFLAGS = -march=athlon-tbird +. elif ${CPUTYPE} == "athlon" _CPUCFLAGS = -march=athlon +. elif ${CPUTYPE} == "k6-3" +_CPUCFLAGS = -march=k6-3 . elif ${CPUTYPE} == "k6-2" -_CPUCFLAGS = -march=k6 +_CPUCFLAGS = -march=k6-2 . elif ${CPUTYPE} == "k6" _CPUCFLAGS = -march=k6 . elif ${CPUTYPE} == "k5" _CPUCFLAGS = -march=pentium . elif ${CPUTYPE} == "p4" -_CPUCFLAGS = -march=pentiumpro +_CPUCFLAGS = -march=pentium4 . elif ${CPUTYPE} == "p3" -_CPUCFLAGS = -march=pentiumpro +_CPUCFLAGS = -march=pentium3 . elif ${CPUTYPE} == "p2" -_CPUCFLAGS = -march=pentiumpro +_CPUCFLAGS = -march=pentium2 . elif ${CPUTYPE} == "i686" _CPUCFLAGS = -march=pentiumpro . elif ${CPUTYPE} == "i586/mmx" @@ -93,8 +103,18 @@ CFLAGS += ${_CPUCFLAGS} # presence of a CPU feature. .if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k7" +. if ${CPUTYPE} == "athlon-mp" +MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386 +. elif ${CPUTYPE} == "athlon-xp" +MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386 +. elif ${CPUTYPE} == "athlon-4" +MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386 +. elif ${CPUTYPE} == "athlon-tbird" +MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386 +. elif ${CPUTYPE} == "athlon" MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386 +. elif ${CPUTYPE} == "k6-3" +MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "k6-2" MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "k6" --zx4FCpZtqtKETZ7O-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message