xf86-video-intel: src/sna/sna_cpu.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Mar 26 09:33:20 PDT 2013
src/sna/sna_cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit e63390df52117e1d3ca9d23a736e9995bc734765
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Mar 26 16:32:13 2013 +0000
sna: Add extra '()' around bitwise &/&& for CPU feature detection
By popular demand.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_cpu.c b/src/sna/sna_cpu.c
index ff83ba5..489bf6c 100644
--- a/src/sna/sna_cpu.c
+++ b/src/sna/sna_cpu.c
@@ -72,7 +72,7 @@ unsigned sna_cpu_detect(void)
extra |= has_YMM;
}
- if (extra & has_YMM && ecx & bit_AVX)
+ if ((extra & has_YMM) && (ecx & bit_AVX))
features |= AVX;
if (edx & bit_MMX)
@@ -87,7 +87,7 @@ unsigned sna_cpu_detect(void)
if (max >= 7) {
__cpuid_count(7, 0, eax, ebx, ecx, edx);
- if (extra & has_YMM && ebx & bit_AVX2)
+ if ((extra & has_YMM) && (ebx & bit_AVX2))
features |= AVX2;
}
More information about the xorg-commit
mailing list