Add MMX SIMD implementation of computationally intensive routines.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3648 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/jpeg/simd/jsimdcpu.asm b/common/jpeg/simd/jsimdcpu.asm
index 6bb4e32..862de29 100644
--- a/common/jpeg/simd/jsimdcpu.asm
+++ b/common/jpeg/simd/jsimdcpu.asm
@@ -51,6 +51,22 @@
xor eax,edx
jz short .return ; CPUID is not supported
+ ; Check for MMX instruction support
+ xor eax,eax
+ cpuid
+ test eax,eax
+ jz short .return
+
+ xor eax,eax
+ inc eax
+ cpuid
+ mov eax,edx ; eax = Standard feature flags
+
+ test eax, 1<<23 ; bit23:MMX
+ jz short .no_mmx
+ or edi, byte JSIMD_MMX
+.no_mmx:
+
.return:
mov eax,edi