Permalink
Browse files

[cortexM] use a low register to restore R0-R3 from stack. ARMv6-M req…

…uirement
  • Loading branch information...
Mikael BRIDAY
Mikael BRIDAY committed Sep 10, 2018
1 parent 44718d0 commit f5c891a336599343740455322cf54a7fafc2d748
Showing with 4 additions and 4 deletions.
  1. +4 −4 machines/cortex/tpl_sc_handler.S
@@ -122,11 +122,11 @@ tpl_sc_handler:
/*-------------------------------------------------------------------------
* 0 - registers R0-R3 have to be restored from the stack. First the PSP
* is copied in R12 to point to the process stack. Second registers
* R0-R3 are loaded from the process stack
* (process stack pointer) is copied in R0. Second registers R0-R3 are
* loaded from the process stack
*/
mrs r12,psp
ldmia r12,{r0, r1, r2, r3}
mrs r0,psp
ldmia r0,{r0, r1, r2, r3}
/*-------------------------------------------------------------------------
* 1 - The service identifier is checked to prevent crashes if it has

0 comments on commit f5c891a

Please sign in to comment.