Skip to content

Commit 19b666a

Browse files
author
Sven Van Asbroeck
committed
rust/arm 32-bit: add 32-bit arm intrinsics to compiler_builtins
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>
1 parent 478341d commit 19b666a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rust/compiler_builtins.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ define_panicking_intrinsics!("non-inline stack probes should not be used", {
4949
define_panicking_intrinsics!("`f32` should not be used", {
5050
__addsf3,
5151
__addsf3vfp,
52+
__aeabi_fcmpeq,
53+
__aeabi_ul2f,
5254
__divsf3,
5355
__divsf3vfp,
5456
__eqsf2,
@@ -86,6 +88,8 @@ define_panicking_intrinsics!("`f32` should not be used", {
8688
define_panicking_intrinsics!("`f64` should not be used", {
8789
__adddf3,
8890
__adddf3vfp,
91+
__aeabi_dcmpeq,
92+
__aeabi_ul2d,
8993
__divdf3,
9094
__divdf3vfp,
9195
__eqdf2,
@@ -134,6 +138,12 @@ define_panicking_intrinsics!("`u128` should not be used", {
134138
__umodti3,
135139
});
136140

141+
#[cfg(target_arch = "arm")]
142+
define_panicking_intrinsics!("`u64` division/modulo should not be used", {
143+
__aeabi_uldivmod,
144+
__mulodi4,
145+
});
146+
137147
extern "C" {
138148
fn rust_helper_BUG() -> !;
139149
}

0 commit comments

Comments
 (0)