From patchwork Fri Aug 10 21:03:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 956477 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 41nHrF30LKz9s2P for ; Sat, 11 Aug 2018 07:12:11 +1000 (AEST) Received: from localhost ([::1]:58016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foEhc-0007cu-IE for incoming@patchwork.ozlabs.org; Fri, 10 Aug 2018 17:12:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foEhG-0007co-Fq for qemu-devel@nongnu.org; Fri, 10 Aug 2018 17:11:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foEhB-0002Is-GF for qemu-devel@nongnu.org; Fri, 10 Aug 2018 17:11:46 -0400 Received: from indium.canonical.com ([91.189.90.7]:38092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foEhB-0002EH-95 for qemu-devel@nongnu.org; Fri, 10 Aug 2018 17:11:41 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1foEh9-00071M-EB for ; Fri, 10 Aug 2018 21:11:39 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 08AFD2E853B for ; Fri, 10 Aug 2018 21:11:35 +0000 (UTC) MIME-Version: 1.0 Date: Fri, 10 Aug 2018 21:03:15 -0000 From: Laurent Vivier To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: ajbennee glaubitz laurent-vivier X-Launchpad-Bug-Reporter: John Paul Adrian Glaubitz (glaubitz) X-Launchpad-Bug-Modifier: Laurent Vivier (laurent-vivier) References: <152518111080.22177.382728353135880212.malonedeb@soybean.canonical.com> Message-Id: <153393499510.28594.9855360846904633490.malone@chaenomeles.canonical.com> X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="18747"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: b4195f1081389274e60f1a7de95cbe8d3ce6ecca X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 91.189.90.7 Subject: [Qemu-devel] [Bug 1768246] Re: cpu-exec.c:648: cpu_loop_exec_tb: Assertion `use_icount' failed. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1768246 <1768246@bugs.launchpad.net> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This change seems to fix the problem: diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 1b9a201d6d..5010b0d349 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -253,7 +253,6 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) tcg_gen_lookup_and_goto_ptr(); } } - ctx->base.is_jmp = DISAS_NORETURN; } static void gen_jump(DisasContext * ctx) @@ -324,7 +323,6 @@ static void gen_delayed_conditional_jump(DisasContext * ctx) gen_jump(ctx); gen_set_label(l1); - ctx->base.is_jmp = DISAS_NEXT; return; } @@ -1877,6 +1875,7 @@ static void decode_opc(DisasContext * ctx) ctx->envflags &= ~GUSA_MASK; tcg_gen_movi_i32(cpu_flags, ctx->envflags); + ctx->base.is_jmp = DISAS_NORETURN; if (old_flags & DELAY_SLOT_CONDITIONAL) { gen_delayed_conditional_jump(ctx); } else {