summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2006-02-09 11:50:22 +0000
committernyan <nyan@FreeBSD.org>2006-02-09 11:50:22 +0000
commit0e3468c387172657a2723a03a896db68a3b9f068 (patch)
tree53e3f80ecc63e943afede7bd60397837154732ff /sys/pc98
parentaea8c69b018099c3f9cd11f71b62d05f83a6f035 (diff)
downloadFreeBSD-src-0e3468c387172657a2723a03a896db68a3b9f068.zip
FreeBSD-src-0e3468c387172657a2723a03a896db68a3b9f068.tar.gz
MFi386: revision 1.622.
> Clear carry flag in get_mcontext so that setcontext does not > return a bogus error. MFC after: 3 days
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/pc98/machdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 6a87f76e..7b98290 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -2402,9 +2402,11 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
mcp->mc_esi = tp->tf_esi;
mcp->mc_ebp = tp->tf_ebp;
mcp->mc_isp = tp->tf_isp;
+ mcp->mc_eflags = tp->tf_eflags;
if (flags & GET_MC_CLEAR_RET) {
mcp->mc_eax = 0;
mcp->mc_edx = 0;
+ mcp->mc_eflags &= ~PSL_C;
} else {
mcp->mc_eax = tp->tf_eax;
mcp->mc_edx = tp->tf_edx;
@@ -2413,7 +2415,6 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
mcp->mc_ecx = tp->tf_ecx;
mcp->mc_eip = tp->tf_eip;
mcp->mc_cs = tp->tf_cs;
- mcp->mc_eflags = tp->tf_eflags;
mcp->mc_esp = tp->tf_esp;
mcp->mc_ss = tp->tf_ss;
mcp->mc_len = sizeof(*mcp);
OpenPOWER on IntegriCloud