Skip to content

Commit 23186d9

Browse files
committed
Fixed the FMA3 detection bug.
1 parent 4471c77 commit 23186d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpuid_x86.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ int get_cputype(int gettype){
229229
if ((ecx & (1 << 20)) != 0) feature |= HAVE_SSE4_2;
230230
#ifndef NO_AVX
231231
if (support_avx()) feature |= HAVE_AVX;
232+
if ((ecx & (1 << 12)) != 0) feature |= HAVE_FMA3;
232233
#endif
233-
if ((ecx & (1 << 20)) != 0) feature |= HAVE_FMA3;
234234

235235
if (have_excpuid() >= 0x01) {
236236
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);

0 commit comments

Comments
 (0)