View Full Version : [Solved] compiling in 3dnow, mmx, sse, sse2, sse3 support
deuce63
April 23rd, 2009, 19:36
I had a question, when compiling a new kernel... I'm quite new at this so bear with me.
I noticed the flags said no support for mmx, 3D now, sse, sse2 and sse3.
How would I get the compiler to build in support for these?
Maledictus
April 23rd, 2009, 20:44
The kernel can't use this stuff so don't try to compile it with this stuff enabled. You can still use it in normal userland binaries.
fabiokaminski
July 8th, 2010, 19:26
so all floating math of the kernel is software emulated...
i hope it doesnt do it frequently... :s
but if it uses floats intensely , why not use it?!
ss2 is veeery old already.. why not use it?
phoenix
July 8th, 2010, 19:53
Floating point is very, very, very, very rarely (if ever) used inside the kernel itself.
Userspace apps use floating point a lot, and those instructions are enabled for userspace apps. You'll see these enabled for applications that actually make use of them. Watch the output from compiling ports, you'll see them enabled in there.
fronclynne
July 9th, 2010, 16:47
If you set CPUTYPE?= to one of " opteron, athlon64, nocona, prescott, core2" in /etc/make.conf (depending of course on what you have) the system should automatically use those SIMD extensions when compiling (in places where it is appropriate (which won't be within the kernel)).
You can, of course, use lang/gcc44 (or lang/gcc45) when compiling applications from ports*, and use slightly better flags there, too.
* with caveats
FPU its not same as mmx.. mmx can give good benefit even if your prog dont use floating numbers..
I think setting CPUTYPE should automatically detect all cpu extesions an use them (compiler does that)
phoenix
July 9th, 2010, 19:55
Which is does.
But everything floating-point related is disabled when compiling the kernel, as the kernel does not use FP.
This is a non-discussion. Setting CPUTYPE will "do the right thing" for everything.
fabiokaminski
July 10th, 2010, 01:07
point for Bsd kernel .. for easily deploy in diferents arquitectures :)
im hacking a little of it.. and im very impressed ... unlike linux , it has a concise architecture
and i think it has less degradation..
anyway.. nice.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.