summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-05-26 17:31:17 +0000
committermiod <miod@openbsd.org>2014-05-26 17:31:17 +0000
commit23d111223d88d1d89298be53219f90c2c00e6660 (patch)
treea88e5b4cce11fd2dbc76f956880ff1e8d1d83020
parenttweak the text for -a and function lists; (diff)
downloadwireguard-openbsd-23d111223d88d1d89298be53219f90c2c00e6660.tar.xz
wireguard-openbsd-23d111223d88d1d89298be53219f90c2c00e6660.zip
Do not change the state of the carry bit in the psr when returning with
ERESTART or EJUSTRETURN, for we're not supposed to. (Actually, setting the carry bit upon syscall failure doesn't make much sense on m88k, since this is not how the syscall stubs check for failure)
-rw-r--r--sys/arch/m88k/m88k/trap.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c
index 8054055b12c..5e95bb0c829 100644
--- a/sys/arch/m88k/m88k/trap.c
+++ b/sys/arch/m88k/m88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.93 2014/05/11 00:12:44 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.94 2014/05/26 17:31:17 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -1265,12 +1265,10 @@ m88100_syscall(register_t code, struct trapframe *tf)
tf->tf_sfip = tf->tf_snip + 4;
break;
case ERESTART:
- tf->tf_epsr &= ~PSR_C;
tf->tf_sfip = tf->tf_snip & ~FIP_E;
tf->tf_snip = tf->tf_sxip & ~NIP_E;
break;
case EJUSTRETURN:
- tf->tf_epsr &= ~PSR_C;
break;
default:
bad:
@@ -1388,10 +1386,8 @@ m88110_syscall(register_t code, struct trapframe *tf)
* exip is already at the trap instruction, so
* there is nothing to do.
*/
- tf->tf_epsr &= ~PSR_C;
break;
case EJUSTRETURN:
- tf->tf_epsr &= ~PSR_C;
/* skip one instruction */
m88110_skip_insn(tf);
break;