Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FMA4 detection #262

Merged
merged 1 commit into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/arch/helperavx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 1 addition & 1 deletion src/libm/dispavx.c.org
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down