From 65356210a8a40cc3c44170e85bb684ccee2008e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Sat, 3 Mar 2018 22:42:15 -0500 Subject: [PATCH] target/arm: use gen_goto_tb for ISB handling 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. Backports commit 0b609cc128ba5ef16cc841bcade898d1898f1dc3 from qemu --- qemu/target/arm/translate-a64.c | 2 +- qemu/target/arm/translate.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu/target/arm/translate-a64.c b/qemu/target/arm/translate-a64.c index a998f21a..c180f799 100644 --- a/qemu/target/arm/translate-a64.c +++ b/qemu/target/arm/translate-a64.c @@ -1435,7 +1435,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/qemu/target/arm/translate.c b/qemu/target/arm/translate.c index e2d6ec9d..5e0f2740 100644 --- a/qemu/target/arm/translate.c +++ b/qemu/target/arm/translate.c @@ -8336,7 +8336,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) // qq * 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; @@ -10731,7 +10731,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;