From owner-svn-src-all@FreeBSD.ORG Tue Apr 27 10:50:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1627106564A; Tue, 27 Apr 2010 10:50:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90F478FC0C; Tue, 27 Apr 2010 10:50:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3RAo9kG085896; Tue, 27 Apr 2010 10:50:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3RAo9Kj085894; Tue, 27 Apr 2010 10:50:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004271050.o3RAo9Kj085894@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 27 Apr 2010 10:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207271 - stable/8/sys/amd64/ia32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2010 10:50:09 -0000 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);