From 1be9867c3e45c64c48e6f050b30f7f5cd03c6eb3 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 26 Dec 1995 20:29:51 +0000 Subject: from netbsd; enable cpu_swapout(), which must save npx state --- sys/arch/i386/i386/vm_machdep.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c index 6adf2874c17..2b4452abf56 100644 --- a/sys/arch/i386/i386/vm_machdep.c +++ b/sys/arch/i386/i386/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.55 1995/12/09 04:37:44 mycroft Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.56 1995/12/24 01:07:32 mycroft Exp $ */ /*- * Copyright (c) 1995 Charles M. Hannum. All rights reserved. @@ -156,6 +156,20 @@ cpu_set_kpc(p, pc) sf->sf_esi = pc; } +void +cpu_swapout(p) + struct proc *p; +{ + +#if NNPX > 0 + /* + * Make sure we save the FP state before the user area vanishes. + */ + if (npxproc == p) + npxsave(); +#endif +} + /* * cpu_exit is called as the last action during exit. * -- cgit v1.2.3