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 2024/10/09 09:40:43 UTC
(nuttx) branch master updated: arch/x68_64: properly align ap boot stack for vector operations
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
The following commit(s) were added to refs/heads/master by this push:
new 5e15fff58a arch/x68_64: properly align ap boot stack for vector operations
5e15fff58a is described below
commit 5e15fff58a7db65ee143877117ab0ac842a0e66e
Author: liwenxiang1 <li...@xiaomi.com>
AuthorDate: Wed Oct 9 16:46:19 2024 +0800
arch/x68_64: properly align ap boot stack for vector operations
Signed-off-by: liwenxiang1 <li...@xiaomi.com>
---
arch/x86_64/src/intel64/intel64_head.S | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86_64/src/intel64/intel64_head.S b/arch/x86_64/src/intel64/intel64_head.S
index 488f487fa6..355974e8e9 100644
--- a/arch/x86_64/src/intel64/intel64_head.S
+++ b/arch/x86_64/src/intel64/intel64_head.S
@@ -398,6 +398,13 @@ ap_start:
/* Jump to ap_start routine */
movabs $x86_64_ap_boot, %rbx
+
+ /* We need to simulate the behavior of the call instruction, which by
+ * default pushes 8 bytes of the RIP. Otherwise, the function's stack
+ * won't be 16-byte aligned.
+ */
+
+ pushq $0
jmp *%rbx
#endif