I_686 MMX / 3DNOW / SSE / SSE2 ?

Dag-Erling Smørgrav des at des.no
Mon May 8 03:13:07 UTC 2006


"Vincent Blondel" <vincent at xtra-net.org> writes:
> So in this context, I use 'CFLAGS= -O2 -pipe -fno-strict-aliasing'
> and 'CPUTYPE?=athlon-xp' for compiling kernel but when I look at
> file /usr/src/sys/conf/kern.mk I see all kind of mmx/3dnow/sse/sse2
> are disabled [...]

We don't want to use floating point within the kernel, for a variety
of reasons (one of them being that saving and restoring the floating
point context when switching in and out of the kernel is very
expensive).

> So, finally, there is something I don't understand, what is the goal
> of 'CPU_ENABLE_SSE' [...]

The (now standard) CPU_ENABLE_SSE option adds code to save / restore
SSE registers when necesary.  This allows userland applications to use
SSE without getting clobbering eachother's data.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-current mailing list