diff --git a/src/arch/helperavx.h b/src/arch/helperavx.h index 4e4f9960..a0d218d6 100644 --- a/src/arch/helperavx.h +++ b/src/arch/helperavx.h @@ -63,7 +63,7 @@ static int cpuSupportsAVX() { static int cpuSupportsFMA4() { int32_t reg[4]; Sleef_x86CpuID(reg, 0x80000001, 0); - return (reg[3] & (1 << 16)) != 0; + return (reg[2] & (1 << 16)) != 0; } #if CONFIG == 4 && defined(__AVX__) && defined(__FMA4__) diff --git a/src/libm/dispavx.c.org b/src/libm/dispavx.c.org index cd38af6d..0f242b42 100644 --- a/src/libm/dispavx.c.org +++ b/src/libm/dispavx.c.org @@ -48,7 +48,7 @@ static int cpuSupportsFMA4() { if (ret == -1) { int32_t reg[4]; Sleef_x86CpuID(reg, 0x80000001, 0); - ret = (reg[3] & (1 << 16)) != 0; + ret = (reg[2] & (1 << 16)) != 0; } return ret; }