Align upcall stack top to odd times of 8. GCC accounts return address

in callee function for stack alignment.
This commit is contained in:
David Xu 2003-07-25 00:21:37 +00:00
parent c5262d75ed
commit 74bbb26b51

View file

@ -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;
/*