diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-04-17 18:27:55 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-04-17 18:27:55 +0000 |
| commit | 5d520398473ec75202e4ea61a4af81fe09883a1c (patch) | |
| tree | 7b680483c39c07e73f224e879a8b769dfee9e209 | |
| parent | 2b77cdeac131c4ddeccd0b03a083ac73a53ac6d7 (diff) | |
Notes
| -rw-r--r-- | sys/alpha/alpha/machdep.c | 2 | ||||
| -rw-r--r-- | sys/alpha/alpha/swtch.s | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 836538ddd588..37fa0089eff4 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -2131,7 +2131,7 @@ alpha_fpstate_save(struct proc *p, int write) critical_t s; s = critical_enter(); - if (p == PCPU_GET(fpcurproc)) { + if (p != NULL && p == PCPU_GET(fpcurproc)) { /* * If curproc != fpcurproc, then we need to enable FEN * so that we can dump the fp state. diff --git a/sys/alpha/alpha/swtch.s b/sys/alpha/alpha/swtch.s index 7c121654cdbd..ef1e493942da 100644 --- a/sys/alpha/alpha/swtch.s +++ b/sys/alpha/alpha/swtch.s @@ -141,6 +141,13 @@ Lcs1: LDGP(pv) bne t0, Lcs7 /* Yes! Skip! */ /* + * Save fp state if we have some. + */ + mov s0, a0 /* curproc */ + ldiq a1, 1 /* clear fpcurproc */ + CALL(alpha_fpstate_save) + + /* * Deactivate the old address space before activating the * new one. We need to do this before activating the * new process's address space in the event that new |
