This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit a6e30a786eb7623578c8f5bd03303fa8e3280777 Author: ligd <[email protected]> AuthorDate: Tue Sep 3 12:25:27 2024 +0800 arch/armv6/7/8-m: align the irq stack sp to 8 bytes for 64bits print align the irq stack sp to 8 bytes for 64bits print Signed-off-by: ligd <[email protected]> --- arch/arm/include/arm_m/irq.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/arm_m/irq.h b/arch/arm/include/arm_m/irq.h index 8269019e6f9..f1b0a713283 100644 --- a/arch/arm/include/arm_m/irq.h +++ b/arch/arm/include/arm_m/irq.h @@ -121,13 +121,18 @@ #ifdef CONFIG_ARMV8M_STACKCHECK_HARDWARE # define REG_SPLIM (SW_INT_REGS + SW_FPU_REGS + 0) /* REG_SPLIM */ -# define SW_XCPT_REGS (SW_INT_REGS + SW_FPU_REGS + 1) +# define REG_ALIGN (SW_INT_REGS + SW_FPU_REGS + 1) /* For 8-bytes align */ +# define SW_XCPT_REGS (SW_INT_REGS + SW_FPU_REGS + 2) #else # define SW_XCPT_REGS (SW_INT_REGS + SW_FPU_REGS) #endif #define SW_XCPT_SIZE (4 * SW_XCPT_REGS) +#if SW_XCPT_SIZE % 8 != 0 +# error "SW_XCPT_SIZE must be a multiple of 8" +#endif + /* On entry into an IRQ, the hardware automatically saves the following * registers on the stack in this (address) order: */
