From owner-svn-src-stable@FreeBSD.ORG Wed Jan 5 13:26:26 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B854C1065673; Wed, 5 Jan 2011 13:26:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A67A18FC0A; Wed, 5 Jan 2011 13:26:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p05DQQES079447; Wed, 5 Jan 2011 13:26:26 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p05DQQK6079444; Wed, 5 Jan 2011 13:26:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201101051326.p05DQQK6079444@svn.freebsd.org> From: Marius Strobl Date: Wed, 5 Jan 2011 13:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217004 - in stable/8/share: examples/etc mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 13:26:26 -0000 Author: marius Date: Wed Jan 5 13:26:26 2011 New Revision: 217004 URL: http://svn.freebsd.org/changeset/base/217004 Log: MFC: r216820 - Add CPUTYPE support for sparc64. The net result is that it's now possible to let the compiler optimize for the famility of UltraSPARC-III CPUs as the default already was to optimize for UltraSPARC-I/II and generating generic 64-bit V9 is mainly for reference purposes. At least for SPARC64-V CPUs code optimized for UltraSPARC-I/II still is the most performant one. Thanks go to Michael Moll for testing SPARC64-V. - Move a booke MACHINE_CPU bit into the right section. Modified: stable/8/share/examples/etc/make.conf stable/8/share/mk/bsd.cpu.mk Directory Properties: stable/8/share/examples/ (props changed) stable/8/share/examples/etc/ (props changed) stable/8/share/examples/kld/syscall/ (props changed) stable/8/share/mk/ (props changed) Modified: stable/8/share/examples/etc/make.conf ============================================================================== --- stable/8/share/examples/etc/make.conf Wed Jan 5 12:47:42 2011 (r217003) +++ stable/8/share/examples/etc/make.conf Wed Jan 5 13:26:26 2011 (r217004) @@ -39,6 +39,8 @@ # Alpha/AXP architecture: ev67 ev6 pca56 ev56 ev5 ev45 ev4 # AMD64 architecture: opteron, athlon64, nocona, prescott, core2 # Intel ia64 architecture: itanium2, itanium +# SPARC-V9 architecture: v9 (generic 64-bit V9), ultrasparc (default +# if omitted), ultrasparc3 # # (?= allows to buildworld for a different CPUTYPE.) # Modified: stable/8/share/mk/bsd.cpu.mk ============================================================================== --- stable/8/share/mk/bsd.cpu.mk Wed Jan 5 12:47:42 2011 (r217003) +++ stable/8/share/mk/bsd.cpu.mk Wed Jan 5 13:26:26 2011 (r217004) @@ -15,6 +15,7 @@ MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "powerpc" MACHINE_CPU = aim . elif ${MACHINE_ARCH} == "sparc64" +MACHINE_CPU = ultrasparc . elif ${MACHINE_ARCH} == "arm" MACHINE_CPU = arm . elif ${MACHINE_ARCH} == "mips" @@ -58,6 +59,12 @@ CPUTYPE = athlon . if ${CPUTYPE} == "prescott" || ${CPUTYPE} == "core2" CPUTYPE = nocona . endif +. elif ${MACHINE_ARCH} == "sparc64" +. if ${CPUTYPE} == "us" +CPUTYPE = ultrasparc +. elif ${CPUTYPE} == "us3" +CPUTYPE = ultrasparc3 +. endif . endif ############################################################################### @@ -116,7 +123,6 @@ _CPUCFLAGS = -mcpu=${CPUTYPE} . endif . elif ${MACHINE_ARCH} == "powerpc" . if ${CPUTYPE} == "e500" -MACHINE_CPU = booke _CPUCFLAGS = -Wa,-me500 -msoft-float . else _CPUCFLAGS = -mcpu=${CPUTYPE} -mno-powerpc64 @@ -135,6 +141,14 @@ _CPUCFLAGS = -march=4kc . elif ${CPUTYPE} == "mips24kc" _CPUCFLAGS = -march=24kc . endif +. elif ${MACHINE_ARCH} == "sparc64" +. if ${CPUTYPE} == "v9" +_CPUCFLAGS = -mcpu=v9 +. elif ${CPUTYPE} == "ultrasparc" +_CPUCFLAGS = -mcpu=ultrasparc +. elif ${CPUTYPE} == "ultrasparc3" +_CPUCFLAGS = -mcpu=ultrasparc3 +. endif . endif # Set up the list of CPU features based on the CPU type. This is an @@ -191,6 +205,18 @@ MACHINE_CPU += amd64 sse2 sse mmx . if ${CPUTYPE} == "itanium" MACHINE_CPU = itanium . endif +. elif ${MACHINE_ARCH} == "powerpc" +. if ${CPUTYPE} == "e500" +MACHINE_CPU = booke +. endif +. elif ${MACHINE_ARCH} == "sparc64" +. if ${CPUTYPE} == "v9" +MACHINE_CPU = v9 +. elif ${CPUTYPE} == "ultrasparc" +MACHINE_CPU = v9 ultrasparc +. elif ${CPUTYPE} == "ultrasparc3" +MACHINE_CPU = v9 ultrasparc ultrasparc3 +. endif . endif .endif @@ -200,7 +226,7 @@ LDFLAGS += -mbig-endian LD += -EB .endif -.if ${MACHINE_ARCH} == "mips" +.if ${MACHINE_ARCH} == "mips" . if defined(TARGET_BIG_ENDIAN) CFLAGS += -EB LDFLAGS += -Wl,-EB