diff options
Diffstat (limited to 'src/sna/sna_cpu.c')
-rw-r--r-- | src/sna/sna_cpu.c | 4 |
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; } |