masayuki2009 commented on a change in pull request #5734: URL: https://github.com/apache/incubator-nuttx/pull/5734#discussion_r825602682
########## File path: arch/arm/src/armv7-a/arm_vectors.S ########## @@ -279,53 +220,39 @@ arm_vectorirq: arm_vectorsvc: +#ifdef CONFIG_ARMV7A_DECODEFIQ + mov r13, #(PSR_MODE_SYS | PSR_I_BIT | PSR_F_BIT) +#else + mov r13, #(PSR_MODE_SYS | PSR_I_BIT) +#endif + msr cpsr_c, r13 /* Switch to SYS mode */ + /* Create a context structure. First set aside a stack frame * and store r0-r12 into the frame. */ sub sp, sp, #XCPTCONTEXT_SIZE - stmia sp, {r0-r12} /* Save the SVC mode regs */ + stmia sp, {r0-r12} /* Save the SYS mode regs */ + +#ifdef CONFIG_ARMV7A_DECODEFIQ + mov r0, #(PSR_MODE_SVC | PSR_I_BIT | PSR_F_BIT) +#else + mov r0, #(PSR_MODE_SVC | PSR_I_BIT) +#endif + msr cpsr_c, r0 /* Switch back IRQ mode */ Review comment: `Switch back to SVC mode` ? ########## File path: arch/arm/src/arm/arm_vectors.S ########## @@ -207,54 +147,33 @@ arm_vectorirq: .type arm_vectorsvc, %function arm_vectorsvc: + /* On entry, we are in IRQ mode. We are free to use the IRQ mode r13 + * and r14. Review comment: `IRQ mode` -> `SVC mode` ? -- 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