File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
15
15
eventually replace the existing ` ptr() ` API.
16
16
- A delay driver based on SysTick.
17
17
18
+ ### Changed
19
+
20
+ - Previously, asm calls without the ` inline-asm ` feature enabled used pre-built
21
+ objects which were built by a GCC compiler, while ` inline-asm ` enabled the
22
+ use of ` llvm_asm! ` calls. The asm system has been replaced with a new
23
+ technique which generates Rust static libs for stable calling, and uses the
24
+ new ` asm! ` macro with ` inline-asm ` . See the ` asm/lib.rs ` documentation for
25
+ more details.
26
+
18
27
## [ v0.6.3] - 2020-07-20
19
28
20
29
### Added
Original file line number Diff line number Diff line change @@ -24,23 +24,27 @@ pub unsafe fn __control_r() -> u32 {
24
24
pub unsafe fn __control_w ( w : u32 ) {
25
25
// ISB is required after writing to CONTROL,
26
26
// per ARM architectural requirements (see Application Note 321).
27
- asm ! ( "msr CONTROL, {}" , "isb" , in( reg) w) ;
27
+ asm ! (
28
+ "msr CONTROL, {}" ,
29
+ "isb" ,
30
+ in( reg) w
31
+ ) ;
28
32
29
- // Ensure instructions are not reordered around the CONTROL update.
33
+ // Ensure memory accesses are not reordered around the CONTROL update.
30
34
compiler_fence ( Ordering :: SeqCst ) ;
31
35
}
32
36
33
37
#[ inline( always) ]
34
38
pub unsafe fn __cpsid ( ) {
35
39
asm ! ( "cpsid i" ) ;
36
40
37
- // Ensure no subsequent instructions are reordered to before interrupts are disabled.
41
+ // Ensure no subsequent memory accesses are reordered to before interrupts are disabled.
38
42
compiler_fence ( Ordering :: SeqCst ) ;
39
43
}
40
44
41
45
#[ inline( always) ]
42
46
pub unsafe fn __cpsie ( ) {
43
- // Ensure no preceeding instructions are reordered to after interrupts are enabled.
47
+ // Ensure no preceeding memory accesses are reordered to after interrupts are enabled.
44
48
compiler_fence ( Ordering :: SeqCst ) ;
45
49
46
50
asm ! ( "cpsie i" ) ;
@@ -61,7 +65,7 @@ pub unsafe fn __delay(cyc: u32) {
61
65
#[ inline( always) ]
62
66
pub unsafe fn __dmb ( ) {
63
67
asm ! ( "dmb" ) ;
64
- compiler_fence ( Ordering :: AcqRel ) ;
68
+ compiler_fence ( Ordering :: SeqCst ) ;
65
69
}
66
70
67
71
#[ inline( always) ]
You can’t perform that action at this time.
0 commit comments