aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/x86_64/target_arch_thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-user/x86_64/target_arch_thread.h')
-rw-r--r--bsd-user/x86_64/target_arch_thread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsd-user/x86_64/target_arch_thread.h b/bsd-user/x86_64/target_arch_thread.h
index 52c2890..7739bb2 100644
--- a/bsd-user/x86_64/target_arch_thread.h
+++ b/bsd-user/x86_64/target_arch_thread.h
@@ -31,7 +31,7 @@ static inline void target_thread_init(struct target_pt_regs *regs,
struct image_info *infop)
{
regs->rax = 0;
- regs->rsp = infop->start_stack;
+ regs->rsp = ((infop->start_stack - 8) & ~0xfUL) + 8;
regs->rip = infop->entry;
regs->rdi = infop->start_stack;
}