From nobody Wed Nov 5 09:21:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499714551759891.6966653944223; Mon, 10 Jul 2017 12:22:31 -0700 (PDT) Received: from localhost ([::1]:42618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUeGL-0007z2-7J for importer@patchew.org; Mon, 10 Jul 2017 15:22:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUeFT-0007bY-S7 for qemu-devel@nongnu.org; Mon, 10 Jul 2017 15:21:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUeFR-0006aD-OE for qemu-devel@nongnu.org; Mon, 10 Jul 2017 15:21:35 -0400 Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]:35480) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUeFR-0006a1-Hg for qemu-devel@nongnu.org; Mon, 10 Jul 2017 15:21:33 -0400 Received: by mail-wr0-x235.google.com with SMTP id k67so151272813wrc.2 for ; Mon, 10 Jul 2017 12:21:33 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u135sm655915wmu.12.2017.07.10.12.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 12:21:28 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 7F7EF3E0258; Mon, 10 Jul 2017 20:21:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oiYY7L6CJhTMaujluKlhbW1IrGWZZrdUFXSimciraWk=; b=boKLD7M2Y79sGtiJYTBS1rnqgyAKZ2GkmuEYXs3PI7gqKMENEEWBUlvoilxNImf4aW 2ETZrNRAOjpn5lcyJghV75A0BZM1QNxjM/lAJ98a3zsFCMbD07vykAAF+eobnWmTZ4vO YiwPwOoDjrzz2fJKk1IrSuRmWLQdVSgLCRoOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oiYY7L6CJhTMaujluKlhbW1IrGWZZrdUFXSimciraWk=; b=kCZJ0pUWjOMYyw6KWM8SYn6gizjfFdJJmYI42EcZe6a0NLjqVc2OR1OEDu9pss4JmS WWw899PJvhm29mj0ejtPWPZDebFJKthmW6z69KbeULtizT9o51d2ypRHp5xmojRI5BKc mcCN4m7vGNRa5DazN0lUcqtaDuVcyLZpsT5q2hx0Rm3crVoZnEDedR1V0xtEdwwq3cJY RB6W9K9v8yAKuvq8NhwxT0pSuaYbEb1+kfhzYBW7eqir+l3w5QW8lCCyHayTWlUFRhGO 9lchik/EMyLDHATYkmeq65xjrfcUHlHyzHHNFi496EOA0/qNewXIWTwYXvXgUqOjttxC x5Jg== X-Gm-Message-State: AIVw112ESFhbdcOJk71yv1WFAtSOjMFEbzaVC046FOJwhhDV0LuGqyR1 X7LGcRgrVazqr9zNQT99MA== X-Received: by 10.28.8.144 with SMTP id 138mr8997226wmi.8.1499714492447; Mon, 10 Jul 2017 12:21:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, cota@braap.org Date: Mon, 10 Jul 2017 20:21:24 +0100 Message-Id: <20170710192128.9048-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170710192128.9048-1-alex.bennee@linaro.org> References: <20170710192128.9048-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::235 Subject: [Qemu-devel] [PATCH v2 1/5] include/exec/exec-all: document common exit conditions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Peter Crosthwaite , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 As a precursor to later patches attempt to come up with a more concrete wording for what each of the common exit cases would be. CC: Emilio G. Cota CC: Richard Henderson CC: Llu=C3=ADs Vilanova Signed-off-by: Alex Benn=C3=A9e --- include/exec/exec-all.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 8096d64a1d..a23894f687 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -35,11 +35,34 @@ typedef abi_ulong tb_page_addr_t; typedef ram_addr_t tb_page_addr_t; #endif =20 -/* is_jmp field values */ +/* DisasContext is_jmp field values + * + * is_jmp starts as DISAS_NEXT. The translator will keep processing + * instructions until an exit condition is reached. If we reach the + * exit condition and is_jmp is still DISAS_NEXT (because of some + * other condition) we simply "jump" to the next address. + * The remaining exit cases are: + * + * DISAS_JUMP - Only the PC was modified dynamically (e.g computed) + * DISAS_TB_JUMP - Only the PC was modified statically (e.g. branch) + * + * In these cases as long as the PC is updated we can chain to the + * next TB either by exiting the loop or looking up the next TB via + * the loookup helper. + * + * DISAS_UPDATE - CPU State was modified dynamically + * + * This covers any other CPU state which necessities us exiting the + * TCG code to the main run-loop. Typically this includes anything + * that might change the interrupt state. + * + * Individual translators may define additional exit cases to deal + * with per-target special conditions. + */ #define DISAS_NEXT 0 /* next instruction can be analyzed */ #define DISAS_JUMP 1 /* only pc was modified dynamically */ -#define DISAS_UPDATE 2 /* cpu state was modified dynamically */ -#define DISAS_TB_JUMP 3 /* only pc was modified statically */ +#define DISAS_TB_JUMP 2 /* only pc was modified statically */ +#define DISAS_UPDATE 3 /* cpu state was modified dynamically */ =20 #include "qemu/log.h" =20 --=20 2.13.0