From a938926b5209e99a2008fece5a2e39fc07c62067 Mon Sep 17 00:00:00 2001 From: buxiasen Date: Wed, 30 Jul 2025 22:35:01 +0800 Subject: [PATCH] arch/sim: add JB_ALIGN0 for x64 to ensure the align Or will cause the fork break as call will auto push 1 item. Signed-off-by: buxiasen --- arch/sim/include/setjmp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/sim/include/setjmp.h b/arch/sim/include/setjmp.h index ef5b79d0859..3c252575fe8 100644 --- a/arch/sim/include/setjmp.h +++ b/arch/sim/include/setjmp.h @@ -40,7 +40,7 @@ #if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32) /* Storage order: %rbx, %rsp, %rbp, %r12, %r13, %r14, %r15, %rip */ -# define XCPTCONTEXT_REGS 10 +# define XCPTCONTEXT_REGS 11 # define XCPTCONTEXT_SIZE (8 * XCPTCONTEXT_REGS) # ifdef __ASSEMBLY__ @@ -55,6 +55,7 @@ # define JB_RIP (7*8) # define JB_FLAG (8*8) # define JB_ERRNO (9*8) +# define JB_ALIGN0 (10*8) # else @@ -68,6 +69,7 @@ # define JB_RIP (7) # define JB_FLAG (8) # define JB_ERRNO (9) +# define JB_ALIGN0 (10) # endif /* __ASSEMBLY__ */