1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Align signal frame placed on stack to 16 bytes so that SSE FPU register

restores can work.  Also correct allocation for signal frame size.

Reviewed by:	mini
This commit is contained in:
Daniel Eischen 2003-03-29 16:38:15 +00:00
parent e3a2085326
commit 67aba1c6a4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112807

View File

@ -56,7 +56,8 @@ __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func)
*/
p = (register_t *)(void *)(intptr_t)ucp->uc_mcontext.mc_esp;
*--p = (register_t)(intptr_t)ucp;
p -= sizeof(struct sigframe);
p = (register_t *)((u_register_t)p & ~0xF); /* Align to 16 bytes. */
p = (register_t *)((u_register_t)p - sizeof(struct sigframe));
sfp = (struct sigframe *)p;
bzero(sfp, sizeof(struct sigframe));
sfp->sf_signum = sig;