5544c1b
From ba9c2acb955f0453ae80077a791a4d1c27b5d6e6 Mon Sep 17 00:00:00 2001
5544c1b
From: Max Filippov <jcmvbkbc@gmail.com>
5544c1b
Date: Fri, 21 Sep 2012 02:59:50 +0400
5544c1b
Subject: [PATCH] target-xtensa: don't emit extra tcg_gen_goto_tb
5544c1b
5544c1b
Unconditional gen_check_loop_end at the end of disas_xtensa_insn
5544c1b
can emit tcg_gen_goto_tb with slot id already used in the TB (e.g. when
5544c1b
TB ends at LEND with a branch).
5544c1b
5544c1b
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
5544c1b
Cc: qemu-stable <qemu-stable@nongnu.org>
5544c1b
Signed-off-by: malc <av1474@comtv.ru>
5544c1b
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1b
---
5544c1b
 target-xtensa/translate.c | 4 +++-
5544c1b
 1 file changed, 3 insertions(+), 1 deletion(-)
5544c1b
5544c1b
diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
5544c1b
index 7a1c528..b6643eb 100644
5544c1b
--- a/target-xtensa/translate.c
5544c1b
+++ b/target-xtensa/translate.c
5544c1b
@@ -2520,7 +2520,9 @@ static void disas_xtensa_insn(DisasContext *dc)
5544c1b
         break;
5544c1b
     }
5544c1b
 
5544c1b
-    gen_check_loop_end(dc, 0);
5544c1b
+    if (dc->is_jmp == DISAS_NEXT) {
5544c1b
+        gen_check_loop_end(dc, 0);
5544c1b
+    }
5544c1b
     dc->pc = dc->next_pc;
5544c1b
 
5544c1b
     return;