CPUTYPE in general - was Re: Which CPUTYPE for a dualcore Xeon on AMD64

Mike Meyer mwm-keyword-freebsdhackers2.e313df at mired.org
Tue Jun 26 14:04:06 UTC 2007


In <8b5ad0e10706260545u6ad0b0c6w209548293809e993 at mail.gmail.com>, Zavam, Vinícius <egypcio at gmail.com> typed:
> 2007/6/26, Garrett Cooper <youshi10 at u.washington.edu>:
> > Mike Meyer wrote:
> > nowadays).
> > >>     Intel suggests using -march=prescott (32-bit) and -march=nocona
> > >> (64-bit) with gcc on Core2Duo processors and equivalent Xeons.
> > >>
> > >
> > > Note that /usr/share/mk/sys.mk includes bsd.mk.cpu, which overrides
> > > CPUTYPE if it's set to prescott or nocona. It turns nocona into
> > > prescott if you're building for i386 and prescott into nocona if
> > > you're building for amd64. So the correct answer to the question "Do I
> > > set CPUTYPE to nocona or prescott in /etc/make.conf?" would seem to be
> > > "It doesn't matter."
> > Hmmm... interesting.. Seems like a bit ambitious for bsd.mk.cpu, if the user knows what they're doing.
> please correct me if I'm wrong, but gcc(1) can help us a bit also;
> http://www.freebsd.org/cgi/man.cgi?query=gcc&sektion=1&format=html

Right. We actually discussed this, then wondered into the history of
the CPU cores. You start with misc/cpuid to get a list of features
your CPU has, then use the gcc man page to figure out which cputype
will use the most features of your CPU without trying to use features
which your CPU doesn't have.

> z.B.:
> "
> (...)
> prescott
>        Improved version of Intel Pentium4 CPU with MMX, SSE, SSE2 and
>        SSE3 instruction set support.
> 
> nocona
>        Improved version of Intel Pentium4 CPU with 64-bit extensions,
>        MMX, SSE, SSE2 and SSE3 instruction set support.
> 
>        (...)
> athlon-4, athlon-xp, athlon-mp
>        Improved AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and
>        full SSE instruction set support.
> 
> k8, opteron, athlon64, athlon-fx
>        AMD K8 core based CPUs with x86-64 instruction set support.
>        (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and
>        64-bit instruction set extensions.)
> (...)
> "

	<mike

-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list