[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCHv2 1/5] lib/uksched: Ensure (%rsp + 8) 16-byte alignment for x86_64 only
From: Wei Chen <wei.chen@xxxxxxx> As Arm64 just needs stack 16-byte alignment. So this rnsure (%rsp + 8) 16-byte alignment is used for x86_64 only. Signed-off-by: Wei Chen <wei.chen@xxxxxxx> Signed-off-by: Jianyong Wu <jianyong.wu@xxxxxxx> Signed-off-by: Jia He <justin.he@xxxxxxx> --- lib/uksched/thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/uksched/thread.c b/lib/uksched/thread.c index 7400bae..f6e0d02 100644 --- a/lib/uksched/thread.c +++ b/lib/uksched/thread.c @@ -53,10 +53,12 @@ static void init_sp(unsigned long *sp, char *stack, { *sp = (unsigned long) stack + STACK_SIZE; +#if defined(__X86_64__) /* Must ensure that (%rsp + 8) is 16-byte aligned * at the start of thread_starter. */ stack_push(sp, 0); +#endif stack_push(sp, (unsigned long) function); stack_push(sp, (unsigned long) data); -- 2.17.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |