From patchwork Mon Aug 20 20:26:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 959977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vQk02tj4z9ryn for ; Tue, 21 Aug 2018 06:43:04 +1000 (AEST) Received: from localhost ([::1]:49224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frr0w-00011n-3L for incoming@patchwork.ozlabs.org; Mon, 20 Aug 2018 16:43:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frqlm-0003Hv-5A for qemu-devel@nongnu.org; Mon, 20 Aug 2018 16:27:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frqlb-0003r6-Jf for qemu-devel@nongnu.org; Mon, 20 Aug 2018 16:27:18 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:38036) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frqlU-0003Pt-AA for qemu-devel@nongnu.org; Mon, 20 Aug 2018 16:27:07 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MFljh-1ffSgE2Xyv-00Ee8a; Mon, 20 Aug 2018 22:26:15 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 20 Aug 2018 22:26:00 +0200 Message-Id: <20180820202604.14218-4-laurent@vivier.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180820202604.14218-1-laurent@vivier.eu> References: <20180820202604.14218-1-laurent@vivier.eu> X-Provags-ID: V03:K1:IIvpkNfHeQzmbn6obzYrLcveVxuJ943A3sA5iNNb/vMZEWXyEbU C4x8CKsxCJteWQac3njaPi1gGJoaWweN0Ygw3qyfagRHP94Lka3mcGX1SdnfgvBVrOm2V+6 TPKcoAlMn5hvM9thtrQjdxm0sRRHk8xtxphAw9HmC+8WEha1z4bKwdOnIgCUfuCHRM0I+RA zp5oGco5KwRmME4iCDiOQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:qChEMLJ0Tco=:rTdTgji28PvnotyVEPogHQ /WETwrPwz+qilrbr1yGVVzxiq4OkGgvR9S7HSENQqzzM7jxdPSW7A/EeYvmA5Bn+r8ufo6mPE LPNM+Z/f8bONBFQWmPsXD+kHrAE7Tp+WAU42Chi3LruEAgkpdyn9Z9rgV/Q6tJlsokQx3O6UD S/0I330G6Jp6X6dsC1nEmUtaf8CgAfmfBI7PCvvVpFMd9hD8IoWzzPlyZU+Y6JoC06WwdmlJf PubOUs8s/rKlnE3/ZXM88HfB78hqh4Kp9qnFt+X/c08ah2x0a5HIrfCDptAQK+lraAvPwwWVB Jz/ZuJspT2kWAp4/BRyv6H2WA0z5qoYIaDT+IQkxe75b3yAKU4Ls33GdHKmjTgQoUoZobVj1K YuoXo78Q+n5Ip8wV7k1lrbH/R+4O8EJalj5Ks9MhuBno8+ioPy4SnjgfylUKsF+xxQIzRy+nN 2k2I9QNWtVPQl2m0U5SstmXF6EzPFsN4c5B5j64xApf9KkUfMybrSejNWfRMCpc3eYYVmZr+q s7NrG0+SNNzk0/Ms2QpM4CGtB93WB5cDai/XhWbIIOBcLmeYYV+SkSTHjHa5NhFHyOGuTT0uz KlRa3yMmitNLJGeQbDdDn9DLup99kSwSCuuoxi/UXoCQ5jPQPf9mU2CsHcrZTbj90faCjKnO0 f+7aQF36Al6pCKb1wD99zK89hXZNaB3p/naN672AQnPzqKgwGPty3a6YQNy4Uux46jYI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL 3/7] sh4: fix use_icount with linux-user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Crosthwaite , Riku Voipio , Laurent Vivier , Paolo Bonzini , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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; }