You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/08/03 17:42:08 UTC

[nuttx] 02/03: armv7-r: idle stack should align with 8

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 2cfea55f95ae95e9824829680216a845d0015976
Author: ligd <li...@xiaomi.com>
AuthorDate: Mon Apr 17 16:25:31 2023 +0800

    armv7-r: idle stack should align with 8
    
    Signed-off-by: ligd <li...@xiaomi.com>
---
 arch/arm/src/armv7-r/arm_head.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/src/armv7-r/arm_head.S b/arch/arm/src/armv7-r/arm_head.S
index 428b0b2d3d..149fbcf921 100644
--- a/arch/arm/src/armv7-r/arm_head.S
+++ b/arch/arm/src/armv7-r/arm_head.S
@@ -161,6 +161,7 @@ __cpu0_start:
 	/* Set up the stack pointer and clear the frame pointer. */
 
 	ldr		sp, .Lstackpointer
+	bic		sp, sp, #7			/* Get the stack pointer with 8-byte alignment */
 	mov		fp, #0
 
 	/* Invalidate caches and TLBs.