From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpLsv-0002Ms-SO for qemu-devel@nongnu.org; Thu, 22 Oct 2015 15:50:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpLss-0005O8-RR for qemu-devel@nongnu.org; Thu, 22 Oct 2015 15:50:49 -0400 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:33603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpLss-0005O4-LQ for qemu-devel@nongnu.org; Thu, 22 Oct 2015 15:50:46 -0400 Received: by pabrc13 with SMTP id rc13so94808741pab.0 for ; Thu, 22 Oct 2015 12:50:46 -0700 (PDT) Sender: Richard Henderson References: <56292AEA.3010408@gmail.com> From: Richard Henderson Message-ID: <56293E11.3080206@twiddle.net> Date: Thu, 22 Oct 2015 09:50:41 -1000 MIME-Version: 1.0 In-Reply-To: <56292AEA.3010408@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed 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: Sergey Fedorov , qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Crosthwaite , Aurelien Jarno , Peter Maydell On 10/22/2015 08:28 AM, 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. > > So I'm a bit confused... What the difference should be? Maybe something > should be fixed/clarified to make the comments and the code consistent. It's a mistake that these are defined in exec/. They ought to be totally private to each translator. See e.g. ExitStatus in target-alpha/translate.c. But yes, what you see in aarch64 is approximately what is intended. r~