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/).
1515 eventually replace the existing ` ptr() ` API.
1616- A delay driver based on SysTick.
1717
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+
1827## [ v0.6.3] - 2020-07-20
1928
2029### Added
Original file line number Diff line number Diff line change @@ -24,23 +24,27 @@ pub unsafe fn __control_r() -> u32 {
2424pub unsafe fn __control_w ( w : u32 ) {
2525 // ISB is required after writing to CONTROL,
2626 // 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+ ) ;
2832
29- // Ensure instructions are not reordered around the CONTROL update.
33+ // Ensure memory accesses are not reordered around the CONTROL update.
3034 compiler_fence ( Ordering :: SeqCst ) ;
3135}
3236
3337#[ inline( always) ]
3438pub unsafe fn __cpsid ( ) {
3539 asm ! ( "cpsid i" ) ;
3640
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.
3842 compiler_fence ( Ordering :: SeqCst ) ;
3943}
4044
4145#[ inline( always) ]
4246pub 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.
4448 compiler_fence ( Ordering :: SeqCst ) ;
4549
4650 asm ! ( "cpsie i" ) ;
@@ -61,7 +65,7 @@ pub unsafe fn __delay(cyc: u32) {
6165#[ inline( always) ]
6266pub unsafe fn __dmb ( ) {
6367 asm ! ( "dmb" ) ;
64- compiler_fence ( Ordering :: AcqRel ) ;
68+ compiler_fence ( Ordering :: SeqCst ) ;
6569}
6670
6771#[ inline( always) ]
You can’t perform that action at this time.
0 commit comments