cpuid instruction detection function oc_detect_cpuid_helper is buggy
In lib/cpu.c there is cpuid instruction detection function oc_detect_cpuid_helper used for MSVC. Currently it just overwrites values of arguments (two pointers _eax and _ebx) with contents of eax and ebx registers:
mov [_eax],eax
mov [_ebx],ebx
It should be replaced with following code:
mov ecx,_eax
mov [ecx],eax
mov ecx,_ebx
mov [ecx],ebx
For me this bug always prevents to use cpuid instruction (didn't return correct values of eax and ebx) - therefore no MMX optimizations.
I'm using Micorosft Visual C++ 2008 Express Edition SP1 compiler.