Commit 5b38d026 authored by Laurent Vivier's avatar Laurent Vivier
Browse files

sh4: fix use_icount with linux-user

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: 4834871b
       ("target/sh4: Convert to DisasJumpType")
Reported-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: default avatarAurelien Jarno <aurelien@aurel32.net>
Message-Id: <20180811082328.11268-1-laurent@vivier.eu>
parent 3e23de15
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
    }