From patchwork Thu Jul 13 14:19:27 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: 107693 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2282854qge; Thu, 13 Jul 2017 07:26:24 -0700 (PDT) X-Received: by 10.55.221.76 with SMTP id n73mr5418384qki.186.1499955984611; Thu, 13 Jul 2017 07:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499955984; cv=none; d=google.com; s=arc-20160816; b=F/NvxuJwK7MHyXIxDxbxZJuARo9EcqJ4cKg28sSe+UhkQAB2Rd+az0a+bckEnZ/Cx1 onVF18GBMvlIEOmJEBrLIcN4kf7q4XxsW3BRa6fFOXZujgmzLvTiRpTD4f8RAJ5Nizke t3VNnwDpiiu2jyYiMt0Q8CGPyM+N9r4dmqL7xqnG7E5SYxEkS6TN6Yf2gi8TyWxY9uqA 4zuL18SITAxNf7U8UivHaVF6XJS0RIw5CwMXbXKYuPuzFROrXFcL2fr6OAO24VVBRx4c u0MuxOdnqDLrT3+YJz6tD8RuE5THrGap+bVT/xfhq9UlNdlykglKV9V1bQYrCyT096wK 2pVw== 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=pOoVnYiJ2JKFXGGzYSzEkdbvjh7zN2u0Rt3JHYtjaOg=; b=URP2awVunZDiD567PNEswZRJIU/42Ij8RrH8LBkPTM+jdgioa+SgOzSLZz7CM4sGYP u3xTj0THoYLqz6UtDWYsFhKoN3o+7opS2FlzlvVDUoc0V6ZK7KMddKFqAhX7Vl81ROKc Gdo/UxyzqVDG2mUzwKdEySnEFDwVHRY3SO2C+GefK3QSL8/Q+iI2jUWj0yt4s6zTodbm Y/Vdey/vywtv2SvIHJtbsQp0GeZFTVKO9xjUW4du69uI4nnylKxp/SOTkR1liwzy/prI sWmIsb47TlWdJ4FAy7xrNviAIT4D3miimirOzgvTF+imWbObTjQHOF7WYWTn5pjKPvoV SeVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=kkfufhAv; 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 y14si5208766qty.347.2017.07.13.07.26.24 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 13 Jul 2017 07:26:24 -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; dkim=fail header.i=@linaro.org header.b=kkfufhAv; 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]:60365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVf4Q-0001M6-5q for patch@linaro.org; Thu, 13 Jul 2017 10:26:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVeyx-0005Ct-UA for qemu-devel@nongnu.org; Thu, 13 Jul 2017 10:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVeyt-0007IL-Ib for qemu-devel@nongnu.org; Thu, 13 Jul 2017 10:20:43 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35568) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVeyt-0007Fx-7i for qemu-devel@nongnu.org; Thu, 13 Jul 2017 10:20:39 -0400 Received: by mail-wm0-f42.google.com with SMTP id w126so25107937wme.0 for ; Thu, 13 Jul 2017 07:20:39 -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=pOoVnYiJ2JKFXGGzYSzEkdbvjh7zN2u0Rt3JHYtjaOg=; b=kkfufhAv+pU6J5zKO+iUXnG8mQSVjO5P5caL1ela/XAEs25vzLeR91dxcJM3vCUv8L sodtil6CiNIowIc0y1BfhfQ/A+zyuakVfa3+RB0HNSDgAs8+4GoD+Ijmg2Eusx4yyhUH tGNBIvJep6GZEnVSTRR9on4e1riAKGrcLckVc= 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=pOoVnYiJ2JKFXGGzYSzEkdbvjh7zN2u0Rt3JHYtjaOg=; b=bgbL1ITCIZS5l2aO/sjdVmCz0uKf1ylqhCa7BdPvl7vpScmo/J5gCvhSoKDaFAaeK6 n7ZMWh1BzRS6L5clx/xdQbsle6Ia5LUFztkLqgb+6vGQ9NY5kswGKlKd49XYrB5cw7se 4PcOLwc6o3OAeteFdU1mVoCgP5sPXnSuV+4XvAb19MZ5QcZlYoJAs6cRWFZR1MVVxn0K GtFGpN9SAKc4WiI6NF+MlHCAATyAN/cVWyLbO+aDIUJCHkmlntVnb7399IAdg0iZxjES vmGUDsarqLKuAhWt2VB3w7fJ04qQIPAKlGKrLhmOmcIWQ42v4r32MxpdRaM/kMWfiHNm BKdg== X-Gm-Message-State: AIVw1131INUAevFqv5T6AQmEEckrnqgoaN/jqW4t0AsF+YGZXHmztjgT i8caYYTEuJcA04TN4cUSBw== X-Received: by 10.28.191.74 with SMTP id p71mr2136636wmf.45.1499955578119; Thu, 13 Jul 2017 07:19:38 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 5sm3714127wrq.60.2017.07.13.07.19.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 07:19:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 3ECB83E08FA; Thu, 13 Jul 2017 15:19:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 13 Jul 2017 15:19:27 +0100 Message-Id: <20170713141928.25419-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170713141928.25419-1-alex.bennee@linaro.org> References: <20170713141928.25419-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: 74.125.82.42 Subject: [Qemu-devel] [PATCH v4 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: qemu-arm@nongnu.org, =?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 Reviewed-by: Richard Henderson --- target/arm/translate-a64.c | 2 +- target/arm/translate.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.13.0 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 493a7b424a..d8892d9ba5 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8168,7 +8168,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; @@ -10561,7 +10561,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;