Fix stack offset to allow gcc's stack aligment code to work correctly.

MFC after: 3 days
This commit is contained in:
davidxu 2006-03-10 02:54:45 +00:00
parent bce91540c2
commit b36ad9d674

View File

@ -464,7 +464,7 @@ cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg,
*/
td->td_frame->tf_ebp = 0;
td->td_frame->tf_esp =
(int)stack->ss_sp + stack->ss_size - 16;
(((int)stack->ss_sp + stack->ss_size - 4) & ~0x0f) - 4;
td->td_frame->tf_eip = (int)entry;
/*