From owner-svn-src-stable-10@FreeBSD.ORG Mon May 5 03:15:54 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9201A579; Mon, 5 May 2014 03:15:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64A2B1580; Mon, 5 May 2014 03:15:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s453Fsk6027600; Mon, 5 May 2014 03:15:54 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s453FsXJ027599; Mon, 5 May 2014 03:15:54 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405050315.s453FsXJ027599@svn.freebsd.org> From: Mark Johnston Date: Mon, 5 May 2014 03:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265346 - stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 03:15:54 -0000 Author: markj Date: Mon May 5 03:15:53 2014 New Revision: 265346 URL: http://svnweb.freebsd.org/changeset/base/265346 Log: MFC r262661: Fix emulation of call and jmp instructions on i386 and for 32-bit processes on amd64. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 01:50:01 2014 (r265345) +++ stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 03:15:53 2014 (r265346) @@ -1429,10 +1429,7 @@ fasttrap_pid_probe(struct reg *rp) if (tp->ftt_code == 0) { new_pc = tp->ftt_dest; } else { -#ifdef __amd64 - uintptr_t value; -#endif - uintptr_t addr = tp->ftt_dest; + uintptr_t value, addr = tp->ftt_dest; if (tp->ftt_base != FASTTRAP_NOREG) addr += fasttrap_getreg(rp, tp->ftt_base); @@ -1456,6 +1453,7 @@ fasttrap_pid_probe(struct reg *rp) #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { +#endif if ((value = fasttrap_fulword((void *)addr)) == -1) { fasttrap_sigsegv(p, curthread, @@ -1464,9 +1462,8 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value; +#ifdef __amd64 } else { -#endif -#ifdef __i386__ uint32_t value32; addr = (uintptr_t)(uint32_t)addr; if ((value32 = fasttrap_fuword32((void *)addr)) @@ -1477,13 +1474,11 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value32; -#endif } -#ifdef __amd64 +#endif } else { new_pc = addr; } -#endif } /* @@ -1502,11 +1497,9 @@ fasttrap_pid_probe(struct reg *rp) ret = fasttrap_sulword((void *)addr, pcps); } else { #endif -#ifdef __i386__ addr = rp->r_rsp - sizeof (uint32_t); pcps = (uint32_t)(pc + tp->ftt_size); ret = fasttrap_suword32((void *)addr, pcps); -#endif #ifdef __amd64 } #endif