diff options
| author | Peter Krull <[email protected]> | 2023-04-23 16:37:44 +0200 |
|---|---|---|
| committer | Peter Krull <[email protected]> | 2023-04-23 16:37:44 +0200 |
| commit | ba47fe9c416818b7fff5bca8092d9f0265407089 (patch) | |
| tree | a3372c82c1b5055a31cbecf5f61c8348686d1618 | |
| parent | 8285263fc2178be409beff217cb6af4562ea5107 (diff) | |
embassy-rp : Added feature flag to otherwise unused definitions
| -rw-r--r-- | embassy-rp/src/intrinsics.rs | 4 |
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")] |
| 288 | core::arch::global_asm!( | 288 | core::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"))] | ||
| 355 | macro_rules! division_function { | 356 | macro_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"))] | ||
| 441 | struct DivResult<T> { | 443 | struct DivResult<T> { |
| 442 | /// The quotient of divide/modulo operation | 444 | /// The quotient of divide/modulo operation |
| 443 | pub quotient: T, | 445 | pub quotient: T, |
