From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDN1n-0001Gi-6g for qemu-devel@nongnu.org; Sun, 27 Dec 2015 20:55:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDN1m-0005Pa-BX for qemu-devel@nongnu.org; Sun, 27 Dec 2015 20:55:15 -0500 References: <1449101933-24928-1-git-send-email-mdavidsaver@gmail.com> <1449101933-24928-3-git-send-email-mdavidsaver@gmail.com> From: Michael Davidsaver Message-ID: <56809677.5080003@gmail.com> Date: Sun, 27 Dec 2015 20:55:03 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , qemu-arm , QEMU Developers On 12/17/2015 10:38 AM, Peter Maydell wrote: > We could use a comment here (a) explaining what we're doing and (b) > mentioning that this isn't architecturally correct -- ideally we should > catch these exception exits on execution of the jump insn, not by > letting the jump execute and then trapping when we actually try to > execute at the magic addresses. I had an instructive little digression to investigate doing things the "right way" (in tcg). I can see how it would be done by adding a conditional every time the PC could be updated. To me the unassigned handler trick/hack seems simpler (less likely to add a bug) and avoids emitting more code for every ldm/pop instruction.