From patchwork Mon Jul 17 12:44:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 107919 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4469294qge; Mon, 17 Jul 2017 05:48:08 -0700 (PDT) X-Received: by 10.55.40.218 with SMTP id o87mr24257613qko.50.1500295688128; Mon, 17 Jul 2017 05:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500295688; cv=none; d=google.com; s=arc-20160816; b=ho0RLAu6KjHEKPB89xGelWP4a/MJn/++4CSVf+iGMFKNX1apjAgS9DxOqKQ/IHZPMW 1aLwA/Y/BtUVxVJuM1Hs9GFgC6Wo7Uns4eTgfrDpGLE8E3hmZ4NVLsWJjKILWnKBciKr nueSCoHdh32dm5GxnOUqVJRpNc9HLBWCzDjbwzWUvrXL5OI1xFPyAWEf88ndSbpDO6OK Nk6xXyAMXkLsD3jctmKAG8BnSBn3lx/OsBuz9mZQyTuOugbFu2dXJIP9pX4Fc8MblCAZ maGWDZbdBFvlw+bNe0SGVnYMBAdS9RbbIgH6nQJ7poYkyGrt3OA8887rJVZahpEAeFc/ CnNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=DFYz2baoA5jfhwjCl9eHfwPpApXLv3iQfJ9F89fOCnQ=; b=UIbBW+tLgzECbRJKqWDQ4/PyJUXsD3Nw8L9MrfGt7E7KpZUOYrMCb2Kb1Oru67UrGf BhPQdt6+qGHbGlfzfUEB/qmMctseTn7x6LmYZDfWoO3twwjnLVKLHHVzd/bSatTBTdgs sEzAuIQrnZ07k8F1lNr3LbGkKrqvP6N27iNOvVPsJ07MQf5Q7xUzRcg13wV5bV5BUiaF dn64Hhm1CHql1noC+a3Ld1h5Bd0WSOq+AE1UXTICxua5AMea7LuKOmmxs1wCQ5Y6f4+M velE8zoL9NEL+LeKNfsJoW6YJtTb9iEaf6IR9c+XJnRgBsA1NtQap+XDuWYemAgZgK9c ZD1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t188si6211983qkd.239.2017.07.17.05.48.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 17 Jul 2017 05:48:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX5RV-0001dD-Ic for patch@linaro.org; Mon, 17 Jul 2017 08:48:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX5Of-0007vp-RI for qemu-devel@nongnu.org; Mon, 17 Jul 2017 08:45:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX5Oe-0002J7-VI for qemu-devel@nongnu.org; Mon, 17 Jul 2017 08:45:09 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37640) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dX5Oe-0002Ci-Op for qemu-devel@nongnu.org; Mon, 17 Jul 2017 08:45:08 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dX5OU-0003Td-Lr for qemu-devel@nongnu.org; Mon, 17 Jul 2017 13:44:58 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 17 Jul 2017 13:44:43 +0100 Message-Id: <1500295494-8991-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500295494-8991-1-git-send-email-peter.maydell@linaro.org> References: <1500295494-8991-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 07/18] target/arm/translate: ensure gen_goto_tb sets exit flags 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée As the gen_goto_tb function can do both static and dynamic jumps it should also set the is_jmp field. This matches the behaviour of the a64 code. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20170713141928.25419-5-alex.bennee@linaro.org [tweak to multiline comment formatting] Signed-off-by: Peter Maydell --- target/arm/translate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/target/arm/translate.c b/target/arm/translate.c index 5f2cea8..bbae519 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4158,6 +4158,10 @@ static void gen_goto_ptr(void) tcg_temp_free(addr); } +/* This will end the TB but doesn't guarantee we'll return to + * cpu_loop_exec. Any live exit_requests will be processed as we + * enter the next TB. + */ static void gen_goto_tb(DisasContext *s, int n, target_ulong dest) { if (use_goto_tb(s, dest)) { @@ -4168,6 +4172,7 @@ static void gen_goto_tb(DisasContext *s, int n, target_ulong dest) gen_set_pc_im(s, dest); gen_goto_ptr(); } + s->is_jmp = DISAS_TB_JUMP; } static inline void gen_jmp (DisasContext *s, uint32_t dest) @@ -4179,7 +4184,6 @@ static inline void gen_jmp (DisasContext *s, uint32_t dest) gen_bx_im(s, dest); } else { gen_goto_tb(s, 0, dest); - s->is_jmp = DISAS_TB_JUMP; } }