Fix SunOS user trace trap handling, from Gordon.

This commit is contained in:
scottr 1997-04-07 22:54:44 +00:00
parent eabfcc3f00
commit 396cf17033

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.45 1997/01/20 04:30:05 scottr Exp $ */ /* $NetBSD: trap.c,v 1.46 1997/04/07 22:54:44 scottr Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -424,13 +424,16 @@ copyfault:
case T_TRAP15|T_USER: /* Sun user trace trap */ case T_TRAP15|T_USER: /* Sun user trace trap */
#ifdef COMPAT_SUNOS #ifdef COMPAT_SUNOS
/* /*
* XXX This comment/code is not consistent XXX * SunOS uses Trap #2 for a "CPU cache flush"
* SunOS seems to use Trap #2 for some obscure * Just flush the on-chip caches and return.
* fpu operations. So far, just ignore it, but * XXX - Too bad NetBSD uses trap 2...
* DONT trap on it..
*/ */
if (p->p_emul == &emul_sunos) if (p->p_emul == &emul_sunos) {
goto out; ICIA();
DCIU();
/* get out fast */
goto done;
}
#endif #endif
frame.f_sr &= ~PSL_T; frame.f_sr &= ~PSL_T;
i = SIGTRAP; i = SIGTRAP;