From 230cffe08ff0c965de2ce111afe4513286bfda89 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Tue, 3 Jan 2017 04:46:20 +1100 Subject: [PATCH] libFLAC/cpu.c: Fix CPU detecton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch-from: Janne Hyvärinen --- src/libFLAC/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c index b9df19a9..808d55d7 100644 --- a/src/libFLAC/cpu.c +++ b/src/libFLAC/cpu.c @@ -269,9 +269,9 @@ void FLAC__cpu_info_x86(FLAC__uint32 level, FLAC__uint32 *eax, FLAC__uint32 *ebx __cpuid(cpuinfo, ext); if((unsigned)cpuinfo[0] >= level) { #if FLAC__AVX_SUPPORTED - __cpuidex(cpuinfo, ext, 0); /* for AVX2 detection */ + __cpuidex(cpuinfo, level, 0); /* for AVX2 detection */ #else - __cpuid(cpuinfo, ext); /* some old compilers don't support __cpuidex */ + __cpuid(cpuinfo, level); /* some old compilers don't support __cpuidex */ #endif *eax = cpuinfo[0]; *ebx = cpuinfo[1]; *ecx = cpuinfo[2]; *edx = cpuinfo[3];