pkarashchenko commented on a change in pull request #5558:
URL: https://github.com/apache/incubator-nuttx/pull/5558#discussion_r824582511



##########
File path: arch/arm/src/armv7-a/arm_vectors.S
##########
@@ -239,15 +239,16 @@ arm_vectorirq:
        cmp             r2, #PSR_MODE_USR               /* User mode? */
        bne             .Lirqleavesvc                   /* Branch if not user 
mode */
 
+       add             sp, sp, #XCPTCONTEXT_SIZE       /* Restore SVC's sp */
+
        /* ldmia with ^ will return the user mode registers (provided that r15
         * is not in the register list).
         */
 
-       mov             r13, r0                         /* (SVC) R13=Register 
storage area */
-       ldmia           r13, {r0-r12}                   /* Restore common 
R0-R12 */
-       add             r14, r13, #(4*REG_R13)          /* (SVC) R14=address of 
R13/R14 storage */
-       ldmia           r14, {r13, r14}^                /* Restore user mode 
R13/R14 */
-       add             r14, r13, #(4*REG_R15)          /* (SVC) R14=address of 
R15 storage */
+       mov             r14, r0                         /* (SVC) r14=Register 
storage area */
+       ldmia           r14!, {r0-r12}                  /* Restore common 
r0-r12 */
+       ldmia           r14, {r13, r14}^                /* Restore user mode 
r13/r14 */

Review comment:
       @minabeoki @anchao could you please take a look if my question is valid?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to