
Just wondering when you add -msse3 do you need -msse2 and -msse? or does assume those are on with the -msse3?drwook wrote:sse3 comes up in /proc/cpuinfo as 'pni' I believe.
If you have it, you can add '-msse3' to your CFLAGS in your make.conf. Can't think of any disadvantage to doing this, but haven't really researched as I've got an 'old' s754 athlon 64 which doesn't support sse3...

Code: Select all
man gcc:
-mtune=cpu-type
Tune to cpu-type everything applicable about the generated code, except for the ABI and the set of available instructions. The choices for cpu-type are:
[...]
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.)
[...] No, the only flag enabled by -march=k8 is actually -m3dnow. The other flags -mmmx -msse -msse2 and -mfpmath=sse is on by default on x86_64 with or without -march. -msse3 is the only one you have to add explicitly.janiskr wrote:but not all Athlon64 processors has these sse3 insructions, even not all sandiego cores has sse3
so, does realy -march=k8 has sse3 enabled?

The kernel saves and restores the floating point context (including SSE-specific registers) during a context switch, so there should not be any problems. What is forbidden is using SSE (or any floating point for that matter) from within the kernel (in a driver for example), as it can corrupt userspace FP context in some cases.Corona688 wrote:Is it safe yet to use SSE instruction set extensions? I keep hearing about some danger about SSE registers and context switches, but it's not altogether clear what this is.