From: Sven Van Asbroeck Date: Tue, 13 Apr 2021 16:24:21 +0000 (-0400) Subject: rust: compiler_builtins: add 32-bit arm intrinsics X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a11a576d11ef7e23f54210ce5d9883e9b0e229dd;p=users%2Fjedix%2Flinux-maple.git rust: compiler_builtins: add 32-bit arm intrinsics Add panic handlers for the following 32-bit arm intrinsics: - __aeabi_ul2f, __aeabi_ul2d, __aeabi_{f,d}cmpeq : floating-point operations - __aeabi_uldivmod, __mulodi4 : 64-bit division Neither floating point operations, nor native 64-bit division are supported inside the kernel, so we can safely implement these with a panic handler. Signed-off-by: Sven Van Asbroeck [normalized title] Signed-off-by: Miguel Ojeda --- diff --git a/rust/compiler_builtins.rs b/rust/compiler_builtins.rs index 01f2d905e15f8..58d1a9b4d2182 100644 --- a/rust/compiler_builtins.rs +++ b/rust/compiler_builtins.rs @@ -49,6 +49,8 @@ define_panicking_intrinsics!("non-inline stack probes should not be used", { define_panicking_intrinsics!("`f32` should not be used", { __addsf3, __addsf3vfp, + __aeabi_fcmpeq, + __aeabi_ul2f, __divsf3, __divsf3vfp, __eqsf2, @@ -86,6 +88,8 @@ define_panicking_intrinsics!("`f32` should not be used", { define_panicking_intrinsics!("`f64` should not be used", { __adddf3, __adddf3vfp, + __aeabi_dcmpeq, + __aeabi_ul2d, __divdf3, __divdf3vfp, __eqdf2, @@ -134,6 +138,12 @@ define_panicking_intrinsics!("`u128` should not be used", { __umodti3, }); +#[cfg(target_arch = "arm")] +define_panicking_intrinsics!("`u64` division/modulo should not be used", { + __aeabi_uldivmod, + __mulodi4, +}); + extern "C" { fn rust_helper_BUG() -> !; }