]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rust: compiler_builtins: add 32-bit arm intrinsics
authorSven Van Asbroeck <thesven73@gmail.com>
Tue, 13 Apr 2021 16:24:21 +0000 (12:24 -0400)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 27 Apr 2021 03:06:13 +0000 (05:06 +0200)
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 <thesven73@gmail.com>
[normalized title]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/compiler_builtins.rs

index 01f2d905e15f8d01d645dc114447ec429035056e..58d1a9b4d218234af6bf55c8ec3be2dbcb97a26a 100644 (file)
@@ -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() -> !;
 }