From patchwork Tue Jul 11 17:59:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 107412 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp8266obm; Tue, 11 Jul 2017 11:03:21 -0700 (PDT) X-Received: by 10.55.52.202 with SMTP id b193mr1490378qka.220.1499796201089; Tue, 11 Jul 2017 11:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499796201; cv=none; d=google.com; s=arc-20160816; b=l+T9EzPCzyELY4cGAOpQSDYAbcqO7+x/VXK6H72Iz3e1JWeX28SUxRld+9x8awTHF4 XTeAWgTqUKYgQzAVIylAaJCDs/mY5DlqKK1Y/Oic1eyyRMVckT2XA0Asc1/QlaM6ZvlN zXa61sXu+q1XGYoQeAfuM8XJV/MiHF9DuJ9wvsJEiRXHluuaK0LyEs165R9h+H/2rb1i b+KtdNOHsdsazOdlTIfFiz+ijjM/wlOLIHqXxm2qww8lA4X7fsTkrpylFSJEUbkUCmmY +Z8ULCDPiEmigoNWxs38Lpn1JxCAREuHiXCUs2eHOZjNL8nJkjj4NN5iysG3uoZHoOxA 1z+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:dkim-signature:arc-authentication-results; bh=uzR4g936SSavaoSDPDoeTBWt59Ogr1zRaToBHlxex0c=; b=BaBXzrzdoyLTCCa+oaOmArsBEWKuAnPvqeg3DTaaveHPqfoo6RrDjXMtaX8Iz5vs0T uMsIbI4jMWOlUdi/3GkIGADJPCwdIbnzcQxigjFrWJDa+Ll2zbb3c50pnfcseI4aInXu 0Ij/gmd5UolFap8bYEOunU4AiEV4fBT/FeOLwW6uBd+7C1RsPeMFtD3/LeDpY5Sj+MhF Xh4WfJI4pOdYCP8KguPqQm+1mEEqrayY4wfV1nEF8NAEEC0pW1YJKtdC31Wn6Lep7itW WIp7pIFVWSG0x6+1u36GPchWcSWAJ7EGkR9gHfrVrm2aQgcQq+AVa2QuR+yvQHfonVX0 XdSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=M5ifRUMt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 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. [208.118.235.17]) by mx.google.com with ESMTPS id j184si516256qkd.335.2017.07.11.11.03.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 11 Jul 2017 11:03:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=M5ifRUMt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 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]:48116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUzVG-00040H-IP for patch@linaro.org; Tue, 11 Jul 2017 14:03:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUzSt-0002W8-Nx for qemu-devel@nongnu.org; Tue, 11 Jul 2017 14:00:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUzSq-0005Gm-GB for qemu-devel@nongnu.org; Tue, 11 Jul 2017 14:00:51 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:34947) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUzSq-0005FQ-0V for qemu-devel@nongnu.org; Tue, 11 Jul 2017 14:00:48 -0400 Received: by mail-wr0-f174.google.com with SMTP id k67so9435771wrc.2 for ; Tue, 11 Jul 2017 11:00:47 -0700 (PDT) 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=uzR4g936SSavaoSDPDoeTBWt59Ogr1zRaToBHlxex0c=; b=M5ifRUMtsLvsQKDPUEBq3Lr1tiQfIb1VX7+PCT3V2a4mko3+3G1uoTVtHjeAXv9+vZ +7EdZilfgURGZtnwz9SF/kEq3DtaU+EVxfZrXSl0LME0gBEcTjMIMjkiID1J27cCzr7H U01g6HLD3Q7rrLjHe8P4H4xRLxpzoB7rPPiy0= 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=uzR4g936SSavaoSDPDoeTBWt59Ogr1zRaToBHlxex0c=; b=XpmV3AxWRfOmk2owNMrWMVteGIbaxkJ4fLaiLQ59kszCNg1WpXnbCDS7krX3TZYLkw 45BF2OYFFU6C1TpPOUtkGlEgMqMSIh2IH64VktmZEWEWQisE2M2/TvwB4qQ9I9Jx0ezZ n4z4AjpBxnE5zd342OohheE70Aq4bjdYIM0sg2c5lMEKf9QsMSJxibqUeRyrv1TafK63 FsIqlpCV3LkiiWR70s+EAuc04CKv471d111D1fGkSM/rqPXrEufJb6gOD3acQUUCcezC ypShs4JpH2wDhHy4z0hVetWSh0n62P0MYWnCgRMlJfj/5Zf128scdaq2BA8jDOZ/pkOR dbzw== X-Gm-Message-State: AIVw113a50ya1YXVobpx+gd5f9Oxmf8BIgOfss54nMAFQ/HxLBBovg2f WNBzskKjJKiUTtMA X-Received: by 10.28.14.149 with SMTP id 143mr3626435wmo.105.1499795986583; Tue, 11 Jul 2017 10:59:46 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t33sm580277wrc.50.2017.07.11.10.59.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 10:59:42 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 49FB73E0C26; Tue, 11 Jul 2017 18:59:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, cota@braap.org Date: Tue, 11 Jul 2017 18:59:36 +0100 Message-Id: <20170711175937.23140-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170711175937.23140-1-alex.bennee@linaro.org> References: <20170711175937.23140-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.128.174 Subject: [Qemu-devel] [PATCH v3 5/6] 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: , Cc: "open list:ARM" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 therefor 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 --- target/arm/translate-a64.c | 2 +- target/arm/translate.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.13.0 Reviewed-by: Richard Henderson Reviewed-by: Emilio G. Cota diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 66139b6046..2ac565eb10 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 82341ee709..dbf919cce3 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;