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



##########
File path: arch/xtensa/src/common/xtensa_int_handlers.S
##########
@@ -263,6 +286,19 @@ _xtensa_level1_handler:
        mov             a2, sp                                                  
      /* Address of state save on stack */
        call0   _xtensa_context_save                    /* Save full register 
state */
 
+  /* Save current SP before (possibly) overwriting it, it's the register save
+   * area. This value will be used later by dispatch_c_isr to retrive the
+   * register save area.
+   */
+
+  mov  a12, sp
+
+  /* Switch to an interrupt stack if we have one */
+
+#if CONFIG_ARCH_INTERRUPTSTACK > 15
+  setintstack a13 a14
+#endif
+

Review comment:
       I think we need to adjust (i.e. subtract 16?) the stack pointer (a1?) to 
avoid overlap, because g_cpu_intstack_top does not include offset now.
   




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