From patchwork Sat Aug 11 08:23:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 956529 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 41nZm41W08z9s82 for ; Sat, 11 Aug 2018 18:24:34 +1000 (AEST) Received: from localhost ([::1]:59256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foPCI-0001oR-BS for incoming@patchwork.ozlabs.org; Sat, 11 Aug 2018 04:24:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foPBo-0001nI-8m for qemu-devel@nongnu.org; Sat, 11 Aug 2018 04:24:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foPBl-0004SB-2q for qemu-devel@nongnu.org; Sat, 11 Aug 2018 04:24:00 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:37337) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foPBk-0004Rd-Oo for qemu-devel@nongnu.org; Sat, 11 Aug 2018 04:23:56 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MVqHM-1fQHhZ1DDc-00X4cC; Sat, 11 Aug 2018 10:23:37 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Sat, 11 Aug 2018 10:23:28 +0200 Message-Id: <20180811082328.11268-1-laurent@vivier.eu> X-Mailer: git-send-email 2.17.1 X-Provags-ID: V03:K1:kc5C/ydg+GTqy+VCCt7o0/8IXr9bZAgr32wHSLMGLtGRKxigP5+ t4QvA5R2s8kfOSRTBGIJp29tL0sXF25MKEobpkMYnqKwXsV6t65h6L/q2tV1D9brjyGGQdq Wm9Kqp3dR13dgvC7+d6Rt8Suv65MI153wrKVaM0+itt61Wo3TpBbx95vsJ2UzeMZ73oCEa8 gvL2TCi9d6PmZPhTWVflA== X-UI-Out-Filterresults: notjunk:1; V01:K0:p37yg6WexVg=:vugMMIzrCEYkRc+ZLJpS4O D+q3eAfIHmXs6YiTiJZb1Cd0WEMb6fUmlau/dUtNgQwyGjPAgwgud/SPnZDXLz25FEQlYd4Zr 7nQW5OBzH2QLClsrcb9JPg+NsQfL+yQObn7AkryQN4Ud7PodgWQ1+anm8KkKL7/jfL32Z3g4f 2OKVlbxTvTsYNmpBfM/CP9SAtOITRe3e+bOPBbqS/FGoS+GGdmaxUSLsS5/v7YEM+krGPmOb0 aeU+ExbysoY2NI0eKpuNbWMY2IFQR5fo0lVZf0xgY/JDmMCQ+2sQnAq5a8KakBpXn6rs+S0C7 zcZBqfq2BfDAw+ihXzvURb5xMlq6mLiBAHnEY7tD5nB/5Kl5PQEUMfw6wamkKV//KqTcJdVWP 0HJbhHynm2chmKKJqfVMI2xYfSH1d5foENPqt3rEuNSOIzQL9R4EpO/sYYNxDGX1YAqHEDABZ hkIA6oS/007tLuVuM2soo/KW33jzoMW/yzIB90adf8RMv6k99SiK0ph2WurqZbOLNhVbFEZYE k3uQpZOsfAyW5L/azRqTamGkg1YS706ynVpnwrslLZi8GNLhskLA4//2D6x+7zOyOj9P3cR/v gkQd70TTI8Gx69Co3VzadsVQuHcXxZCz0S/Co/Tb6ccht61FvJTAOfNU4UI8cgzGbNmw0dAS6 Z6/NhmD7enbe9PBPi6jeI/rZ1zhveiq7Vu4NUwDFyuS64FCVsmJcDmTALMBiXpoyAq7c= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.131 Subject: [Qemu-devel] [PATCH v2] 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: John Paul Adrian Glaubitz , Laurent Vivier , 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 --- Notes: v2: don't revert the part of the original patch, but fixes the state problem in gen_conditional_jump() 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; }