summaryrefslogtreecommitdiff
path: root/src/sna/sna_cpu.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-03-03 12:12:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-03-03 12:12:56 +0000
commit995abb46754eba7524afcb852159a31ea19add82 (patch)
tree7a649132733613d00f501c45330fc32e52f73901 /src/sna/sna_cpu.c
parentf9f2b5152f988d4b15f773354f3fadaff02cd3d7 (diff)
sna: CPUID return ISA features in ecx/edx
Whereas we were wrongly looking in eax. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61733 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_cpu.c')
-rw-r--r--src/sna/sna_cpu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sna/sna_cpu.c b/src/sna/sna_cpu.c
index 9e3d9657..ef6843fc 100644
--- a/src/sna/sna_cpu.c
+++ b/src/sna/sna_cpu.c
@@ -45,19 +45,19 @@ unsigned sna_cpu_detect(void)
unsigned features = 0;
if (__get_cpuid(1, &eax, &ebx, &ecx, &edx)) {
- if (eax & bit_SSE3)
+ if (ecx & bit_SSE3)
features |= SSE3;
- if (eax & bit_SSSE3)
+ if (ecx & bit_SSSE3)
features |= SSSE3;
- if (eax & bit_SSE4_1)
+ if (ecx & bit_SSE4_1)
features |= SSE4_1;
- if (eax & bit_SSE4_2)
+ if (ecx & bit_SSE4_2)
features |= SSE4_2;
- if (eax & bit_AVX)
+ if (ecx & bit_AVX)
features |= AVX;
if (edx & bit_MMX)