changeset 28015:94cf4a9270cb

Correct detection of SSSE3 and SSE4a feature bits.
author zuxy
date Sun, 30 Nov 2008 09:17:21 +0000
parents e54712304c3e
children 3b8e66828e10
files cpudetect.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cpudetect.c	Fri Nov 28 17:04:36 2008 +0000
+++ b/cpudetect.c	Sun Nov 30 09:17:21 2008 +0000
@@ -153,8 +153,7 @@
 		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 @@
 		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)
 	{