Clear carry flag in get_mconetxt so that setcontext does not
	return a bogus error.
This commit is contained in:
David Xu 2006-02-03 02:49:14 +00:00
parent 97794f4eb3
commit 6d7c1bdccd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155239

View File

@ -1561,16 +1561,17 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
mcp->mc_rbp = tp->tf_rbp;
mcp->mc_rbx = tp->tf_rbx;
mcp->mc_rcx = tp->tf_rcx;
mcp->mc_rflags = tp->tf_rflags;
if (flags & GET_MC_CLEAR_RET) {
mcp->mc_rax = 0;
mcp->mc_rdx = 0;
mcp->mc_rflags &= ~PSL_C;
} else {
mcp->mc_rax = tp->tf_rax;
mcp->mc_rdx = tp->tf_rdx;
}
mcp->mc_rip = tp->tf_rip;
mcp->mc_cs = tp->tf_cs;
mcp->mc_rflags = tp->tf_rflags;
mcp->mc_rsp = tp->tf_rsp;
mcp->mc_ss = tp->tf_ss;
mcp->mc_len = sizeof(*mcp);