From patchwork Wed Jul 21 06:41:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483256 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5912339jao; Tue, 20 Jul 2021 23:58:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza7vgz/OqA1Bwipc9tHTXVUFTrZ5dGtqxS0PjOiQuzavHhVvkLkPsmzR2e10iV9QL/x6WB X-Received: by 2002:ae9:e8ce:: with SMTP id a197mr32808258qkg.175.1626850710493; Tue, 20 Jul 2021 23:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850710; cv=none; d=google.com; s=arc-20160816; b=nrXuYzF2l4nUteccFRrw86mWZmmMRLEPKwizLultoedzofI8k7MtkcIYzIUxA10U+2 QnhhIO0nqQGOgaJGZSbiz2kioYh9siIiMgMLyXs/kJAXNZuz/AiTtevOlSVoQqhb7nwN CjBn/3Ro9NoRUwT3O+UoSLJWrkO6CVpXt1lM6WGXp5zO5KQCwKLl2D71tYZp+qGXL/qR vzk4Y+SxCEtOIvPAaUWmvPXS8/jemhx8VwqVr0m0cXMkAoM6k7KGuq8KHP44vTfjEWxL /RwaDrL0KjuDH8oefNAYS2Ib7vqPxivt5XTG7HJwuusIiXE+qUYMcoNElCeS9YR3aJ0U Le9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZjR+I5E2mfbwjMd9wQ1dGRQB0TRr29G+cbMBcP2brug=; b=hyY5kKtOA3JlJkCH0umIOGcWS4/UXI3HFK8/S02xsTAD7X6AyyJUXPUBHIo2UubhK8 3+59xdddDqfCfdPXjLUyS0+L8H4Oc3PzbrMrqVXagPydPkyo+MGTrjS03M1XRc2TqS8d V+R9KRLI9krzQuvInfaeUBOeM5/eJ9ih1R0+l/xCRYUFmPvzPkeUX+p5prGMJaO+L8OV Idglh/OryIaln9nJ7Qd2PVf5UxWQraQV/6vJdprCxZYaxUjXel2xl8U6iSYpAccG99W6 oEhlfvx72QNk7hAdXcKhCSCaQgS2SsO28nUiASNzfscaJsfNpd94/FUOPEV+IXXBvopV HSmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YaRsGTyl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z13si7209798qtv.34.2021.07.20.23.58.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:58:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YaRsGTyl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66BZ-0006nR-Ug for patch@linaro.org; Wed, 21 Jul 2021 02:58:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vz-0005DX-70 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:23 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:35832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vw-0005hP-8L for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:22 -0400 Received: by mail-pj1-x1032.google.com with SMTP id gp5-20020a17090adf05b0290175c085e7a5so3452127pjb.0 for ; Tue, 20 Jul 2021 23:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZjR+I5E2mfbwjMd9wQ1dGRQB0TRr29G+cbMBcP2brug=; b=YaRsGTylcyAtcJL8SFLipifeGMKUCxhNmRL3+TeLDl4RlZdNunUida6vM4qZ6OCITG 5hxV5vgStfkvlKnZPG1wtqvtuUkhEdOsG7KHjitCruDxpV/7o5xudehEC6aOqw2fwBud PvjmD3D6vfYtmNCPHOXm93M+Zq6uPuugTPppuasEkvSvOy2gm0Us8D5DrLf3sRY/Ecr3 pSgPpWXSlIYLUX8l7CHMblW3O/raLQHm8ALpSasMy0qoONpWJk7C6qbFsJTJpSn4H8zW sNUDLyM29VMY8zefG6IA274XH4fRyk28mafL6E3xDahrt8sYAlk5sk1aTYs+zK78ccKH UKig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZjR+I5E2mfbwjMd9wQ1dGRQB0TRr29G+cbMBcP2brug=; b=C1Xw4/KmtZxOTMhEAAy8JRVb4imfYByS45u9cFAX1vK4RBh2j9VSGn3PReLVvbap15 pGs12cGA0mi2nKs0Y7ORWO/MQErGIsdYQEdn2F7o2y1w6H4556zFs3PNIDBCGtfA2tb0 34b7bfMc8Uub6wMTjM9uy3GPhmlhpJPO50+j3QBIQ87cToxxvmOUVVawBexIpe3kTYx2 HMSbXb5mqAIZcPey9RxOg1/Yu4NCeUTjOO3L2UMMGYrPPt48fyP9DHSS3BBo1bDbDUI0 w/HldCVUqSLIRAG57lhzygX3h2JyEvy3G8OPKnINKhmWOWWWUdOqXm+sXjUCc5IfpO9g c/cQ== X-Gm-Message-State: AOAM5335xHIKLC56W4LEVanp4Wz+3jLJfBkg5ee+O7Pacy1Y1ybnhebb KA++ljNylBiWrBnlW0M/4bV4QT7USAkf7Q== X-Received: by 2002:a17:90a:fb93:: with SMTP id cp19mr33210543pjb.30.1626849739042; Tue, 20 Jul 2021 23:42:19 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 21/23] target/sh4: Drop check for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:53 -1000 Message-Id: <20210721064155.645508-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/sh4/helper.h | 1 - target/sh4/op_helper.c | 5 ----- target/sh4/translate.c | 14 +++----------- 3 files changed, 3 insertions(+), 17 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/sh4/helper.h b/target/sh4/helper.h index 1e768fcbc7..8d792f6b55 100644 --- a/target/sh4/helper.h +++ b/target/sh4/helper.h @@ -3,7 +3,6 @@ DEF_HELPER_1(raise_illegal_instruction, noreturn, env) DEF_HELPER_1(raise_slot_illegal_instruction, noreturn, env) DEF_HELPER_1(raise_fpu_disable, noreturn, env) DEF_HELPER_1(raise_slot_fpu_disable, noreturn, env) -DEF_HELPER_1(debug, noreturn, env) DEF_HELPER_1(sleep, noreturn, env) DEF_HELPER_2(trapa, noreturn, env, i32) DEF_HELPER_1(exclusive, noreturn, env) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index c0cbb95382..c996dce7df 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -81,11 +81,6 @@ void helper_raise_slot_fpu_disable(CPUSH4State *env) raise_exception(env, 0x820, 0); } -void helper_debug(CPUSH4State *env) -{ - raise_exception(env, EXCP_DEBUG, 0); -} - void helper_sleep(CPUSH4State *env) { CPUState *cs = env_cpu(env); diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 8704fea1ca..3ce35b9e4c 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -240,9 +240,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) tcg_gen_exit_tb(ctx->base.tb, n); } else { tcg_gen_movi_i32(cpu_pc, dest); - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else if (use_exit_tb(ctx)) { + if (use_exit_tb(ctx)) { tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); @@ -258,9 +256,7 @@ static void gen_jump(DisasContext * ctx) delayed jump as immediate jump are conditinal jumps */ tcg_gen_mov_i32(cpu_pc, cpu_delayed_pc); tcg_gen_discard_i32(cpu_delayed_pc); - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else if (use_exit_tb(ctx)) { + if (use_exit_tb(ctx)) { tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); @@ -2324,11 +2320,7 @@ static void sh4_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) switch (ctx->base.is_jmp) { case DISAS_STOP: gen_save_cpu_state(ctx, true); - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); break; case DISAS_NEXT: case DISAS_TOO_MANY: