diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-07-25 00:21:37 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-07-25 00:21:37 +0000 |
commit | 1654706adb2f3dfd3df950ad08e3ee6fb3b8079c (patch) | |
tree | 8e454d81d9ae1bdbdc96ceb6ea3dbd450fbfb0dc /sys/amd64 | |
parent | 8d2bac7470cc9afcfad01ff7128d4d23eafeb4cd (diff) | |
download | FreeBSD-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.c | 1 |
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; /* |