summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-07-25 00:21:37 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-07-25 00:21:37 +0000
commit1654706adb2f3dfd3df950ad08e3ee6fb3b8079c (patch)
tree8e454d81d9ae1bdbdc96ceb6ea3dbd450fbfb0dc /sys/amd64
parent8d2bac7470cc9afcfad01ff7128d4d23eafeb4cd (diff)
downloadFreeBSD-src-1654706adb2f3dfd3df950ad08e3ee6fb3b8079c.zip
FreeBSD-src-1654706adb2f3dfd3df950ad08e3ee6fb3b8079c.tar.gz
Align upcall stack top to odd times of 8. GCC accounts return address
in callee function for stack alignment.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/vm_machdep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 21dc35e..9bceed7 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -292,6 +292,7 @@ cpu_set_upcall_kse(struct thread *td, struct kse_upcall *ku)
*/
td->td_frame->tf_rsp =
((register_t)ku->ku_stack.ss_sp + ku->ku_stack.ss_size) & ~0x0f;
+ td->td_frame->tf_rsp -= 8;
td->td_frame->tf_rip = (register_t)ku->ku_func;
/*
OpenPOWER on IntegriCloud