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



##########
File path: arch/arm/src/armv7-a/arm_vectors.S
##########
@@ -1004,7 +1004,7 @@ arm_vectorfiq:
 
 #if CONFIG_ARCH_INTERRUPTSTACK > 7
        setfiqstack r1, r4                              /* SP = FIQ stack top */
-       str             r0, [sp]                                /* Save the 
user stack pointer */
+       str             r0, [sp, #-8]!                  /* Save the xcp address 
at SP-8 then update SP */

Review comment:
       -4?

##########
File path: arch/arm/src/armv7-a/arm_vectors.S
##########
@@ -261,7 +261,7 @@ arm_vectorirq:
        /* Call arm_decodeirq() on the interrupt stack */
 
        setirqstack r1, r3                              /* SP = IRQ stack top */
-       str             r0, [sp]                                /* Save the 
user stack pointer */
+       str             r0, [sp, #-8]!                  /* Save the xcp address 
at SP-8 then update SP */

Review comment:
       -4?

##########
File path: arch/arm/src/armv7-a/arm_vectors.S
##########
@@ -1096,7 +1096,7 @@ g_intstackbase:
        .type   g_fiqstackbase, object
 
 g_fiqstackalloc:
-       .skip   ((CONFIG_ARCH_INTERRUPTSTACK & ~7) - 4)
+       .skip   (CONFIG_ARCH_INTERRUPTSTACK & ~7)

Review comment:
       ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)

##########
File path: arch/arm/src/armv7-m/gnu/arm_lazyexception.S
##########
@@ -340,9 +340,9 @@ exception_common:
        .bss
        .global g_intstackalloc
        .global g_intstackbase
-       .align  8
+       .balign 8
 g_intstackalloc:
-       .skip   ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
+       .skip   (CONFIG_ARCH_INTERRUPTSTACK & ~7)

Review comment:
       need keep the old code

##########
File path: arch/arm/src/armv8-m/arm_exception.S
##########
@@ -355,9 +355,9 @@ exception_common:
        .bss
        .global g_intstackalloc
        .global g_intstackbase
-       .align  8
+       .balign 8
 g_intstackalloc:
-       .skip   ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
+       .skip   (CONFIG_ARCH_INTERRUPTSTACK & ~7)

Review comment:
       need keep the old

##########
File path: arch/arm/src/armv7-a/arm_vectors.S
##########
@@ -1072,15 +1072,15 @@ arm_vectorfiq:
 
 #if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
        .bss
-       .align  4
+       .balign 8
 
        .globl  g_intstackalloc
        .type   g_intstackalloc, object
        .globl  g_intstackbase
        .type   g_intstackbase, object
 
 g_intstackalloc:
-       .skip   ((CONFIG_ARCH_INTERRUPTSTACK & ~7) - 4)
+       .skip   (CONFIG_ARCH_INTERRUPTSTACK & ~7)

Review comment:
       ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)

##########
File path: arch/arm/src/armv7-m/gnu/arm_exception.S
##########
@@ -321,9 +322,9 @@ exception_common:
        .bss
        .global g_intstackalloc
        .global g_intstackbase
-       .align  8
+       .balign 8
 g_intstackalloc:
-       .skip   ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
+       .skip   (CONFIG_ARCH_INTERRUPTSTACK & ~7)

Review comment:
       need keep the old code after disscussion

##########
File path: arch/arm/src/armv7-r/arm_vectors.S
##########
@@ -957,21 +957,21 @@ arm_vectorfiq:
  *  Name: g_intstackalloc/g_intstackbase
  
************************************************************************************/
 
-#if CONFIG_ARCH_INTERRUPTSTACK > 3
+#if CONFIG_ARCH_INTERRUPTSTACK > 7
        .bss
-       .align  4
+       .balign 8
 
        .globl  g_intstackalloc
        .type   g_intstackalloc, object
        .globl  g_intstackbase
        .type   g_intstackbase, object
 
 g_intstackalloc:
-       .skip   ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4)
+       .skip   (CONFIG_ARCH_INTERRUPTSTACK & ~7)

Review comment:
       ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)

##########
File path: arch/arm/src/armv7-r/arm_vectors.S
##########
@@ -890,9 +890,9 @@ arm_vectorfiq:
        mov             fp, #0                                  /* Init frame 
pointer */
        mov             r0, sp                                  /* Get r0=xcp */
 
-#if CONFIG_ARCH_INTERRUPTSTACK > 3
+#if CONFIG_ARCH_INTERRUPTSTACK > 7
        ldr             sp, .Lfiqstackbase              /* SP = interrupt stack 
base */
-       str             r0, [sp]                                /* Save the 
user stack pointer */
+       str             r0, [sp, #-8]!                  /* Save the xcp address 
at SP-8 then update SP */

Review comment:
       change 8 to 4

##########
File path: arch/arm/src/armv8-m/arm_lazyexception.S
##########
@@ -373,9 +373,9 @@ exception_common:
        .bss
        .global g_intstackalloc
        .global g_intstackbase
-       .align  8
+       .balign 8
 g_intstackalloc:
-       .skip   ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
+       .skip   (CONFIG_ARCH_INTERRUPTSTACK & ~7)

Review comment:
       need keep

##########
File path: arch/arm/src/armv7-r/arm_vectors.S
##########
@@ -179,9 +179,9 @@ arm_vectorirq:
        mov             fp, #0                                  /* Init frame 
pointer */
        mov             r0, sp                                  /* Get r0=xcp */
 
-#if CONFIG_ARCH_INTERRUPTSTACK > 3
+#if CONFIG_ARCH_INTERRUPTSTACK > 7
        ldr             sp, .Lirqstackbase              /* SP = interrupt stack 
base */
-       str             r0, [sp]                                /* Save the 
user stack pointer */
+       str             r0, [sp, #-8]!                  /* Save the xcp address 
at SP-8 then update SP */

Review comment:
       change to -4




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