summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-05-13 01:22:57 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-05-13 01:22:57 +0000
commit3655b3c0588176f6203946b2301dc1d005a583ee (patch)
treec74977ce0d6d9c09d83c347a2ed9f3656bfe774c /sys/arch/hppa
parentc2ddd2679a54f0ebadcc7629383b6c7164fb98b2 (diff)
implement spop1,,0 support
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/trap.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index 71cdd7c7859..2f4091234cb 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.74 2004/05/12 22:56:59 mickey Exp $ */
+/* $OpenBSD: trap.c,v 1.75 2004/05/13 01:22:56 mickey Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -337,11 +337,6 @@ trap(type, frame)
case T_CONDITION | T_USER:
break;
- case T_ILLEGAL | T_USER:
- sv.sival_int = va;
- trapsignal(p, SIGILL, type &~ T_USER, ILL_ILLOPC, sv);
- break;
-
case T_PRIV_OP | T_USER:
sv.sival_int = va;
trapsignal(p, SIGILL, type &~ T_USER, ILL_PRVOPC, sv);
@@ -471,11 +466,25 @@ trap(type, frame)
panic("trap: divide by zero in the kernel");
break;
+ case T_ILLEGAL:
+ case T_ILLEGAL | T_USER:
+ /* see if it's a SPOP1,,0 */
+ if ((frame->tf_iir & 0xfffffe00) == 0x10000200) {
+ frame_regmap(frame, frame->tf_iir & 0x1f) = 0;
+ frame->tf_ipsw |= PSL_N;
+ break;
+ }
+ if (type & T_USER) {
+ sv.sival_int = va;
+ trapsignal(p, SIGILL, type &~ T_USER, ILL_ILLOPC, sv);
+ break;
+ }
+ /* FALLTHROUGH */
+
case T_LOWERPL:
case T_DPROT:
case T_IPROT:
case T_OVERFLOW:
- case T_ILLEGAL:
case T_HIGHERPL:
case T_TAKENBR:
case T_POWERFAIL: