Blame 0048-target-xtensa-don-t-emit-extra-tcg_gen_goto_tb.patch

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