From owner-freebsd-i386@FreeBSD.ORG Sat Nov 27 17:50:21 2004 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1860B16A4CE for ; Sat, 27 Nov 2004 17:50:21 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0AE743D41 for ; Sat, 27 Nov 2004 17:50:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iARHoKiZ020244 for ; Sat, 27 Nov 2004 17:50:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iARHoKwm020243; Sat, 27 Nov 2004 17:50:20 GMT (envelope-from gnats) Resent-Date: Sat, 27 Nov 2004 17:50:20 GMT Resent-Message-Id: <200411271750.iARHoKwm020243@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Petr Rehor Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C269C16A4CE for ; Sat, 27 Nov 2004 17:43:52 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id A973F43D5A for ; Sat, 27 Nov 2004 17:43:52 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iARHhqDI083465 for ; Sat, 27 Nov 2004 17:43:52 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iARHhqOq083464; Sat, 27 Nov 2004 17:43:52 GMT (envelope-from nobody) Message-Id: <200411271743.iARHhqOq083464@www.freebsd.org> Date: Sat, 27 Nov 2004 17:43:52 GMT From: Petr Rehor To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: i386/74454: [PATCH] Adding VIA Eden family to bsd.cpu.mk X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 17:50:21 -0000 >Number: 74454 >Category: i386 >Synopsis: [PATCH] Adding VIA Eden family to bsd.cpu.mk >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Nov 27 17:50:20 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Petr Rehor >Release: FreeBSD 5.3-RELEASE-p1 >Organization: S.ICZ a.s. >Environment: FreeBSD charon.rx.cz 5.3-RELEASE-p1 FreeBSD 5.3-RELEASE-p1 #0: Sun Nov 21 16:58:35 UTC 2004 root@marvin.rx.cz:/usr/obj/usr/src/sys/GENERIC i386 >Description: Newer GCC (not sure, but 3.4.2 has these) supports VIA C3 and VIA C3-2 optimization, but bsd.cpu.mk doesn't utilize these. I'm running world with -02 -march=c3 on my VIA Epia 5000 board without any problems. >How-To-Repeat: >Fix: There is a patch relative to RELENG_5_3 --- bsd.cpu.mk.orig Sun Nov 21 12:45:25 2004 +++ bsd.cpu.mk Sat Nov 27 18:25:39 2004 @@ -55,7 +55,13 @@ # http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html . if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "crusoe" +. if ${CPUTYPE} == "c3" +_CPUCFLAGS = -march=${CPUTYPE} +_ICC_CPUCFLAGS = -tpp5 -xM +. elif ${CPUTYPE} == "c3-2" +_CPUCFLAGS = -march=${CPUTYPE} +_ICC_CPUCFLAGS = -tpp6 -xiMK +. elif ${CPUTYPE} == "crusoe" _CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 _ICC_CPUCFLAGS = -tpp6 -xiM . elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ @@ -116,7 +122,11 @@ # presence of a CPU feature. . if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ +. if ${CPUTYPE} == "c3" +MACHINE_CPU = c3 3dnow mmx i586 i486 i386 +. elif ${CPUTYPE} == "c3-2" +MACHINE_CPU = c3-2 sse i686 mmx i586 i486 i386 +. elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ ${CPUTYPE} == "athlon-4" MACHINE_CPU = athlon-xp k7 3dnow sse mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird" >Release-Note: >Audit-Trail: >Unformatted: