summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2017-01-03 04:46:20 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2017-01-03 04:46:24 +1100
commit230cffe08ff0c965de2ce111afe4513286bfda89 (patch)
tree1b7482aa1131a5e2a3d672dfd803b8b4c3e1f2f1
parentac39d3719f16dfb6e08d2fbde8ccaf34a266c81d (diff)
downloadflac-230cffe08ff0c965de2ce111afe4513286bfda89.tar.gz
libFLAC/cpu.c: Fix CPU detecton
Patch-from: Janne Hyvärinen <cse@sci.fi>
-rw-r--r--src/libFLAC/cpu.c4
1 files 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];