From owner-freebsd-questions@FreeBSD.ORG Thu Feb 1 03:06:48 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7E4B16A400 for ; Thu, 1 Feb 2007 03:06:48 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.freebsd.org (Postfix) with ESMTP id B57DB13C441 for ; Thu, 1 Feb 2007 03:06:48 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout4.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l1136mPQ024969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 31 Jan 2007 19:06:48 -0800 X-Auth-Received: from [192.168.10.41] (c-67-187-172-183.hsd1.ca.comcast.net [67.187.172.183]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l1136lF4028248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 31 Jan 2007 19:06:47 -0800 Message-ID: <45C1593C.8050003@u.washington.edu> Date: Wed, 31 Jan 2007 19:06:36 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.9 (X11/20070122) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <200701312340.38593.salkillen@internode.on.net> <209e855bb68d64550ec4e384b3983664@mail.wcborstel.com> In-Reply-To: <209e855bb68d64550ec4e384b3983664@mail.wcborstel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.1.31.185432 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='SUPERLONG_LINE 0.05, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: gcc compiler cputype, prescott or nocona confusion X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 03:06:48 -0000 Jorn Argelo wrote: > > On Wed, 31 Jan 2007 23:40:38 +1100, Scott Killen wrote: >> Hi, >> >> When recompiling the world or kernel in FreeBSD i386 Rel 6.1 with, >> >> "# make buildworld" >> or >> "# make buildkernel KERNCONF=MYSMPCONF" >> >> (or building anything anything else for that matter), even though I have >> "CPUTYPE?=nocona" set in my "/etc/make.conf" file the compiler seems to >> head >> back to a default of "-march=prescott" when compiling many of the >> functions >> on a Dual Xeon 3.6g (nocona) machine! >> >> This doesn't happen when compiling for other machine types, I've tried it >> on a >> Dual PentiumPro, Dual PII, Dual PIII setting the CPUTYPE to the correct >> cpu >> type and the -march sticks to the assigned cpu type through all operations >> and produces nice quick optimized code. >> >> Why is this so? >> >> Is it because the "nocona" machine type optimization refers to the EMT64 >> technology and thus is rejected when compiling for i386 targets rather >> than >> amd64 or emt64 targets and Gcc rejects it? > > That's right. AFAIK the Nocona core is a prescott with EM64T support (feel free to correct me if I am wrong). Basically you have an i386 version of FreeBSD, and with EM64T instructions enabled GCC will build a 64-bit version of FreeBSD. I think that's the reason it switches back to prescott. Most of the time you're right. However (for starters), some nocona chips feature 2MB cache instead of 1MB cache: . I'd have to look more in depth, but OTOH the nocona also featured some architecture upgrades, other than just the "64-bit'ness" I heard that gcc 3.4.x was pretty funky with the nocona processors though, and prescott's a more stable target; that changed a bit in gcc 4.x I think. Or maybe I'm just mixing up nocona and yonah in this case. -Garrett