From ac41f72cfb5fcff54aefd94138a2ac29e19d060b Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 22 Jun 2004 23:00:16 +0000 Subject: During exception processing, we are not supposed to fault immediately after re-enabling the FPU (unless exception handling code is suffering from bugs, of course). Should this happen, invoke the error fault handler, but at least clear the exception state first, so that it gets a chance to run. --- sys/arch/mvme88k/mvme88k/eh.S | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sys/arch/mvme88k') diff --git a/sys/arch/mvme88k/mvme88k/eh.S b/sys/arch/mvme88k/mvme88k/eh.S index e8178194dba..4e97857437a 100644 --- a/sys/arch/mvme88k/mvme88k/eh.S +++ b/sys/arch/mvme88k/mvme88k/eh.S @@ -1,4 +1,4 @@ -/* $OpenBSD: eh.S,v 1.53 2004/06/22 18:27:08 miod Exp $ */ +/* $OpenBSD: eh.S,v 1.54 2004/06/22 23:00:15 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -2371,7 +2371,16 @@ ASLOCAL(m88110_use_SR3_pcb) * use it as scratch storage. */ #if 1 - br _C_LABEL(m88110_error_handler) + ldcr TMP, PSR + clr TMP, TMP, 1 /* enable the FPU */ + clr TMP, TMP, 1 /* and shadowing */ + stcr TMP, EPSR + + or.u TMP, r0, hi16(_C_LABEL(m88110_error_handler)) + or TMP, TMP, lo16(_C_LABEL(m88110_error_handler)) + stcr TMP, EXIP + + RTE #else /* Testing!!! */ xcr r30, r30, SR3 /* r30 = old exception frame */ -- cgit v1.2.3