Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Apr 2010 10:50:09 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r207271 - stable/8/sys/amd64/ia32
Message-ID:  <201004271050.o3RAo9Kj085894@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Apr 27 10:50:09 2010
New Revision: 207271
URL: http://svn.freebsd.org/changeset/base/207271

Log:
  MFC r206992:
  As was done in r155238 for i386 and in r155239 for amd64, clear the carry
  flag for ia32 binary executed on amd64 host in get_mcontext().

Modified:
  stable/8/sys/amd64/ia32/ia32_signal.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/amd64/ia32/ia32_signal.c
==============================================================================
--- stable/8/sys/amd64/ia32/ia32_signal.c	Tue Apr 27 10:47:54 2010	(r207270)
+++ stable/8/sys/amd64/ia32/ia32_signal.c	Tue Apr 27 10:50:09 2010	(r207271)
@@ -141,9 +141,11 @@ ia32_get_mcontext(struct thread *td, str
 	mcp->mc_esi = tp->tf_rsi;
 	mcp->mc_ebp = tp->tf_rbp;
 	mcp->mc_isp = tp->tf_rsp;
+	mcp->mc_eflags = tp->tf_rflags;
 	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_rax;
 		mcp->mc_edx = tp->tf_rdx;
@@ -152,7 +154,6 @@ ia32_get_mcontext(struct thread *td, str
 	mcp->mc_ecx = tp->tf_rcx;
 	mcp->mc_eip = tp->tf_rip;
 	mcp->mc_cs = tp->tf_cs;
-	mcp->mc_eflags = tp->tf_rflags;
 	mcp->mc_esp = tp->tf_rsp;
 	mcp->mc_ss = tp->tf_ss;
 	mcp->mc_len = sizeof(*mcp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004271050.o3RAo9Kj085894>