From owner-svn-src-all@freebsd.org Thu Sep 15 18:30:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADFB7BDC67D; Thu, 15 Sep 2016 18:30:54 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7E20EAD4; Thu, 15 Sep 2016 18:30:54 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8FIUrYA005298; Thu, 15 Sep 2016 18:30:53 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8FIUrCW005297; Thu, 15 Sep 2016 18:30:53 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609151830.u8FIUrCW005297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 15 Sep 2016 18:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305849 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 15 Sep 2016 18:30:54 -0000 Author: bde Date: Thu Sep 15 18:30:53 2016 New Revision: 305849 URL: https://svnweb.freebsd.org/changeset/base/305849 Log: Decode some REX prefixes in inst_call(). This makes the 'next' and 'until' commands work in more cases. Modified: head/sys/amd64/include/db_machdep.h Modified: head/sys/amd64/include/db_machdep.h ============================================================================== --- head/sys/amd64/include/db_machdep.h Thu Sep 15 17:37:30 2016 (r305848) +++ head/sys/amd64/include/db_machdep.h Thu Sep 15 18:30:53 2016 (r305849) @@ -69,14 +69,15 @@ do { \ #define I_CALL 0xe8 #define I_CALLI 0xff +#define i_calli(ins) (((ins)&0xff) == I_CALLI && ((ins)&0x3800) == 0x1000) #define I_RET 0xc3 #define I_IRET 0xcf +#define i_rex(ins) (((ins) & 0xff) == 0x41 || ((ins) & 0xff) == 0x43) #define inst_trap_return(ins) (((ins)&0xff) == I_IRET) #define inst_return(ins) (((ins)&0xff) == I_RET) -#define inst_call(ins) (((ins)&0xff) == I_CALL || \ - (((ins)&0xff) == I_CALLI && \ - ((ins)&0x3800) == 0x1000)) +#define inst_call(ins) (((ins)&0xff) == I_CALL || i_calli(ins) || \ + (i_calli((ins) >> 8) && i_rex(ins))) #define inst_load(ins) 0 #define inst_store(ins) 0