From mboxrd@z Thu Jan 1 00:00:00 1970 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Thu, 13 Jul 2017 15:19:27 +0100 Message-Id: <20170713141928.25419-6-alex.bennee@linaro.org> In-Reply-To: <20170713141928.25419-1-alex.bennee@linaro.org> References: <20170713141928.25419-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v4 5/6] target/arm: use gen_goto_tb for ISB handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= 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(-) 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; -- 2.13.0