libFLAC/cpu.c: Improve logic
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 6 Dec 2016 08:37:52 +0000 (19:37 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 6 Dec 2016 09:05:38 +0000 (20:05 +1100)
Only call `FLAC__cpu_have_cpuid_asm_ia32` if `FLAC__HAS_NASM` is
defined.

Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com>

src/libFLAC/cpu.c

index dbfca24..6a6095f 100644 (file)
@@ -107,7 +107,7 @@ ia32_cpu_info (FLAC__CPUInfo *info)
 
 #if !defined FLAC__NO_ASM && (defined FLAC__HAS_NASM || FLAC__HAS_X86INTRIN)
        info->use_asm = true; /* we assume a minimum of 80386 with FLAC__CPU_IA32 */
-#if !FLAC__HAS_X86INTRIN
+#if defined FLAC__HAS_NASM
        if(!FLAC__cpu_have_cpuid_asm_ia32())
                return;
 #endif