masayuki2009 commented on a change in pull request #2061:
URL: https://github.com/apache/incubator-nuttx/pull/2061#discussion_r510562610



##########
File path: arch/arm/src/armv7-m/gnu/arm_lazyexception.S
##########
@@ -192,7 +192,8 @@ exception_common:
         * here prohibits nested interrupts without some additional logic!
         */
 
-       setintstack     r2, r3
+       setintstack     r2, r3                          /* SP = IRQ stack top */
+       sub             sp, #8                                  /* Adjust SP 
(minus 8-byte offset) */

Review comment:
       I thought I added a comment on this.
   The reason is that the setinstack load $SP from g_intstackbase
   
   ```
   #if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7                   
                                                                                
                                      
       .macro  setintstack, tmp1, tmp2                                          
                                                                                
                                      
       ldr     sp, =g_intstackbase                                              
                                                                                
                                      
       .endm                                                                    
                                                                                
                                      
   #endif        
   ````
   
   In the case of SMP, MCU specific code in chip.h will load $SP as well
   




----------------------------------------------------------------
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.

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


Reply via email to