aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-09-26 19:52:55 +0200
committerDario Nieuwenhuis <[email protected]>2022-09-26 19:53:22 +0200
commit1e95c4fcfff3edf87a6c4cdacb228cb08e6d4e50 (patch)
tree057e0fb17cfb688369450911ece317b06ca76c29 /embassy-rp/src
parent49070c75b6de7581e418f00e37540a34e0bf1dab (diff)
rp: Disable intrinsics by default.
Diffstat (limited to 'embassy-rp/src')
-rw-r--r--embassy-rp/src/intrinsics.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/embassy-rp/src/intrinsics.rs b/embassy-rp/src/intrinsics.rs
index ac1f54800..3e75fb7fc 100644
--- a/embassy-rp/src/intrinsics.rs
+++ b/embassy-rp/src/intrinsics.rs
@@ -17,7 +17,7 @@ macro_rules! intrinsics_aliases {
17 $alias:ident 17 $alias:ident
18 $($rest:ident)* 18 $($rest:ident)*
19 ) => { 19 ) => {
20 #[cfg(all(target_arch = "arm", not(feature = "disable-intrinsics")))] 20 #[cfg(all(target_arch = "arm", feature = "intrinsics"))]
21 intrinsics! { 21 intrinsics! {
22 extern $abi fn $alias( $($argname: $ty),* ) -> $ret { 22 extern $abi fn $alias( $($argname: $ty),* ) -> $ret {
23 $name($($argname),*) 23 $name($($argname),*)
@@ -35,7 +35,7 @@ macro_rules! intrinsics_aliases {
35 $alias:ident 35 $alias:ident
36 $($rest:ident)* 36 $($rest:ident)*
37 ) => { 37 ) => {
38 #[cfg(all(target_arch = "arm", not(feature = "disable-intrinsics")))] 38 #[cfg(all(target_arch = "arm", feature = "intrinsics"))]
39 intrinsics! { 39 intrinsics! {
40 unsafe extern $abi fn $alias( $($argname: $ty),* ) -> $ret { 40 unsafe extern $abi fn $alias( $($argname: $ty),* ) -> $ret {
41 $name($($argname),*) 41 $name($($argname),*)
@@ -55,7 +55,7 @@ macro_rules! intrinsics_aliases {
55/// is to abstract anything special that needs to be done to override an 55/// is to abstract anything special that needs to be done to override an
56/// intrinsic function. Intrinsic generation is disabled for non-ARM targets 56/// intrinsic function. Intrinsic generation is disabled for non-ARM targets
57/// so things like CI and docs generation do not have problems. Additionally 57/// so things like CI and docs generation do not have problems. Additionally
58/// they can be disabled with the crate feature `disable-intrinsics` for 58/// they can be disabled by disabling the crate feature `intrinsics` for
59/// testing or comparing performance. 59/// testing or comparing performance.
60/// 60///
61/// Like the compiler-builtins macro, it accepts a series of functions that 61/// Like the compiler-builtins macro, it accepts a series of functions that
@@ -214,13 +214,13 @@ macro_rules! intrinsics {
214 214
215 $($rest:tt)* 215 $($rest:tt)*
216 ) => { 216 ) => {
217 #[cfg(all(target_arch = "arm", not(feature = "disable-intrinsics")))] 217 #[cfg(all(target_arch = "arm", feature = "intrinsics"))]
218 $(#[$($attr)*])* 218 $(#[$($attr)*])*
219 extern $abi fn $name( $($argname: $ty),* ) -> $ret { 219 extern $abi fn $name( $($argname: $ty),* ) -> $ret {
220 $($body)* 220 $($body)*
221 } 221 }
222 222
223 #[cfg(all(target_arch = "arm", not(feature = "disable-intrinsics")))] 223 #[cfg(all(target_arch = "arm", feature = "intrinsics"))]
224 mod $name { 224 mod $name {
225 #[no_mangle] 225 #[no_mangle]
226 $(#[$($attr)*])* 226 $(#[$($attr)*])*
@@ -231,7 +231,7 @@ macro_rules! intrinsics {
231 231
232 // Not exported, but defined so the actual implementation is 232 // Not exported, but defined so the actual implementation is
233 // considered used 233 // considered used
234 #[cfg(not(all(target_arch = "arm", not(feature = "disable-intrinsics"))))] 234 #[cfg(not(all(target_arch = "arm", feature = "intrinsics")))]
235 #[allow(dead_code)] 235 #[allow(dead_code)]
236 fn $name( $($argname: $ty),* ) -> $ret { 236 fn $name( $($argname: $ty),* ) -> $ret {
237 $($body)* 237 $($body)*
@@ -248,13 +248,13 @@ macro_rules! intrinsics {
248 248
249 $($rest:tt)* 249 $($rest:tt)*
250 ) => { 250 ) => {
251 #[cfg(all(target_arch = "arm", not(feature = "disable-intrinsics")))] 251 #[cfg(all(target_arch = "arm", feature = "intrinsics"))]
252 $(#[$($attr)*])* 252 $(#[$($attr)*])*
253 unsafe extern $abi fn $name( $($argname: $ty),* ) -> $ret { 253 unsafe extern $abi fn $name( $($argname: $ty),* ) -> $ret {
254 $($body)* 254 $($body)*
255 } 255 }
256 256
257 #[cfg(all(target_arch = "arm", not(feature = "disable-intrinsics")))] 257 #[cfg(all(target_arch = "arm", feature = "intrinsics"))]
258 mod $name { 258 mod $name {
259 #[no_mangle] 259 #[no_mangle]
260 $(#[$($attr)*])* 260 $(#[$($attr)*])*
@@ -265,7 +265,7 @@ macro_rules! intrinsics {
265 265
266 // Not exported, but defined so the actual implementation is 266 // Not exported, but defined so the actual implementation is
267 // considered used 267 // considered used
268 #[cfg(not(all(target_arch = "arm", not(feature = "disable-intrinsics"))))] 268 #[cfg(not(all(target_arch = "arm", feature = "intrinsics")))]
269 #[allow(dead_code)] 269 #[allow(dead_code)]
270 unsafe fn $name( $($argname: $ty),* ) -> $ret { 270 unsafe fn $name( $($argname: $ty),* ) -> $ret {
271 $($body)* 271 $($body)*