Skip to content

Commit 7779294

Browse files
committed
fma requires osxsave
1 parent 636dca6 commit 7779294

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdsimd/arch/detect/os/x86.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ fn detect_features() -> cache::Initializer {
116116

117117
enable(proc_info_ecx, 0, Feature::sse3);
118118
enable(proc_info_ecx, 9, Feature::ssse3);
119-
enable(proc_info_ecx, 12, Feature::fma);
120119
enable(proc_info_ecx, 19, Feature::sse4_1);
121120
enable(proc_info_ecx, 20, Feature::sse4_2);
122121
enable(proc_info_ecx, 23, Feature::popcnt);
@@ -189,6 +188,9 @@ fn detect_features() -> cache::Initializer {
189188
enable(proc_extended_state1_eax, 3, Feature::xsaves);
190189
}
191190

191+
// FMA (uses 256-bit wide registers):
192+
enable(proc_info_ecx, 12, Feature::fma);
193+
192194
// And AVX/AVX2:
193195
enable(proc_info_ecx, 28, Feature::avx);
194196
enable(extended_features_ebx, 5, Feature::avx2);

0 commit comments

Comments
 (0)