From patchwork Mon Jul 17 12:44:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 107924 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4474033qge; Mon, 17 Jul 2017 05:52:26 -0700 (PDT) X-Received: by 10.200.53.232 with SMTP id l37mr6339542qtb.7.1500295946606; Mon, 17 Jul 2017 05:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500295946; cv=none; d=google.com; s=arc-20160816; b=b0anTpk7mdmj1AKDyqF1DjbDR6uCP1zpE3engzCL7kNOv8t2riDHK+CzbrSI3az5s/ xbcIjomNVYK/5MCKe2iP/oLMhDsOZZpujUrJNMxgmeaKxHyvO/A3NhEzhoj6ncuMaQDa nFeoMdoJ7jBepHQ9lRyFkPXAzd/1aLMxudB9sCquncCGaz/YDlf5COY1EGio2cmO/pvi K4j+FjGDKD66bhIf9FSp6Cqfjh0zwppvsiQO3R6m6slVKd77ScqtEWh9Uk4fxp/wN529 4f3sQUVLgvWXOsl9AzEnsPFCyGdigSRbqTjDnOvupHt3+bC492/NJTQmGfRGlv23Kham b6GA== 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=fIFojjKj75i17YPmxwq7DUjOZyqBxtdY3Evo0ws1B4s=; b=qsCgKVqqfaX5B4F+9DhgDQ6dylY3yTiuEuDv/YlAxJ4Kk7zm9ErfOxCF2KaBL5byVn dE7dv6HFfsKdDYOIezzZRvpovNOd6PnCrwfBwVvVD/SqzdwQJB8W8NyK84VwtV4REbV6 G7pQ9aX/iowoFJD8xdQW9nfLSvm5Cnly7WzRBnI9gBzCm/SS5tem0ozaTRFI3DucvUg2 Njgx02kyQPBnfjVFbZbMia/NF5susojps1s0q5MDLZo3v62Qtrswqs5dVlTRKBff5lzW E1kqQvUgMaaXSnKx6rky4WSaFWJh1U4aE6l+X4Bi0w9XrWkTSDq2880tKCvoJfO8EEXW Op2Q== 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 w60si15085967qte.231.2017.07.17.05.52.26 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 17 Jul 2017 05:52:26 -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]:50188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX5Vg-0004y2-6P for patch@linaro.org; Mon, 17 Jul 2017 08:52:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX5Of-0007vI-Ly 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-0002IB-I4 for qemu-devel@nongnu.org; Mon, 17 Jul 2017 08:45:09 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dX5Oe-00029H-9r 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 1dX5OV-0003U0-9F for qemu-devel@nongnu.org; Mon, 17 Jul 2017 13:44:59 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 17 Jul 2017 13:44:44 +0100 Message-Id: <1500295494-8991-9-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 08/18] target/arm: use gen_goto_tb for ISB handling 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 While an ISB will ensure any raised IRQs happen on the next instruction it doesn't cause any to get raised by itself. We can therefore use a simple tb exit for ISB instructions and rely on the exit_request check at the top of each TB to deal with exiting if needed. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20170713141928.25419-6-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 2 +- target/arm/translate.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 66139b6..2ac565e 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -1393,7 +1393,7 @@ static void handle_sync(DisasContext *s, uint32_t insn, * a self-modified code correctly and also to take * any pending interrupts immediately. */ - s->is_jmp = DISAS_UPDATE; + gen_goto_tb(s, 0, s->pc); return; default: unallocated_encoding(s); diff --git a/target/arm/translate.c b/target/arm/translate.c index bbae519..75cdeca 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8169,7 +8169,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) * self-modifying code correctly and also to take * any pending interrupts immediately. */ - gen_lookup_tb(s); + gen_goto_tb(s, 0, s->pc & ~1); return; default: goto illegal_op; @@ -10562,7 +10562,7 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw * and also to take any pending interrupts * immediately. */ - gen_lookup_tb(s); + gen_goto_tb(s, 0, s->pc & ~1); break; default: goto illegal_op;