summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/sparc64/trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc64/sparc64/trap.c')
-rw-r--r--sys/arch/sparc64/sparc64/trap.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index 7bd266c7ac7..97f720d7aae 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.29 2003/07/10 19:33:19 jason Exp $ */
+/* $OpenBSD: trap.c,v 1.30 2003/07/14 02:03:16 jason Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -605,11 +605,26 @@ badtrap:
}
case T_LDQF_ALIGN:
- trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv); /* XXX code?? */
- break;
case T_STQF_ALIGN:
- trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv); /* XXX code?? */
+ {
+ union instr ins;
+
+ if (copyin((caddr_t)pc, &ins, sizeof(ins)) != 0) {
+ /* XXX Can this happen? */
+ trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv);
+ break;
+ }
+ if (ins.i_any.i_op == IOP_mem &&
+ (ins.i_op3.i_op3 == IOP3_LDQF ||
+ ins.i_op3.i_op3 == IOP3_STQF ||
+ ins.i_op3.i_op3 == IOP3_LDQFA ||
+ ins.i_op3.i_op3 == IOP3_STQFA)) {
+ if (emul_qf(ins.i_int, p, sv, tf))
+ ADVANCE;
+ } else
+ trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv);
break;
+ }
case T_ALIGN:
case T_LDDF_ALIGN: