MMX/SSE{2}/3DNOW checks in kdefx/ are wrong

Zack Rusin zack at
Tue Jan 6 17:38:18 GMT 2004

On Monday 05 January 2004 15:29, ismail (cartman) donmez wrote:
> Hi,
> Simple demo :
> cartman at southpark:~$ cat sse2.c
> int main()
> {
>         __asm__("xorpd %%xmm0, %%xmm0" : : : "%xmm0");
>         return 0;
> }
> cartman at southpark:~$ gcc -o sse2 sse2.c
> cartman at southpark:~$ ./sse2
> Illegal instruction
> cartman at southpark:~$
> As you can see anyone can compile a program with SSE2 instruction but
> it will not run unless
> your CPU supports it. But kdelibs configure says I got
> MMX/3DNOW/SSE/SSE2 support on a Pentium3!

Nope, you misunderstood the tests. We use those checks to see whether 
the whole thing will compile, since we detect the exact cpu features at 
runtime. So in configure we make sure that kcpuinfo will compile and we 
implemented all the checks in kcpuinfo. Implementing static checking of 
processes features is simply not the best idea in an environment where 
the compilation often takes places on a different machines from the one 
where the binaries are run on.


Press any key to continue or any other key to quit...

More information about the kde-core-devel mailing list