File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 6
6
//! All of these functions should be blanket-`unsafe`. `cortex-m` provides safe wrappers where
7
7
//! applicable.
8
8
9
+ use core:: arch:: asm;
9
10
use core:: sync:: atomic:: { compiler_fence, Ordering } ;
10
11
11
12
#[ inline( always) ]
@@ -214,6 +215,7 @@ pub unsafe fn __bootstrap(msp: u32, rv: u32) -> ! {
214
215
pub use self :: v7m:: * ;
215
216
#[ cfg( any( armv7m, armv8m_main) ) ]
216
217
mod v7m {
218
+ use core:: arch:: asm;
217
219
use core:: sync:: atomic:: { compiler_fence, Ordering } ;
218
220
219
221
#[ inline( always) ]
@@ -283,6 +285,8 @@ mod v7m {
283
285
pub use self :: v7em:: * ;
284
286
#[ cfg( armv7em) ]
285
287
mod v7em {
288
+ use core:: arch:: asm;
289
+
286
290
#[ inline( always) ]
287
291
pub unsafe fn __basepri_max_cm7_r0p1 ( val : u8 ) {
288
292
asm ! (
@@ -319,6 +323,8 @@ pub use self::v8m::*;
319
323
/// Baseline and Mainline.
320
324
#[ cfg( armv8m) ]
321
325
mod v8m {
326
+ use core:: arch:: asm;
327
+
322
328
#[ inline( always) ]
323
329
pub unsafe fn __tt ( mut target : u32 ) -> u32 {
324
330
asm ! ( "tt {target}, {target}" , target = inout( reg) target) ;
@@ -366,6 +372,8 @@ pub use self::v8m_main::*;
366
372
/// Mainline only.
367
373
#[ cfg( armv8m_main) ]
368
374
mod v8m_main {
375
+ use core:: arch:: asm;
376
+
369
377
#[ inline( always) ]
370
378
pub unsafe fn __msplim_r ( ) -> u32 {
371
379
let r;
@@ -396,6 +404,8 @@ pub use self::fpu::*;
396
404
/// All targets with FPU.
397
405
#[ cfg( has_fpu) ]
398
406
mod fpu {
407
+ use core:: arch:: asm;
408
+
399
409
#[ inline( always) ]
400
410
pub unsafe fn __fpscr_r ( ) -> u32 {
401
411
let r;
Original file line number Diff line number Diff line change 76
76
// - A generated #[derive(Debug)] function (in which case the attribute needs
77
77
// to be applied to the struct).
78
78
#![ deny( clippy:: missing_inline_in_public_items) ]
79
+ // Don't warn about feature(asm) being stable on Rust >= 1.59.0
80
+ #![ allow( stable_features) ]
79
81
80
82
extern crate bare_metal;
81
83
extern crate volatile_register;
You can’t perform that action at this time.
0 commit comments