Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add weak linkage to the ARM AEABI division functions
  • Loading branch information
Lokathor authored Jul 22, 2022
commit 3d3432916aacf4950f4652cbf0e788576e3ed252
4 changes: 4 additions & 0 deletions src/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ intrinsics! {
// custom calling convention which can't be implemented using a normal Rust function.
#[naked]
#[cfg(not(target_env = "msvc"))]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_uidivmod() {
core::arch::asm!(
"push {{lr}}",
Expand All @@ -36,6 +37,7 @@ intrinsics! {
}

#[naked]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_uldivmod() {
core::arch::asm!(
"push {{r4, lr}}",
Expand All @@ -52,6 +54,7 @@ intrinsics! {
}

#[naked]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_idivmod() {
core::arch::asm!(
"push {{r0, r1, r4, lr}}",
Expand All @@ -65,6 +68,7 @@ intrinsics! {
}

#[naked]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_ldivmod() {
core::arch::asm!(
"push {{r4, lr}}",
Expand Down