[MPlayer-cvslog] r28049 - trunk/cpudetect.c

zuxy subversion at mplayerhq.hu
Sun Nov 30 10:17:21 CET 2008


Author: zuxy
Date: Sun Nov 30 10:17:21 2008
New Revision: 28049

Log:
Correct detection of SSSE3 and SSE4a feature bits.


Modified:
   trunk/cpudetect.c

Modified: trunk/cpudetect.c
==============================================================================
--- trunk/cpudetect.c	(original)
+++ trunk/cpudetect.c	Sun Nov 30 10:17:21 2008
@@ -153,8 +153,7 @@ void GetCpuCaps( CpuCaps *caps)
 		caps->hasMMX  = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
 		caps->hasSSE  = (regs2[3] & (1 << 25 )) >> 25; // 0x2000000
 		caps->hasSSE2 = (regs2[3] & (1 << 26 )) >> 26; // 0x4000000
-		caps->hasSSSE3 = (regs2[3] & (1 << 9 )) >>  9; // 0x0000200
-		caps->hasSSE4a = (regs2[3] & (1 << 6 )) >>  6; // 0x0000040
+		caps->hasSSSE3 = (regs2[2] & (1 << 9 )) >>  9; // 0x0000200
 		caps->hasMMX2 = caps->hasSSE; // SSE cpus supports mmxext too
 		cl_size = ((regs2[1] >> 8) & 0xFF)*8;
 		if(cl_size) caps->cl_size = cl_size;
@@ -176,6 +175,7 @@ void GetCpuCaps( CpuCaps *caps)
 		caps->hasMMX2 |= (regs2[3] & (1 << 22 )) >> 22; // 0x400000
 		caps->has3DNow    = (regs2[3] & (1 << 31 )) >> 31; //0x80000000
 		caps->has3DNowExt = (regs2[3] & (1 << 30 )) >> 30;
+		caps->hasSSE4a = (regs2[2] & (1 << 6 )) >>  6; // 0x0000040
 	}
 	if(regs[0]>=0x80000006)
 	{



More information about the MPlayer-cvslog mailing list