summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2002-12-04 15:04:18 +0000
committernyan <nyan@FreeBSD.org>2002-12-04 15:04:18 +0000
commit609f476f6114e6c80498bcf8cf05e5ee4145939d (patch)
tree0a05e4f183aaba98173e8b6410407c74c726314b /sys/pc98
parent719f445a6eb3bb22f65fb89a5bda6f3bfc664f61 (diff)
downloadFreeBSD-src-609f476f6114e6c80498bcf8cf05e5ee4145939d.zip
FreeBSD-src-609f476f6114e6c80498bcf8cf05e5ee4145939d.tar.gz
MFi386: revision 1.551.
Approved by: re (jhb)
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/i386/machdep.c9
-rw-r--r--sys/pc98/pc98/machdep.c9
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 57b21b6..d02293d 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -526,6 +526,7 @@ sendsig(catcher, sig, mask, code)
struct proc *p;
struct thread *td;
struct sigacts *psp;
+ char *sp;
struct trapframe *regs;
int oonstack;
@@ -564,13 +565,15 @@ sendsig(catcher, sig, mask, code)
/* Allocate space for the signal handler context. */
if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sfp = (struct sigframe *)(p->p_sigstk.ss_sp +
- p->p_sigstk.ss_size - sizeof(struct sigframe));
+ sp = p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size - sizeof(struct sigframe);
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
p->p_sigstk.ss_flags |= SS_ONSTACK;
#endif
} else
- sfp = (struct sigframe *)regs->tf_esp - 1;
+ sp = (char *)regs->tf_esp - sizeof(struct sigframe);
+ /* Align to 16 bytes. */
+ sfp = (struct sigframe *)((unsigned int)sp & ~0xF);
PROC_UNLOCK(p);
/* Translate the signal if appropriate. */
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 57b21b6..d02293d 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -526,6 +526,7 @@ sendsig(catcher, sig, mask, code)
struct proc *p;
struct thread *td;
struct sigacts *psp;
+ char *sp;
struct trapframe *regs;
int oonstack;
@@ -564,13 +565,15 @@ sendsig(catcher, sig, mask, code)
/* Allocate space for the signal handler context. */
if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sfp = (struct sigframe *)(p->p_sigstk.ss_sp +
- p->p_sigstk.ss_size - sizeof(struct sigframe));
+ sp = p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size - sizeof(struct sigframe);
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
p->p_sigstk.ss_flags |= SS_ONSTACK;
#endif
} else
- sfp = (struct sigframe *)regs->tf_esp - 1;
+ sp = (char *)regs->tf_esp - sizeof(struct sigframe);
+ /* Align to 16 bytes. */
+ sfp = (struct sigframe *)((unsigned int)sp & ~0xF);
PROC_UNLOCK(p);
/* Translate the signal if appropriate. */
OpenPOWER on IntegriCloud