summaryrefslogtreecommitdiff
path: root/src/sna/sna_cpu.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-05-28 12:51:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-05-28 13:34:53 +0100
commit562c47fc21b9029ebff29b53d2be590df4329264 (patch)
treeb93c3f8d68f3141cb9e80e0f79948ba8a4d2e4dc /src/sna/sna_cpu.c
parent6282fc9d0d3b2899be52ca4a43a3d9313e9049a6 (diff)
Silence CLang (almost)
Fix up all the warnings about implicit enum conversions. The container_of() macro remains defunct. 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_cpu.c b/src/sna/sna_cpu.c
index 23e6bcc0..a3434b11 100644
--- a/src/sna/sna_cpu.c
+++ b/src/sna/sna_cpu.c
@@ -40,12 +40,13 @@
unsigned sna_cpu_detect(void)
{
unsigned max = __get_cpuid_max(BASIC_CPUID, NULL);
- unsigned int eax, ebx, ecx, edx;
+ unsigned eax, ebx, ecx, edx;
unsigned features = 0;
unsigned extra = 0;
if (max >= 1) {
__cpuid(1, eax, ebx, ecx, edx);
+
if (ecx & bit_SSE3)
features |= SSE3;
@@ -80,6 +81,7 @@ unsigned sna_cpu_detect(void)
if (max >= 7) {
__cpuid_count(7, 0, eax, ebx, ecx, edx);
+
if ((extra & has_YMM) && (ebx & bit_AVX2))
features |= AVX2;
}