From 749f45ffc84d48750e7f41cea8f02476a3304183 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sat, 27 Jul 2013 22:37:57 +0800 Subject: [PATCH] Fixed the FMA3 detection bug. --- cpuid_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpuid_x86.c b/cpuid_x86.c index 98af9d041..9e850a2aa 100644 --- a/cpuid_x86.c +++ b/cpuid_x86.c @@ -229,8 +229,8 @@ int get_cputype(int gettype){ if ((ecx & (1 << 20)) != 0) feature |= HAVE_SSE4_2; #ifndef NO_AVX if (support_avx()) feature |= HAVE_AVX; + if ((ecx & (1 << 12)) != 0) feature |= HAVE_FMA3; #endif - if ((ecx & (1 << 20)) != 0) feature |= HAVE_FMA3; if (have_excpuid() >= 0x01) { cpuid(0x80000001, &eax, &ebx, &ecx, &edx);