From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpZMu-000214-Oz for qemu-devel@nongnu.org; Fri, 23 Oct 2015 06:14:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpZMr-00023G-HI for qemu-devel@nongnu.org; Fri, 23 Oct 2015 06:14:40 -0400 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:34135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpZMr-00022p-A1 for qemu-devel@nongnu.org; Fri, 23 Oct 2015 06:14:37 -0400 Received: by lfaz124 with SMTP id z124so78104975lfa.1 for ; Fri, 23 Oct 2015 03:14:36 -0700 (PDT) References: <56292AEA.3010408@gmail.com> From: Sergey Fedorov Message-ID: <562A088A.3030905@gmail.com> Date: Fri, 23 Oct 2015 13:14:34 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] exec: About DISAS_JUMP and DISAS_UPDATE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Peter Crosthwaite , QEMU Developers , Aurelien Jarno , Richard Henderson On 23.10.2015 00:28, Peter Maydell wrote: > On 22 October 2015 at 19:28, Sergey Fedorov wrote: >> Hi all, >> >> I am trying to understand what the difference should be between >> DISAS_JUMP and DISAS_UPDATE. Actually, these macros have comments in >> include/exec/exec-all.h which say that DISAS_JUMP should be used when >> only PC was modified dynamically whereas DISAS_UPDATE should be used >> when some other CPU state was (in addition to PC?) modified dynamically. >> In fact, every target except ARM AArch64 does not distinguish between >> them. As I can see ARM AArch64 seems to suppose that: (1) PC was not >> modified when DISAS_UPDATE is used and should be updated with dc->pc >> when finishing translation; (2) DISAS_JUMP can be used to indicate that >> a new PC value was set and it should be preserved when finishing >> translation. > As Richard says, (a) the semantics for these values are really > private to each translator (b) the general idea is how AArch64 > uses them. I think the 32-bit ARM code does something a bit odd > because it has to handle conditional execution (some things we > might have otherwise done immediately in the decode function > get postponed to the end of the loop). Mostly I haven't messed > around too much with that bit of the code because it works > and it's kind of complicated to understand. But the AArch64 > stuff we wrote from scratch so it does things in the straightforward > way. Thanks, Peter. What if I am going to modify DISAS_JUMP and DISAS_UPDATE usage in 32-bit ARM code and apply AArch64 semantics to them? Best, Sergey