Skip to content

Commit 0ac154b

Browse files
authored
x64: Fix has_native_fma (#11794)
This commit synchronizes the implementation of lowering and `has_native_fma` where lowering requires both AVX + FMA but `has_native_fma` was just testing FMA, meaning that if `has_fma` was enabled but `has_avx` was disabled it would be possible to generate a link-time error with Wasmtime.
1 parent 429529c commit 0ac154b

File tree

1 file changed

+1
-1
lines changed
  • cranelift/codegen/src/isa/x64

1 file changed

+1
-1
lines changed

cranelift/codegen/src/isa/x64/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl TargetIsa for X64Backend {
177177
}
178178

179179
fn has_native_fma(&self) -> bool {
180-
self.x64_flags.has_fma()
180+
self.x64_flags.has_avx() && self.x64_flags.has_fma()
181181
}
182182

183183
fn has_round(&self) -> bool {

0 commit comments

Comments
 (0)