From patchwork Wed May 26 19:57:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1484259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fr1x15ksBz9sRK for ; Thu, 27 May 2021 05:59:01 +1000 (AEST) Received: from localhost ([::1]:46222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llzg8-0004LH-0H for incoming@patchwork.ozlabs.org; Wed, 26 May 2021 15:58:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llzf5-0004Hf-4z for qemu-devel@nongnu.org; Wed, 26 May 2021 15:57:51 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:43619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llzf2-0006YO-Nr for qemu-devel@nongnu.org; Wed, 26 May 2021 15:57:50 -0400 Received: from quad ([82.142.6.50]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MirX2-1lFypC2gvk-00ew7a; Wed, 26 May 2021 21:57:46 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 2/4] target/m68k: call gen_raise_exception() directly if single-stepping in gen_jmp_tb() Date: Wed, 26 May 2021 21:57:42 +0200 Message-Id: <20210526195744.227346-3-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526195744.227346-1-laurent@vivier.eu> References: <20210526195744.227346-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:ce0uu3ip48g5g++iuQO9lvrI2s5usCEKvIvvKINYXiSAH8B1jEl 2j5xd7ln0qSM8L3wUPEsSlGRlrtP+65ya4hsm2b/8yBWIbUX/Qnv9OTVP0fLXJx5iPDQuba Ld3YmjIx6uWx5wcbs3LALrpZWqdYrQH+t6UZiGFcdY4e/7tbbasbBNXAR56HG2hbRpVTj2r 1dV/j5BfPo10OmXnkFO2Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:VM7QzHX22OU=:A5vRlDd5XbNFwaVQkyxEwr 3miXnVRHZ/wqYHc3v1w/SiI4j42IPnWPccm1/z3n54gmp99oIc52+SXnR7cmUnklbz96Jpj1a m3a9SsD1EF8fqsvymqWsGCxjxSB4uLAeXI3lbJtEZn92KeJoBzPT1yXzjEOUYlleg6/ytEvpM iwpFiCkvGMLTf8+ln4rOMH6TOzTl1EUnMV7h3CkhHN4l0hw0JrIIhTIDIvHMFGUXyGv+oQ68p 4OV12qthwhY/hJfiO/xCb8eGQXxsONXiTjwEGPpzXtPSPKcNYYyxJqfeAkLgv4M+znKG4Uwb1 3iIUr3Ti+kX7N5BEO/TUqjSyvc/qxvUklaCY+lYeOKZqPIjCqnxXzksHEDjOr67wtudqlGYTY 4E7iADGbVuO4ZL3qvHdR62347RB9smpEGkWFoZkvdJHjRUER/SjE9lh0/GhnCXAMbOdZ1mC4E hpm6o3V99DFuBJbRYd8/fLXTcPNEWEopLjtBlSauEXCgq/VV0fwzF86SOTIqA77Am+cEyaW1n Hc5lphirc87T1d+lDQXxZ0= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland In order to consolidate the single-step exception handling into a single helper, change gen_jmp_tb() so that it calls gen_raise_exception() directly instead of gen_exception(). This ensures that all single-step exceptions are now handled directly by gen_raise_exception(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Message-Id: <20210519142917.16693-3-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index c774f2e8f0fc..f14ecab5a502 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -1518,7 +1518,9 @@ static inline bool use_goto_tb(DisasContext *s, uint32_t dest) static void gen_jmp_tb(DisasContext *s, int n, uint32_t dest) { if (unlikely(is_singlestepping(s))) { - gen_exception(s, dest, EXCP_DEBUG); + update_cc_op(s); + tcg_gen_movi_i32(QREG_PC, dest); + gen_raise_exception(EXCP_DEBUG); } else if (use_goto_tb(s, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(QREG_PC, dest);