diff --git a/libm/src/math/arch/mod.rs b/libm/src/math/arch/mod.rs index 984ae7f3..c6881b8e 100644 --- a/libm/src/math/arch/mod.rs +++ b/libm/src/math/arch/mod.rs @@ -19,7 +19,8 @@ cfg_if! { pub use x86::{sqrt, sqrtf, fma, fmaf}; } else if #[cfg(all( any(target_arch = "aarch64", target_arch = "arm64ec"), - target_feature = "neon" + target_feature = "neon", + not(target_abi = "softfloat"), ))] { mod aarch64; diff --git a/libm/src/math/fma.rs b/libm/src/math/fma.rs index 5bf473cf..9714e1cf 100644 --- a/libm/src/math/fma.rs +++ b/libm/src/math/fma.rs @@ -20,7 +20,7 @@ pub fn fmaf(x: f32, y: f32, z: f32) -> f32 { select_implementation! { name: fmaf, use_arch: any( - all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "aarch64", target_feature = "neon", not(target_abi = "softfloat")), target_feature = "sse2", ), args: x, y, z, @@ -37,7 +37,7 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { select_implementation! { name: fma, use_arch: any( - all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "aarch64", target_feature = "neon", not(target_abi = "softfloat")), target_feature = "sse2", ), args: x, y, z, diff --git a/libm/src/math/rint.rs b/libm/src/math/rint.rs index e1c32c94..aa2dc546 100644 --- a/libm/src/math/rint.rs +++ b/libm/src/math/rint.rs @@ -19,7 +19,7 @@ pub fn rintf(x: f32) -> f32 { select_implementation! { name: rintf, use_arch: any( - all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "aarch64", target_feature = "neon", not(target_abi = "softfloat")), all(target_arch = "wasm32", intrinsics_enabled), ), args: x, @@ -34,7 +34,7 @@ pub fn rint(x: f64) -> f64 { select_implementation! { name: rint, use_arch: any( - all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "aarch64", target_feature = "neon", not(target_abi = "softfloat")), all(target_arch = "wasm32", intrinsics_enabled), ), args: x, diff --git a/libm/src/math/sqrt.rs b/libm/src/math/sqrt.rs index 76bc240c..843157d7 100644 --- a/libm/src/math/sqrt.rs +++ b/libm/src/math/sqrt.rs @@ -17,7 +17,7 @@ pub fn sqrtf(x: f32) -> f32 { select_implementation! { name: sqrtf, use_arch: any( - all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "aarch64", target_feature = "neon", not(target_abi = "softfloat")), all(target_arch = "wasm32", intrinsics_enabled), target_feature = "sse2" ), @@ -33,7 +33,7 @@ pub fn sqrt(x: f64) -> f64 { select_implementation! { name: sqrt, use_arch: any( - all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "aarch64", target_feature = "neon", not(target_abi = "softfloat")), all(target_arch = "wasm32", intrinsics_enabled), target_feature = "sse2" ),