File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -195,18 +195,20 @@ pub unsafe fn semihosting_syscall(nr: u32, arg: u32) -> u32 {
195195#[ cfg( cortex_m) ]
196196#[ inline( always) ]
197197pub unsafe fn enter_unprivileged ( psp : * const u32 , entry : fn ( ) -> !) -> ! {
198- core:: arch:: asm!(
199- "mrs {tmp}, CONTROL" ,
200- "orr {tmp}, #3" ,
201- "msr PSP, {psp}" ,
202- "msr CONTROL, {tmp}" ,
203- "isb" ,
204- "bx {ent}" ,
205- tmp = in( reg) 0 ,
206- psp = in( reg) psp,
207- ent = in( reg) entry,
208- options( noreturn, nomem, nostack)
209- ) ;
198+ unsafe {
199+ core:: arch:: asm!(
200+ "mrs {tmp}, CONTROL" ,
201+ "orr {tmp}, #3" ,
202+ "msr PSP, {psp}" ,
203+ "msr CONTROL, {tmp}" ,
204+ "isb" ,
205+ "bx {ent}" ,
206+ tmp = in( reg) 0 ,
207+ psp = in( reg) psp,
208+ ent = in( reg) entry,
209+ options( noreturn, nostack)
210+ ) ;
211+ }
210212}
211213
212214/// Bootstrap.
You can’t perform that action at this time.
0 commit comments