Merge #1392
1392: embassy-rp : Fix for division intrinsics clashing with rp2040-hal r=Dirbaio a=peterkrull Commit [7a682ec
](7a682ec02a (diff-f121955242a67342004444b26214e5d1d591c3182dcd0fedf4329ad472cd1200)
) may break compilation if also using `rp2040-hal`. It seems that the rp2040-hal does have a feature flag for [disabling intrinsics](2c9921cdc5/rp2040-hal/src/sio.rs (L323)
), but I still cannot seem to compile with that enabled. Adding these flags fixes it for me. Co-authored-by: Peter Krull <peterkrullpeter@gmail.com>
This commit is contained in:
commit
d78edba0d4
1 changed files with 9 additions and 7 deletions
|
@ -361,10 +361,11 @@ macro_rules! division_function {
|
|||
#[cfg(all(target_arch = "arm", feature = "intrinsics"))]
|
||||
core::arch::global_asm!(
|
||||
// Mangle the name slightly, since this is a global symbol.
|
||||
concat!(".global _rphal_", stringify!($name)),
|
||||
concat!(".type _rphal_", stringify!($name), ", %function"),
|
||||
concat!(".section .text._erphal_", stringify!($name)),
|
||||
concat!(".global _erphal_", stringify!($name)),
|
||||
concat!(".type _erphal_", stringify!($name), ", %function"),
|
||||
".align 2",
|
||||
concat!("_rphal_", stringify!($name), ":"),
|
||||
concat!("_erphal_", stringify!($name), ":"),
|
||||
$(
|
||||
concat!(".global ", stringify!($intrinsic)),
|
||||
concat!(".type ", stringify!($intrinsic), ", %function"),
|
||||
|
@ -379,10 +380,11 @@ macro_rules! division_function {
|
|||
#[cfg(all(target_arch = "arm", not(feature = "intrinsics")))]
|
||||
core::arch::global_asm!(
|
||||
// Mangle the name slightly, since this is a global symbol.
|
||||
concat!(".global _rphal_", stringify!($name)),
|
||||
concat!(".type _rphal_", stringify!($name), ", %function"),
|
||||
concat!(".section .text._erphal_", stringify!($name)),
|
||||
concat!(".global _erphal_", stringify!($name)),
|
||||
concat!(".type _erphal_", stringify!($name), ", %function"),
|
||||
".align 2",
|
||||
concat!("_rphal_", stringify!($name), ":"),
|
||||
concat!("_erphal_", stringify!($name), ":"),
|
||||
|
||||
"hwdivider_head",
|
||||
$($begin),+ ,
|
||||
|
@ -392,7 +394,7 @@ macro_rules! division_function {
|
|||
#[cfg(target_arch = "arm")]
|
||||
extern "aapcs" {
|
||||
// Connect a local name to global symbol above through FFI.
|
||||
#[link_name = concat!("_rphal_", stringify!($name)) ]
|
||||
#[link_name = concat!("_erphal_", stringify!($name)) ]
|
||||
fn $name(n: $argty, d: $argty) -> u64;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue