summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2012-12-30 18:13:19 +0000
committermiod <miod@openbsd.org>2012-12-30 18:13:19 +0000
commitdad9771949ae5575096714cbb54c91178af75e51 (patch)
treea8258c6b98c6985b9d12ca412d750559df2cc236
parentStop including other files in m88k/openbsd.h; instead specific the complete list (diff)
downloadwireguard-openbsd-dad9771949ae5575096714cbb54c91178af75e51.tar.xz
wireguard-openbsd-dad9771949ae5575096714cbb54c91178af75e51.zip
Prevent a branch-with-delay-slot instruction to be the delay slot of a previous
branch-with-delay-slot instruction, in the 88100 exception code path, in kernels configured without DDB. This is undefined behaviour, but we have apparently be lucky enough since RAMDISK is known to work on 88100.
-rw-r--r--sys/arch/m88k/m88k/eh_common.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/m88k/m88k/eh_common.S b/sys/arch/m88k/m88k/eh_common.S
index b8bce6aeb0e..6e52790ffd8 100644
--- a/sys/arch/m88k/m88k/eh_common.S
+++ b/sys/arch/m88k/m88k/eh_common.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: eh_common.S,v 1.55 2010/12/23 20:05:08 miod Exp $ */
+/* $OpenBSD: eh_common.S,v 1.56 2012/12/30 18:13:19 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -1491,6 +1491,8 @@ ASLOCAL(m88100_fpu_enable)
bb1.n eq, r3, 8f
cmp r3, r2, 132 /* DDB entry exception */
bb1 eq, r3, 8f
+#else
+ NOP
#endif
/* turn interrupts back on unless they were not enabled when the