Received: from eggs.gnu.org ([2001:4830:134:3::10]:38909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frW1P-0001y7-PP for qemu-devel@nongnu.org; Sun, 19 Aug 2018 18:18:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frW1M-00039J-3C for qemu-devel@nongnu.org; Sun, 19 Aug 2018 18:18:07 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:55421) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frW1L-00038m-R2 for qemu-devel@nongnu.org; Sun, 19 Aug 2018 18:18:04 -0400 From: Laurent Vivier Date: Mon, 20 Aug 2018 00:17:04 +0200 Message-Id: <20180819221707.20693-4-laurent@vivier.eu> In-Reply-To: <20180819221707.20693-1-laurent@vivier.eu> References: <20180819221707.20693-1-laurent@vivier.eu> Subject: [Qemu-devel] [PULL 3/6] sh4: fix use_icount with linux-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite , Riku Voipio , Laurent Vivier , Richard Henderson , Paolo Bonzini , Aurelien Jarno This fixes java in a linux-user chroot: $ java --version qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion `use_icount' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped) In gen_conditional_jump() in the GUSA_EXCLUSIVE part, we must reset base.is_jmp to DISAS_NEXT after the gen_goto_tb() as it is done in gen_delayed_conditional_jump() after the gen_jump(). Bug: https://bugs.launchpad.net/qemu/+bug/1768246 Fixes: 4834871bc95b67343248100e2a75ae0d287bc08b ("target/sh4: Convert to DisasJumpType") Reported-by: John Paul Adrian Glaubitz Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Aurelien Jarno Message-Id: <20180811082328.11268-1-laurent@vivier.eu> --- target/sh4/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 1b9a201d6d..ab254b0e8d 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -293,6 +293,7 @@ static void gen_conditional_jump(DisasContext *ctx, target_ulong dest, disallow it in use_goto_tb, but it handles exit + singlestep. */ gen_goto_tb(ctx, 0, dest); gen_set_label(l1); + ctx->base.is_jmp = DISAS_NEXT; return; } -- 2.17.1