Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 2009 15:12:33 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        Scott Bennett <bennett@cs.niu.edu>
Cc:        David Southwell <david@vizion2000.net>, freebsd-questions@freebsd.org
Subject:   Re: Learning about Control of Optimization -- for dummies please
Message-ID:  <20090805131233.GA30790@slackbox.xs4all.nl>
In-Reply-To: <200908051238.n75CcKC1006683@mp.cs.niu.edu>
References:  <200908051238.n75CcKC1006683@mp.cs.niu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 05, 2009 at 07:38:20AM -0500, Scott Bennett wrote:
>      On Wed, 5 Aug 2009 12:19:23 +0200 Roland Smith <rsmith@xs4all.nl> wr=
ote:
> >On Wed, Aug 05, 2009 at 10:54:07AM +0100, David Southwell wrote:
> >> I have found http://docs.freebsd.org/info/gcc/gcc.info.Optimize_Option=
s.html.
> >>=20
> >> I am about to build a new kernel am starting to dig a bit deeper into =
things I=20
> >> have, until now, taken for granted.
> >>=20
> >> The above link is very informative in technical terms about how to con=
trol=20
> >> optimization but I find it difficult to interpret the info in a way th=
at tells=20
> >> me what might work best on my own system (Intel quad Core) with 8G of =
ram.
> >
> >The build system takes care of that, once you have set the correct
> >CPUTYPE in /etc/make.conf. For a quad-core, set CPUTYPE=3Dnocona. See
> >make.conf(5), /usr/src/share/mk/bsd.cpu.mk and
> >/usr/src/sys/conf/kern.pre.mk.
>=20
>      As I read the man page for [g]cc, though, setting -march=3Dnocona (w=
hich
> is where the CPUTYPE information ends up in the cc commands) tells the
> compiler which base instruction set to use and which model of instruction
> scheduling to use, but to get the rest of the model-dependent features us=
ed,
> he would still need to add "-mmmx -msse -msse2 -msse3" at a minimum for m=
ost
> other compilations, though these would not be advisable for kernel
> compilations.=20

Both i386 and amd64 explicitly prohibit the use of FPU, SSE and other
SIMD operations inside the kernel itself. These operations are exclusively=
=20
reserved for user applications. See /usr/src/sys/conf/kern.mk.

The makefiles for the kernel add appropriate options depending on the CPUTY=
PE.

Roland
--=20
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

--6TrnltStXW4iwmi0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iEYEARECAAYFAkp5hUEACgkQEnfvsMMhpyXCfQCeIKtV3ILoxusWmo/bIchQjoCz
YNwAniGxXNxoiAngmBN5+XZ4k1I0ZRZd
=6sLF
-----END PGP SIGNATURE-----

--6TrnltStXW4iwmi0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090805131233.GA30790>