qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [PATCH v4 5/6] target/arm: use gen_goto_tb for ISB handling
Date: Thu, 13 Jul 2017 15:19:27 +0100	[thread overview]
Message-ID: <20170713141928.25419-6-alex.bennee@linaro.org> (raw)
In-Reply-To: <20170713141928.25419-1-alex.bennee@linaro.org>

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 <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
---
 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

  parent reply	other threads:[~2017-07-13 14:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 14:19 [Qemu-devel] [PATCH v4 0/6] arm: fixes for eret, isb and DISAS_UPDATE handling Alex Bennée
2017-07-13 14:19 ` [Qemu-devel] [PATCH v4 1/6] include/exec/exec-all: document common exit conditions Alex Bennée
2017-07-13 14:19 ` [Qemu-devel] [PATCH v4 2/6] target/arm/translate: make DISAS_UPDATE match declared semantics Alex Bennée
2017-07-13 14:19 ` [Qemu-devel] [PATCH v4 3/6] target/arm/translate.h: expand comment on DISAS_EXIT Alex Bennée
2017-07-13 14:19 ` [Qemu-devel] [PATCH v4 4/6] target/arm/translate: ensure gen_goto_tb sets exit flags Alex Bennée
2017-07-13 14:19 ` Alex Bennée [this message]
2017-07-14 12:49   ` [Qemu-devel] [PATCH v4 5/6] target/arm: use gen_goto_tb for ISB handling Peter Maydell
2017-07-14 14:12     ` Alex Bennée
2017-07-14 14:20       ` Peter Maydell
2017-07-13 14:19 ` [Qemu-devel] [PATCH v4 6/6] target/arm: use DISAS_EXIT for eret handling Alex Bennée
2017-07-14 14:23 ` [Qemu-devel] [PATCH v4 0/6] arm: fixes for eret, isb and DISAS_UPDATE handling Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170713141928.25419-6-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).