aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Krull <[email protected]>2023-04-23 16:37:44 +0200
committerPeter Krull <[email protected]>2023-04-23 16:37:44 +0200
commitba47fe9c416818b7fff5bca8092d9f0265407089 (patch)
treea3372c82c1b5055a31cbecf5f61c8348686d1618
parent8285263fc2178be409beff217cb6af4562ea5107 (diff)
embassy-rp : Added feature flag to otherwise unused definitions
-rw-r--r--embassy-rp/src/intrinsics.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/embassy-rp/src/intrinsics.rs b/embassy-rp/src/intrinsics.rs
index 04da74cfd..d5cb5fe9a 100644
--- a/embassy-rp/src/intrinsics.rs
+++ b/embassy-rp/src/intrinsics.rs
@@ -284,7 +284,7 @@ macro_rules! intrinsics {
284// alias the division operators to these for a similar reason r0 is the 284// alias the division operators to these for a similar reason r0 is the
285// result either way and r1 a scratch register, so the caller can't assume it 285// result either way and r1 a scratch register, so the caller can't assume it
286// retains the argument value. 286// retains the argument value.
287#[cfg(all(target_arch = "arm", feature = "intrinsics"))] 287#[cfg(target_arch = "arm")]
288core::arch::global_asm!( 288core::arch::global_asm!(
289 ".macro hwdivider_head", 289 ".macro hwdivider_head",
290 "ldr r2, =(0xd0000000)", // SIO_BASE 290 "ldr r2, =(0xd0000000)", // SIO_BASE
@@ -352,6 +352,7 @@ core::arch::global_asm!(
352 ".endm", 352 ".endm",
353); 353);
354 354
355#[cfg(all(target_arch = "arm", feature = "intrinsics"))]
355macro_rules! division_function { 356macro_rules! division_function {
356 ( 357 (
357 $name:ident $($intrinsic:ident)* ( $argty:ty ) { 358 $name:ident $($intrinsic:ident)* ( $argty:ty ) {
@@ -438,6 +439,7 @@ fn divider_signed(n: i32, d: i32) -> DivResult<i32> {
438} 439}
439 440
440/// Result of divide/modulo operation 441/// Result of divide/modulo operation
442#[cfg(all(target_arch = "arm", feature = "intrinsics"))]
441struct DivResult<T> { 443struct DivResult<T> {
442 /// The quotient of divide/modulo operation 444 /// The quotient of divide/modulo operation
443 pub quotient: T, 445 pub quotient: T,