From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634055834; cv=none; d=zohomail.com; s=zohoarc; b=OBQbuiOA+ZycT7fpE1Q/c2zZ2hvvPOzNLDUiTl11ALHDXxaECplRnFmqrqBKDgY0p9KGPj0oZK7pOj0JDIXzhWTBdfT/coKBWUtuFe4f0Fpqrv3LOsLCsd9yFp7C6UukvK4wPMAJZR0SiCbW1gvF36I3M1mjHzA8HUA+BHg/Rag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634055834; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q7mA/5NMDye+T6oTs6PprYj8IGolC1UqhFN/enpkEuI=; b=R8HHp2en1oh1IrpQCRuLXmWhE25r9BGgpoSTa9/uHOuPoWaALlpj+942K1vTyKg0M6Ixa4JLhkPybqAB/uGBG3MMriOZ3NmEhVs95N4ju1lAWuNi/pNInOBxedlNi6M4de/isxfgEoKkDiz5CmJTgtWj+Km3OFOLdjXjt7HwlvI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634055834802534.8514258542546; Tue, 12 Oct 2021 09:23:54 -0700 (PDT) Received: from localhost ([::1]:50382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKZF-0000GA-PB for importer@patchew.org; Tue, 12 Oct 2021 12:23:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXV-0005yS-1s for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:05 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:36440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXT-00040F-HO for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:04 -0400 Received: by mail-pg1-x52d.google.com with SMTP id 75so14322859pga.3 for ; Tue, 12 Oct 2021 09:22:02 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:01 -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=q7mA/5NMDye+T6oTs6PprYj8IGolC1UqhFN/enpkEuI=; b=U5AyijA/9NbFRVVwElD8cbfOHT12WJP9PBO6WI7JHzKeDxpOIrnxs2vdUDjx5xsgAD 7cNW9maV+P05LhQNHjYcyXMq2kbySU/lG8dV8b2Y/BsmHg2ONzmnBB6oYowxOa2qI7TA 0XpyzZu/kpO6uL31OmZ68Z5VtIS5Du+UPXW2eQMbYCPBQeMl8h6NnUVt+pDFsPYLLMmm x++IfzYZ3JnXDJ42VzH94Qe9WxErBSu4ahimN6rVa3NDKk+3Aay2qbRAvTbt/KnE68Jx ZHDgst+7BYMY1dErpRNbgcNk5n7ysHRtQ/wNyCbzogaq2UHQIyFkQnYuA4WyjMpjbknd kYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q7mA/5NMDye+T6oTs6PprYj8IGolC1UqhFN/enpkEuI=; b=0Pqf7eJAXmz/yvrmB/Z4Bb86Kje5l8b7A+PLVrh28QRQopE5rnDLGN0iBfI9qn7KkK dQ6f0lE8CnAaW8lHaf9p6tqNnyjSGKQvRaacXP8h7lQmQ/MRPC10tVcrlgV492ppSFZ3 9ALuZU8esQW084UO3BZeZobW1fMhNACSr5pzNLQV9WEu3Lgzvf8YITw/KnA0mvoTXth6 oIAgvcMMbD2zTxtEVdcF3JaNxfppf6rlGuKRIvg9hPRYPY4ErIsNkmqyYncXf0Sma6VG ean5UnwLSH36IvRkmAi36bBO0q3QpePj0knostedIwa8QP1YCrRtDbPGIxJx4LIR4OdS 6zxA== X-Gm-Message-State: AOAM531XibTJjtb2MhpxD+tWODRrLXXZmqDVe7bNRm/mT+XD/cQWy4zL Shqt2BZ8eVPIXRid2am0AslwOEO0G53IJg== X-Google-Smtp-Source: ABdhPJzypAPO37esvoOnrNiKIBmTyETrAdhwZhI16OVQRFv1IKEo6FNSazL3Ni7sfZgMJLw/DDysVQ== X-Received: by 2002:a63:3388:: with SMTP id z130mr7053313pgz.476.1634055721857; Tue, 12 Oct 2021 09:22:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 01/23] accel/tcg: Handle gdb singlestep in cpu_tb_exec Date: Tue, 12 Oct 2021 09:21:37 -0700 Message-Id: <20211012162159.471406-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634055837050100001 Content-Type: text/plain; charset="utf-8" Currently the change in cpu_tb_exec is masked by the debug exception being raised by the translators. But this allows us to remove that code. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5fd1ed3422..c9764c1325 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -383,6 +383,17 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int = *tb_exit) cc->set_pc(cpu, last_tb->pc); } } + + /* + * If gdb single-step, and we haven't raised another exception, + * raise a debug exception. Single-step with another exception + * is handled in cpu_handle_exception. + */ + if (unlikely(cpu->singlestep_enabled) && cpu->exception_index =3D=3D -= 1) { + cpu->exception_index =3D EXCP_DEBUG; + cpu_loop_exit(cpu); + } + return last_tb; } =20 --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056034; cv=none; d=zohomail.com; s=zohoarc; b=BSdkGJsr7gVZ3zIyw5cDBDwqdo7ZA/ReU2F3R1wn/QsvF0DeclRg9Aoou24CbFnGOcFJVOhhi9XcW11wrXCLSqHKXWxbMmG7meOI3Rf4DCtA96ITH0ZARXs/2bjRpYvSY/086KqEpW1HAnnRkgdG2D8eL9OA/qkV2Nl8fIlUixM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056034; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1RbKRtJMoQOt2SK3hmeerAK4mlYzGNvBThJyzO1Pf1g=; b=Gn9w3ekzPT4Lp+QBPYgTcmrzI7QH19HstM/RYe7pNpKDEQNbqLwSN85dk0InbOW3PJL8eUlc3VF22JWLvz1jC3ezsvdMUwd5PGcsYtYwgs/kjGcZcOgzOocWzViGkwC0lTJzq//hhIb7nlSZXpeUWQZDEhyp5w5KRMujmbZC8hw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056034507703.5408708134764; Tue, 12 Oct 2021 09:27:14 -0700 (PDT) Received: from localhost ([::1]:59046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKcT-000643-Hp for importer@patchew.org; Tue, 12 Oct 2021 12:27:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXW-0005yn-0r for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:06 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:42736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXU-00040N-1g for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:05 -0400 Received: by mail-pl1-x632.google.com with SMTP id l6so13840587plh.9 for ; Tue, 12 Oct 2021 09:22:03 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:02 -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=1RbKRtJMoQOt2SK3hmeerAK4mlYzGNvBThJyzO1Pf1g=; b=wcFrW+vlTC3PDM4vzjAhMReTTBrgN0N0Mw265oX02A3e7pQbNwO+k93wiSyLv8nRpC GzqyACnhISQYgcCMJYjGFuq6ljocEj+Kwx0dqqjRVXSBcV70zp1HGlWHKOboc+QvpFnM LpmBGhVScCLI88h9KrK6uK/FCFkdAfTg//Ll+SE2U/w20ukAGQXgRWW8XMzuYnl41tXS 9pOK8KndHhbKn9J+ZU79Wx6i6yCymSLuUK7PGuKUrWKMu/J4BA2by4x6MzTcf8f3wDmx Pw6s44kmXhQ3qI1lPSqNw57SBr5T7sG5rZAAkK4VZtGUg7Uy0daIe5kbHwVHj66eYBKs /zaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1RbKRtJMoQOt2SK3hmeerAK4mlYzGNvBThJyzO1Pf1g=; b=LgIYhr5DWeBkdFxHyBy+OfLzlLkZPvtZY9HfWBXbWJJDMsYrkEURgBwt5xLD5n9UHm lUss+QP+GMYdAKYHeNn4NQkzWmRfM2WbI/bcG0NHvkCZlCyRaF1ZYjho8gMDjeSqLG1a BVn4OW8+XKmNs1CxJeSjOr4bCyqId+F7J48JhZ08wNB99lwZgLsU92S6GlQS18pkeeXw neaA727in7h2MQs0Hy0b2OFw9i/GZLEMJsdWO/pHHXB1MuTWe6QbLN9Y9dBQPmUZ/et3 W29RwK5Fn65Ge8BhJC3Ghfbxw58sAjnl6U4CiFvFJTpFSPF0tX8X/s9rh5bvC5OJvVUb HE8g== X-Gm-Message-State: AOAM531NXq3m87vsBuFo3Y4F1DHCC9ytv+V45AkOGLr5Y1G571rQz27j tYAnNVBmi++BekMueemJjh9bqDu80BX8Kg== X-Google-Smtp-Source: ABdhPJya3PbT+eIfjhZo5qI3e+c+ODbKxxdaUotdqw8MBcTuDZbk0bhMKtnK4g79uGn4F7/EeAcabw== X-Received: by 2002:a17:902:e8ce:b0:132:b140:9540 with SMTP id v14-20020a170902e8ce00b00132b1409540mr30962274plg.28.1634055722652; Tue, 12 Oct 2021 09:22:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 02/23] target/alpha: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:38 -0700 Message-Id: <20211012162159.471406-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056035846100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/alpha/translate.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index b034206688..8341cb8706 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -2998,17 +2998,10 @@ static void alpha_tr_tb_stop(DisasContextBase *dcba= se, CPUState *cpu) tcg_gen_movi_i64(cpu_pc, ctx->base.pc_next); /* FALLTHRU */ case DISAS_PC_UPDATED: - if (!ctx->base.singlestep_enabled) { - tcg_gen_lookup_and_goto_ptr(); - break; - } - /* FALLTHRU */ + tcg_gen_lookup_and_goto_ptr(); + break; case DISAS_PC_UPDATED_NOCHAIN: - if (ctx->base.singlestep_enabled) { - gen_excp_1(EXCP_DEBUG, 0); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); break; default: g_assert_not_reached(); --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634055837; cv=none; d=zohomail.com; s=zohoarc; b=Q8vsmT27aesJMdVAvAtc+JtgbsLS1bT7h95uE1MQU5cPjHddVLJaIWQ7gFbG33bHOtU5nGv6IJFnsCXTc5pspUXs3kko+Wlh3bSE3ynDhcy7wqB4hwZtLpzmvz/qonxP3aEcW0h4z3wRrCQhvNTQkDMFE80B0OpxcpLJHvq9y98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634055837; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=krNZ+k36Q7kVN35RCh7k4261FBntNustDkikqfFBngI=; b=KMtzWUjvunTS2UibrdAMZWnQs1tlCsix2+oYOyjBntHz929cUlmOShNCrO4F/dRoQPNRMBCIDJtLood0nPTfupq/d9cdvRa9zIoM7ZPCTqQqaDj8Qvst52WTrNqYDgVpNBZ2Wj5hhjCIs06AUYjmo6stC2sweKUOvVA1PXczSG4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634055837780345.5537766690127; Tue, 12 Oct 2021 09:23:57 -0700 (PDT) Received: from localhost ([::1]:50682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKZI-0000Rv-Pp for importer@patchew.org; Tue, 12 Oct 2021 12:23:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXW-000606-GZ for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:06 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:43647) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXU-000418-Tj for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:06 -0400 Received: by mail-pg1-x52c.google.com with SMTP id r2so14317846pgl.10 for ; Tue, 12 Oct 2021 09:22:04 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=krNZ+k36Q7kVN35RCh7k4261FBntNustDkikqfFBngI=; b=McshbjtBY9IGbVlSC3pO77/bHbXzdPkUeyc7qu4ETA1+Dp0H02kXIMOsB3UdDUCgFu 8T7Z19rGOlHhV9m94GPf3ZhLjRvI1t7A0yE6dEz+9WnEDSU4uQMS561cWkVMyeZ+BOi8 SHQVaoT6+qNCymU7HyLpJv/D1oBlG9PpWtdNVG6WnUSEgLwori/B54LU2IKIKAJbwlHy q5M/IrwwwNsnQdlQbUndr2MOy1ymPvRqPxaZ1hpWrHU9Bjw9Wf96iSOwMnqVWlipu+v+ zTfDNQUx31bkRP55xjn2tgEQJ0thUl9n2k89vUAGkkrDVty3pRgKlogzRsEEAYv3cb1b m2Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=krNZ+k36Q7kVN35RCh7k4261FBntNustDkikqfFBngI=; b=ZzRulj6GktSIEcp0sZrhiNBl5K0awMfiCCIUGSTbgcY4lMBWQ26OiXXxcmKg9e2ZVi psgKGOnYysc9hJ9HehTmrAoMK6Muugs7r/2qUkWoHSWUxNC7b+Fh1VjxUbM55Lyvm5uM QniQPF1YXEXILOQMlm0+C7DVgSKaL7l4Em+Nw026fP7Dyp/2pbizYEShLCr30kqdSRaW C/EKrGmVbhQwKw5pT+UFsdeEr3Le41yL/WZpkJ9xieGOCgFpqU639LD8IpKx+eXSeZVz TZuvS2HXToc1vm8LM+QcpJ34tz9i7FpbG7HnihiMv+X1rECmbRnDN3mKD1QGItd4QWqR Tjzw== X-Gm-Message-State: AOAM531IsX5L5qQsBGn5D31Ls/3Fv5GxiyuDLwjiwApE0OQYlhODTzA1 jDQQIAqjBziwFKutxNZc4thmksNGjvyzaQ== X-Google-Smtp-Source: ABdhPJzbbIzsMzp0CfPW40q2plM39t5OTXyWEJaCTl0STOC8pI2a0fxHM/gVFKrMp9cRrs/MQZYHMw== X-Received: by 2002:aa7:8298:0:b029:338:340:a085 with SMTP id s24-20020aa782980000b02903380340a085mr32895426pfm.46.1634055723546; Tue, 12 Oct 2021 09:22:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 03/23] target/avr: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:39 -0700 Message-Id: <20211012162159.471406-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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: , Cc: Michael Rolnik , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634055839027100005 GDB single-stepping is now handled generically. Tested-by: Michael Rolnik Reviewed-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/avr/translate.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 438e7b13c1..af8a3e0f9c 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -1087,11 +1087,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, ta= rget_ulong dest) tcg_gen_exit_tb(tb, n); } else { tcg_gen_movi_i32(cpu_pc, dest); - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); } ctx->base.is_jmp =3D DISAS_NORETURN; } @@ -3009,17 +3005,10 @@ static void avr_tr_tb_stop(DisasContextBase *dcbase= , CPUState *cs) tcg_gen_movi_tl(cpu_pc, ctx->npc); /* fall through */ case DISAS_LOOKUP: - if (!ctx->base.singlestep_enabled) { - tcg_gen_lookup_and_goto_ptr(); - break; - } - /* fall through */ + tcg_gen_lookup_and_goto_ptr(); + break; case DISAS_EXIT: - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); break; default: g_assert_not_reached(); --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634055838; cv=none; d=zohomail.com; s=zohoarc; b=M+mla+IKMilea/pOLVmnCrKdfavE4FaJ6xZljN/Ws4iDiWh5bWS+z5OZdWLnSHGg8OS79oayfIQsaA1a1GeopeH6G9wRfMF4paFJOoRDUN7muNNtbDrPcJOOipRUFfbW45VNrbhlzPcvvSWCEAoUetWRQC/9XPntn31fZ8DM34I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634055838; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=I0CzIZRWI2JoSPxoR4xs5SpApEcqlDWMcO9xYzu4ImA=; b=LlUyDSkIgGh279Z9OQUoVdq+Y42l4+oLGbhKS2O1z9qOVnDjyROhMpOMEXV3GTgNOLg685U65a9SuEyB0tjEnr0cgG9+n39MM8hb+x0L+99ww4oQiaWqcgy4NAII4+JYikRDovL6ByCYGwdjS1pYkBZauPobZNNX4sYqBijErCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634055838827704.1971311910755; Tue, 12 Oct 2021 09:23:58 -0700 (PDT) Received: from localhost ([::1]:50770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKZJ-0000VU-PG for importer@patchew.org; Tue, 12 Oct 2021 12:23:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXX-000622-6k for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:07 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:37553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXV-000421-I7 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:06 -0400 Received: by mail-pf1-x42c.google.com with SMTP id q19so7046pfl.4 for ; Tue, 12 Oct 2021 09:22:05 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:03 -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=I0CzIZRWI2JoSPxoR4xs5SpApEcqlDWMcO9xYzu4ImA=; b=mQJrLDzhp0gZbCexglYPxxeFkQ5aVC1sjae3pU8U6mVcqKtiqderx+PAPGHJaAXzeG 09tAHgycMXQhvKHKA6KRH8a2EG2EZr1miTa957J2gL6X5XVdXJUyF6ddnqOKT/8q2ZuJ 3fKQ6lcXg3PROtOR3/JMrpguM3wzQIYr3rANx28NFLgP4IvsL6I+X/bxzh5hoIlleVFW vLXA9ulcwHlNQjJEDsZ7C3BYf0r70PUGOzzpAjzWKemqGw+qq4VEH94SOejfAXkb/wB8 FecYD37txqawSPr180zmKLa3hWHeNjYFfEE1brmcsxl+P7iGwCFzofULE0Ph+WQWA5TD OSXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I0CzIZRWI2JoSPxoR4xs5SpApEcqlDWMcO9xYzu4ImA=; b=4zC7vNTnztyHSbHUzrHLK45xqeP9P+eBODyJQXpo2KywgSa8bhEIkSMs+8fPiELlC/ +cfz03BLJWXdzO3kbRxNaPni0q28jJZpDBO2MWyVkuM9cWWAe0UQJ7D+U2Bp1+G0YS5P HE5hWNbmLRI0ph1OA06JBlXRSKx7dIq2AM5qpL5dRZMDWreoKc884CJ860RToBKOEqGt VujEs6uV8DH8oMLIb4/l9q18RKQzFdDXQZLQS2GvLoE27Sx3LUDQYZ5tVOzlM6FkXfWu XAdH4zc5qf8NKic6FG3/zbD2/WorTAMC07M0BvgFd/reJVg7/zNKa6fV2TEpwTJv4V/O vbCQ== X-Gm-Message-State: AOAM5300KrAEmu0gf2vAU2m24fIJmDzYu9qB5M/NWrK137sSjUJ/j31e 3yOI6nlvY+oxMZNytJJa1cZ1hWTHrQ50Jg== X-Google-Smtp-Source: ABdhPJza6bjSCxCEGQJ9DRpTm8b0+ejOsDuqEezHq6yHoVy3ObBdX3rLSob7+YheYmlgUbSZrKD09Q== X-Received: by 2002:aa7:9517:0:b0:44c:7b4a:8073 with SMTP id b23-20020aa79517000000b0044c7b4a8073mr32584159pfp.24.1634055724147; Tue, 12 Oct 2021 09:22:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 04/23] target/cris: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:40 -0700 Message-Id: <20211012162159.471406-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056739859100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/cris/translate.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index a84b753349..59325b388a 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -3249,22 +3249,6 @@ static void cris_tr_tb_stop(DisasContextBase *dcbase= , CPUState *cpu) } } =20 - if (unlikely(dc->base.singlestep_enabled)) { - switch (is_jmp) { - case DISAS_TOO_MANY: - case DISAS_UPDATE_NEXT: - tcg_gen_movi_tl(env_pc, npc); - /* fall through */ - case DISAS_JUMP: - case DISAS_UPDATE: - t_gen_raise_exception(EXCP_DEBUG); - return; - default: - break; - } - g_assert_not_reached(); - } - switch (is_jmp) { case DISAS_TOO_MANY: gen_goto_tb(dc, 0, npc); --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056035; cv=none; d=zohomail.com; s=zohoarc; b=VGnrYIjG1OEtxCsGgwiKo5wyB99d4f5Xva3o8d4WSo4PSRfBmFYwAf1B9Zeza3ReSFj9e11OO9iwCXNDEG53vG0p9vxUj6o5cHmLVjnIWcYeAK1XUjiVKfWQ2zNTUVcb8VeW6SVn29cdDtxWrscFA/r4U+O1OX9keWN0BFbLsRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056035; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0oIDXf4AcZ4FiRCcBJuMG/3pVjCeVFNh0lkYAhoInys=; b=WxCmyfI61YFtVrRePtYu3DozinnJqbCjrrpOfFkRUa/T9xbpSdIHnmyFedhyprQg5BYimUREOWwKmvodzXUNYwlsb0I3zuJDqVEAPnbCQyTb5m0uTifOnR2sI1uHJP9f8YX1PoMvXribqZ1w2x5RhCwC/Z8+ZYe6cSzmGTg71U0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163405603552178.72613341335637; Tue, 12 Oct 2021 09:27:15 -0700 (PDT) Received: from localhost ([::1]:59184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKcU-00069I-Ez for importer@patchew.org; Tue, 12 Oct 2021 12:27:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXX-00063P-MT for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:07 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:41830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXW-00042T-3d for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:07 -0400 Received: by mail-pf1-x433.google.com with SMTP id y7so8458945pfg.8 for ; Tue, 12 Oct 2021 09:22:05 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:04 -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=0oIDXf4AcZ4FiRCcBJuMG/3pVjCeVFNh0lkYAhoInys=; b=gzXi/2lafNAwmoi57xY8GyMNDa6VAek8d1XdVMzuPXlJw9yNXy7PsHJs60jT8qVLoh LzECky88jIfgSg3lEv5K1Hm9TYpWMubo61PzxPa7en6hwRVy96Vapaa9ewkHb4rp1nDp yXgfSvrbWDaoJzt6FHrjU+jtGi84hxpgC2F6lde21EhcqsDLHobtVJR8T3lEngm5zGdU OrS2Dbmqyad5ka+vyq5HFJHVbBFcjw3xU1QuWugUwe/KR6YjPjDi0Lhf0c4CjsypjhWy nSANDKLqZ2BUMezcIcu+HoZv3eQ4FYer9EV6b++KbvLKAu1EBhjtV22J5CHBJddBVf+M iz3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0oIDXf4AcZ4FiRCcBJuMG/3pVjCeVFNh0lkYAhoInys=; b=YZigBZWqpCHly0sAqgGq3zAPSw8uYq/vjNVi3U3NTzpz+uRKZtTsg94al1KMMeQcE/ Jza/Fohv8hCio/Jk32NEaZymiMGvKd2ItxP7S43D0iue5iuL5R+7SLixzbWwT+cpA6or hXD26/xzxNooiW3Cqs3NefkqfGvy3yetbEkYi3GJvjnqJtxAj/yen9KDsD/5sO5vQHyS wm2nk7zI0ZM0D41EV1ncWoTuyap9xrKq8Xs0xJuMkQ60IsuPrg4joMfeGBssPfkL0uRr uiZ9oczblYFJhioLkayfhz1yHKeN4V77cH4KZbOn8auutHSad977163VMvAg58dXaOuc qnKg== X-Gm-Message-State: AOAM533YgdT5lgjUxOKAp3lLHq3CxyHwrKcuKrdy208vfFsTf9K3YIEF ULmpk5OwOcJOyJZJmZa7z0K4Z2J3JmWhfA== X-Google-Smtp-Source: ABdhPJwV7sZmrJNJxkIQTWsD0w7gKnhyX2EiDzYH3fOdfWHsCENr12YQzfgYhiBLmaLZEsoaf+ToyA== X-Received: by 2002:a63:b341:: with SMTP id x1mr23858247pgt.69.1634055724704; Tue, 12 Oct 2021 09:22:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 05/23] target/hexagon: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:41 -0700 Message-Id: <20211012162159.471406-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056035887100003 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hexagon/translate.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 4f05ce3388..159931e8ee 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -69,11 +69,7 @@ static void gen_end_tb(DisasContext *ctx) { gen_exec_counters(ctx); tcg_gen_mov_tl(hex_gpr[HEX_REG_PC], hex_next_PC); - if (ctx->base.singlestep_enabled) { - gen_exception_raw(EXCP_DEBUG); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); ctx->base.is_jmp =3D DISAS_NORETURN; } =20 @@ -614,11 +610,7 @@ static void hexagon_tr_tb_stop(DisasContextBase *dcbas= e, CPUState *cpu) case DISAS_TOO_MANY: gen_exec_counters(ctx); tcg_gen_movi_tl(hex_gpr[HEX_REG_PC], ctx->base.pc_next); - if (ctx->base.singlestep_enabled) { - gen_exception_raw(EXCP_DEBUG); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); break; case DISAS_NORETURN: break; --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056175; cv=none; d=zohomail.com; s=zohoarc; b=FdQIPSupoE1gkvXITx4JqSUEij38PUIbLeUV34+0Zd9f9kXp8jCJlJIeWfQ/ouyNyVbYTtRQaHBAO+n3EZAVkxh4q52KrJy8AMiIHB7mnZADMadHG6WzV3NFmWuWUWB4s0KVitnkP51L9emZ4DWtW3gfY6lMVc6ZUXISdIAcGDM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056175; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Iit+FHbqq4AHjQFze/NmYkeoKdz7m6lRYWz6z/sE/n0=; b=IHNA3nqmCbaYTI/jd6wpYKNjc3QYjCo5RCHboZf6lMlbDHZXJNuKYJOKUum2b+hERk+PXiiuPpYRRtejSuoBlH17vWHL1OtxxhwLQu/FSj3QTcWDoCrxMjXSxIzrOGYwsbQIWdhyb97Mi4x/NKcGi5p+oygPoGxZmFI5LrfQWec= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056175612119.9846731296235; Tue, 12 Oct 2021 09:29:35 -0700 (PDT) Received: from localhost ([::1]:39406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKek-0003Qd-EA for importer@patchew.org; Tue, 12 Oct 2021 12:29:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXY-00066j-Sp for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:08 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:40534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXW-00042f-Vk for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:08 -0400 Received: by mail-pg1-x52b.google.com with SMTP id q5so6290688pgr.7 for ; Tue, 12 Oct 2021 09:22:06 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:05 -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=Iit+FHbqq4AHjQFze/NmYkeoKdz7m6lRYWz6z/sE/n0=; b=DhlupXDN2xSNilR5gcAhfRGgFBLESY35GkMElpK8S42isI4L01IZkCpN20HtgL+Flb F4e0dZUWv0GL/c9qCaTgID102rMv4WD1LruvW2jdlWxH8guXFzGamppNe4Xvf2dQuuym 9NCVavmjDyHIviiisO/rGyamPbs/e+8GJKyUZSu/mLOh/CnTF4mw+qGoIm+bc9QARu8p pSe5YMXeGJKbw86bVOYvwPFKQltIZK7wBxcUazJD4TVD2H5W9h7BA2hBohPBqiCKOsbl sKHjYpzx/aVmYxMQsHBHd4Modb1t8AIGiNn89Bub57HaMpNcx+E7eVWD4faFJn4pzXyc ZQGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Iit+FHbqq4AHjQFze/NmYkeoKdz7m6lRYWz6z/sE/n0=; b=CpUU7bOOY4fR3Iy299SCg1o+e5JUq6hG5lLHeHBDGHXD67gUMHAib2viQXf+KyKFvV 00+Jgx+S+oVR89r2V0G3+j98csBbyAJMHtOQowZ1w5H9Z1Driu1ey9s888fSjsDWgXvw nMn0aaoSmsmuh9DuNiIwOt7E1RQXLfHkSAihW5Qn9PpITrvJSVjlAowRZ+6Wug1G5quy 8VCfwvSZBiCNvbNL0VJfQzH8QBSxH2s3UHfxw8TIRDOrsHXjpS0Tn3/D/NUgpefZGBxH psxFO0Sko0pTDa1Xy1VaWaSlG/od9JvLEbsAC+V2Pf82k4t4Hv2i43DieV2NJW5m9YqT OUOw== X-Gm-Message-State: AOAM530kAOs0vKo3/EWqC7dyYmnfknz116D4W4xmdyYlEJPVEOAlee+G tN2EbaqEKcjnSOoDRLGqumDyJzsqdmp5RA== X-Google-Smtp-Source: ABdhPJwQvmY06XTs6k4mqGzOfn8jN5boxUr9cSpoCiUNrCeWefLZNKzzNy79XsZ0Ne4ZN5M5bNbMiw== X-Received: by 2002:a63:374c:: with SMTP id g12mr23555270pgn.35.1634055725549; Tue, 12 Oct 2021 09:22:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 06/23] target/arm: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:42 -0700 Message-Id: <20211012162159.471406-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056177564100003 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 10 ++-------- target/arm/translate.c | 36 ++++++------------------------------ 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 717afd481c..cec672f229 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -404,8 +404,6 @@ static inline void gen_goto_tb(DisasContext *s, int n, = uint64_t dest) gen_a64_set_pc_im(dest); if (s->ss_active) { gen_step_complete_exception(s); - } else if (s->base.singlestep_enabled) { - gen_exception_internal(EXCP_DEBUG); } else { tcg_gen_lookup_and_goto_ptr(); s->base.is_jmp =3D DISAS_NORETURN; @@ -14879,7 +14877,7 @@ static void aarch64_tr_tb_stop(DisasContextBase *dc= base, CPUState *cpu) { DisasContext *dc =3D container_of(dcbase, DisasContext, base); =20 - if (unlikely(dc->base.singlestep_enabled || dc->ss_active)) { + if (unlikely(dc->ss_active)) { /* Note that this means single stepping WFI doesn't halt the CPU. * For conditional branch insns this is harmless unreachable code = as * gen_goto_tb() has already handled emitting the debug exception @@ -14891,11 +14889,7 @@ static void aarch64_tr_tb_stop(DisasContextBase *d= cbase, CPUState *cpu) /* fall through */ case DISAS_EXIT: case DISAS_JUMP: - if (dc->base.singlestep_enabled) { - gen_exception_internal(EXCP_DEBUG); - } else { - gen_step_complete_exception(dc); - } + gen_step_complete_exception(dc); break; case DISAS_NORETURN: break; diff --git a/target/arm/translate.c b/target/arm/translate.c index f7086c66a5..d6af5b1b03 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -341,7 +341,7 @@ static void gen_exception_internal(int excp) tcg_temp_free_i32(tcg_excp); } =20 -static void gen_step_complete_exception(DisasContext *s) +static void gen_singlestep_exception(DisasContext *s) { /* We just completed step of an insn. Move from Active-not-pending * to Active-pending, and then also take the swstep exception. @@ -357,30 +357,6 @@ static void gen_step_complete_exception(DisasContext *= s) s->base.is_jmp =3D DISAS_NORETURN; } =20 -static void gen_singlestep_exception(DisasContext *s) -{ - /* Generate the right kind of exception for singlestep, which is - * either the architectural singlestep or EXCP_DEBUG for QEMU's - * gdb singlestepping. - */ - if (s->ss_active) { - gen_step_complete_exception(s); - } else { - gen_exception_internal(EXCP_DEBUG); - } -} - -static inline bool is_singlestepping(DisasContext *s) -{ - /* Return true if we are singlestepping either because of - * architectural singlestep or QEMU gdbstub singlestep. This does - * not include the command line '-singlestep' mode which is rather - * misnamed as it only means "one instruction per TB" and doesn't - * affect the code we generate. - */ - return s->base.singlestep_enabled || s->ss_active; -} - void clear_eci_state(DisasContext *s) { /* @@ -837,7 +813,7 @@ static inline void gen_bx_excret_final_code(DisasContex= t *s) /* Is the new PC value in the magic range indicating exception return?= */ tcg_gen_brcondi_i32(TCG_COND_GEU, cpu_R[15], min_magic, excret_label); /* No: end the TB as we would for a DISAS_JMP */ - if (is_singlestepping(s)) { + if (s->ss_active) { gen_singlestep_exception(s); } else { tcg_gen_exit_tb(NULL, 0); @@ -2606,7 +2582,7 @@ static void gen_goto_tb(DisasContext *s, int n, targe= t_ulong dest) /* Jump, specifying which TB number to use if we gen_goto_tb() */ static inline void gen_jmp_tb(DisasContext *s, uint32_t dest, int tbno) { - if (unlikely(is_singlestepping(s))) { + if (unlikely(s->ss_active)) { /* An indirect jump so that we still trigger the debug exception. = */ gen_set_pc_im(s, dest); s->base.is_jmp =3D DISAS_JUMP; @@ -9459,7 +9435,7 @@ static void arm_tr_init_disas_context(DisasContextBas= e *dcbase, CPUState *cs) dc->page_start =3D dc->base.pc_first & TARGET_PAGE_MASK; =20 /* If architectural single step active, limit to 1. */ - if (is_singlestepping(dc)) { + if (dc->ss_active) { dc->base.max_insns =3D 1; } =20 @@ -9794,7 +9770,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, = CPUState *cpu) * insn codepath itself. */ gen_bx_excret_final_code(dc); - } else if (unlikely(is_singlestepping(dc))) { + } else if (unlikely(dc->ss_active)) { /* Unconditional and "condition passed" instruction codepath. */ switch (dc->base.is_jmp) { case DISAS_SWI: @@ -9889,7 +9865,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, = CPUState *cpu) /* "Condition failed" instruction codepath for the branch/trap ins= n */ gen_set_label(dc->condlabel); gen_set_condexec(dc); - if (unlikely(is_singlestepping(dc))) { + if (unlikely(dc->ss_active)) { gen_set_pc_im(dc, dc->base.pc_next); gen_singlestep_exception(dc); } else { --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056038; cv=none; d=zohomail.com; s=zohoarc; b=JxkiJ2Wl++MxneMf64s3ZWQxapMDdY/jdQbbbkbFqtkWgULUTA3k9ueLwyNSb6VL+pNtj/zBKhPlNggGRFofuX+yrMsrEmtVn3BfqoDZ2/HVD4V3/DKdN58QPROvDifizXrw82SXcoTfGPHjnWCpEdzPduNxcomlZscCydWUtXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056038; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l8F0yKfEV2474L4Ct30BbTSDAfxIN/YXChfrODh7eN4=; b=LMZ4ukV0zkJHlhFSoMwCqfQcrVlXhauJvCIPwzrBPKGoUuDJaYfPYMMMx5WnbFNwmgTJQqwaqto7jFeMvHBeSrE8bacF1f++XRlkjlywVAWRKIViKP2mxlFp23laOuXMVOPPIkYttAXo4sueF9Fhv16ZrTw4ryhnL4OEDF5MRng= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056038743491.4618657387457; Tue, 12 Oct 2021 09:27:18 -0700 (PDT) Received: from localhost ([::1]:59322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKcX-0006Ed-A3 for importer@patchew.org; Tue, 12 Oct 2021 12:27:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXa-00069A-Bo for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:10 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:35827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXX-00043P-O6 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:09 -0400 Received: by mail-pg1-x532.google.com with SMTP id e7so14350206pgk.2 for ; Tue, 12 Oct 2021 09:22:07 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l8F0yKfEV2474L4Ct30BbTSDAfxIN/YXChfrODh7eN4=; b=g/LVaS2IVTh4FTFsMgoFarMzBSENpkDD/XkvePL/52UKKZ/kBYP0MESwSILah9IFRU 2Dr3Ki9mgb4AZv+KRt9/QpjJDehbNJFW7mpYVV/zcVHiptnlHBzrQsAFxShCdG3d5my/ BdwGxdTd431VQkkgjAkpOFQfsNwAOD9FrzqEQSA1BXsEzHDo9xWR8/b4DshxchaFPwXE UE5ZyvalItCpUMAeeuFp/w2qJy6YEaYCkhFAm4zafqa6xDc6O7w24qhRFwcyVvkKKBAv Y7+U15qYPp8R5C4uUSXYytMMlgmIKWcAuyNw2hLtnOAGSix6WkLHiNTYtx8iEjYKRd1e TJdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l8F0yKfEV2474L4Ct30BbTSDAfxIN/YXChfrODh7eN4=; b=1cm22r9+ydRcFYzFoG/jN6cOjinXtlboHCvgQ3W/CKK2EegRgbOYx4Pb5nQuk6UBcB 58YFbCmbRjbc1tYXJnq0No5t0G/sSFazmK8JiRpYg7NCddmTc5A+zvDEuIPzoRD+o5uK cxwqLHF7qFgULBJ9KHWLBkCWD8GIWW73dFjw7VEhOdinqjJBEEdFQ9R5w1NUyuo3PPP+ kHsVm7MAjBKrVrDeF5C7C0It296qjsuTp9GJHE7HSZDhlb2iGJ2ejdeaITZf1TSDO0pK KgN64pdJ5pMgyPmaO0WQzI1BqxJQ2QxkoBmjHhJBCbcE5AaRXVE4QlGa4FLK3BnkNiB9 FzTg== X-Gm-Message-State: AOAM531KHuxyDpdwF6ady2vWWETGIxDIpSkQRafguj1miGtyeTjnpAWY ZLj1PwqSoB5k53VUSxNMU4+8F4MsLxBwwg== X-Google-Smtp-Source: ABdhPJzNSeXTxfPhPfT/nvkAK3gKtFW3szO37PGBi+0AckBuHInih5KwH2eqE8zsAhjtGIu2jc9suQ== X-Received: by 2002:a63:b349:: with SMTP id x9mr17084219pgt.421.1634055726405; Tue, 12 Oct 2021 09:22:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 07/23] target/hppa: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:43 -0700 Message-Id: <20211012162159.471406-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056040271100001 GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/hppa/translate.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index c3698cf067..3b9744deb4 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -814,11 +814,7 @@ static void gen_goto_tb(DisasContext *ctx, int which, } else { copy_iaoq_entry(cpu_iaoq_f, f, cpu_iaoq_b); copy_iaoq_entry(cpu_iaoq_b, b, ctx->iaoq_n_var); - if (ctx->base.singlestep_enabled) { - gen_excp_1(EXCP_DEBUG); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); } } =20 @@ -2346,11 +2342,7 @@ static bool do_rfi(DisasContext *ctx, bool rfi_r) gen_helper_rfi(cpu_env); } /* Exit the TB to recognize new interrupts. */ - if (ctx->base.singlestep_enabled) { - gen_excp_1(EXCP_DEBUG); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); ctx->base.is_jmp =3D DISAS_NORETURN; =20 return nullify_end(ctx); @@ -4274,10 +4266,9 @@ static void hppa_tr_tb_stop(DisasContextBase *dcbase= , CPUState *cs) nullify_save(ctx); /* FALLTHRU */ case DISAS_IAQ_N_UPDATED: - if (ctx->base.singlestep_enabled) { - gen_excp_1(EXCP_DEBUG); - } else if (is_jmp !=3D DISAS_IAQ_N_STALE_EXIT) { + if (is_jmp !=3D DISAS_IAQ_N_STALE_EXIT) { tcg_gen_lookup_and_goto_ptr(); + break; } /* FALLTHRU */ case DISAS_EXIT: --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056925; cv=none; d=zohomail.com; s=zohoarc; b=jUqit8KRQj7gk7gSIB9+L2ylMmi+Q/lxnTyse+T1NZMdE6Iu8f1YOZRzVUHPYtrbrGLshY2YwmlU7G0UAmeU5ZLiEueSbP83AXavJ43bS1jbpTQen/xWdT48Ll/JAumIYnoiFTGYIfI0RHQspKBrGvBa9kod5CXteIr7bIxcaTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056925; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jQKQj7yC7oasjm6gEezfZCoepcbFAh4lW7SLWUNzRbc=; b=O2MhCaWQdShYH73QkAKE0j9LqqtbOj257I5sihYMyvEIETHv3HSjGvTyvTPdCqe/LmgOo+O8dDO1EEEEg7xCczzWJiG4KflAAw262Tc0dhlfMwW5ecJaA1pBeQXB292WERxtxcxBsgud4Ys3b/sWBjd+AmRSRjvyxsXBkdi/XJA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056925732512.6475765987433; Tue, 12 Oct 2021 09:42:05 -0700 (PDT) Received: from localhost ([::1]:41118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKqq-0007Pf-N2 for importer@patchew.org; Tue, 12 Oct 2021 12:42:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXo-00072e-Ln for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:24 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:41824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXY-00044I-Ek for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:24 -0400 Received: by mail-pf1-x42c.google.com with SMTP id y7so8459033pfg.8 for ; Tue, 12 Oct 2021 09:22:08 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:06 -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=jQKQj7yC7oasjm6gEezfZCoepcbFAh4lW7SLWUNzRbc=; b=ooTxSuyEuUV2AcC1yYLam202lPWvJnSqYXcjnaTZCHXPzbviXZUdJc5ANF74mKzrI2 mPsZptUEuvzF4Dl9MqrqfN+Zj6cCMAHrQFdcH9x39R9UqviuvjXGcZX4wANBDdC0NpOD pniT9h9imCOqdcvysLz9i3AcsuF+ODtqCIRhIWXeM85pntNs+Y9e1M8MDdq+jI03isfj f5FB937CrRqcqnC10cYB1Dtuwe0Cf1oxdYVaw0fZ5l0pv6DtQwajl4WhLajWQZ3pcotq qAK5mf6tSCsCx2yaL/4tQTSFwKnR7ziLxKI5P5abZETVn7Upu3PrVJ/W5BsHKJTr2EJC kriw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jQKQj7yC7oasjm6gEezfZCoepcbFAh4lW7SLWUNzRbc=; b=goktJG8aSVh66XfZUhFNmv+hylKo/t/RPv7t6dNrPMrzGWHdVj6NkCaC1KRfe7Xte7 X4yZo2UIYynBRO6Y1BpuvfU4QZMHqSB2e7LwmbwABwB/27UxdmXIQ8+DFnyGgpdjPtbW utpBVlXjkmRLe4doSNKZLWyYBdVvF3t7MT3Ruy6CWaCjczN6R/4leUuQImBvqhqofCKS zcjhxr3W69sZf8A208RBJDwWmlVdLcwFQX4pArQWBLjvliy91sCeQLM6dv4CKZA1dy2P bKp92trJqfliQ1UUMI9Btv3NjLGdmwXoEQtqcnrtQ9A7PD+8ZP0kP94cqSnwbCs7F1EO E76w== X-Gm-Message-State: AOAM531HHdV3tctv3ysfSqR3VeDP5DYA1JpofPrRqb2jX9Tl+39ndyYx /D6HHVETnMeEjgT4sbaTAOstpVmQlqvRfQ== X-Google-Smtp-Source: ABdhPJwo5gwUtsdamOB6RPth8tJS1P0wHJY8TcyqE6njJQVFB3k4oDCZLsPWB+S+Yu02Tt3dwyBNjQ== X-Received: by 2002:a62:dd15:0:b0:44c:61de:537 with SMTP id w21-20020a62dd15000000b0044c61de0537mr32141055pff.57.1634055727205; Tue, 12 Oct 2021 09:22:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 08/23] target/i386: Check CF_NO_GOTO_TB for dc->jmp_opt Date: Tue, 12 Oct 2021 09:21:44 -0700 Message-Id: <20211012162159.471406-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056927481100001 Content-Type: text/plain; charset="utf-8" We were using singlestep_enabled as a proxy for whether translator_use_goto_tb would always return false. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index a46be75b00..c8d919bc3f 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -8556,6 +8556,7 @@ static void i386_tr_init_disas_context(DisasContextBa= se *dcbase, CPUState *cpu) DisasContext *dc =3D container_of(dcbase, DisasContext, base); CPUX86State *env =3D cpu->env_ptr; uint32_t flags =3D dc->base.tb->flags; + uint32_t cflags =3D tb_cflags(dc->base.tb); int cpl =3D (flags >> HF_CPL_SHIFT) & 3; int iopl =3D (flags >> IOPL_SHIFT) & 3; =20 @@ -8593,14 +8594,14 @@ static void i386_tr_init_disas_context(DisasContext= Base *dcbase, CPUState *cpu) dc->cpuid_ext3_features =3D env->features[FEAT_8000_0001_ECX]; dc->cpuid_7_0_ebx_features =3D env->features[FEAT_7_0_EBX]; dc->cpuid_xsave_features =3D env->features[FEAT_XSAVE]; - dc->jmp_opt =3D !(dc->base.singlestep_enabled || + dc->jmp_opt =3D !((cflags & CF_NO_GOTO_TB) || (flags & (HF_TF_MASK | HF_INHIBIT_IRQ_MASK))); /* * If jmp_opt, we want to handle each string instruction individually. * For icount also disable repz optimization so that each iteration * is accounted separately. */ - dc->repz_opt =3D !dc->jmp_opt && !(tb_cflags(dc->base.tb) & CF_USE_ICO= UNT); + dc->repz_opt =3D !dc->jmp_opt && !(cflags & CF_USE_ICOUNT); =20 dc->T0 =3D tcg_temp_new(); dc->T1 =3D tcg_temp_new(); --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056176; cv=none; d=zohomail.com; s=zohoarc; b=mkCzzovZQbaKBhP0GaGBTtnl3cBLJW2iy0nmxJZL+y1v6qAPTQkXZtwG14P9UTXv4vsHquUEmrdfVVutoXUD+8EJb18H3j1B6zxlWGLcKGjEGOemAHuuxVHIpmh/uSvyNO+9nqbk5HqdjHNrO0W4QujuL19nd1plTD4Rq893QZQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056176; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Quiv5vbH7lzjgQxwPWoCohOnwSfDfP+7M3aharRivYE=; b=LXxN4gRsduCvcTmZh/KSNfVD24eEEYCiCb90F30142//Hw3j/7dJalkZ7X/0pEkimY52o7PahIcF53Dy01rtVD2jDf4/2qszCQb7Gwpkqynv0BD1O69wdTXWyg7jLmxviRVawBcJVLwCt6bbdEwtcZm9AmiDsXqLrQREvHJYuSI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056176178976.1011430223416; Tue, 12 Oct 2021 09:29:36 -0700 (PDT) Received: from localhost ([::1]:39478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKek-0003TF-TT for importer@patchew.org; Tue, 12 Oct 2021 12:29:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXc-0006GU-5L for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:12 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:35758) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXa-00044r-Dz for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:11 -0400 Received: by mail-pf1-x433.google.com with SMTP id c29so18108pfp.2 for ; Tue, 12 Oct 2021 09:22:08 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:07 -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=Quiv5vbH7lzjgQxwPWoCohOnwSfDfP+7M3aharRivYE=; b=BGUlTWZFIMtS2cP2U1v0WA/iPHhT200xg8xmNDLyy79QcXDlbLfRnIpa9EM6z90vlm g3F3jicLEeBJfTXhL8UrtmFxL01AR3yJUzNodlOuhVzwJiIkZDILmAG389eRKW2GjISL PMVsqz51co9HmW5flaq6MnXmMwQbqXch7Nq0Dg/Qy1aCzyWQEJhML1nuuJTB1RtEnY0f w0Ni+eMc1ivfTD++Lj+npriWHK4okX3coWOsdMdk4HvKyC6wH/7IL38Qza8XL/QUlT7b LqzweDASW3fv/XUdM7KrYxZfITZFJLwAAMEX+g+B+CmCiwI9IO3P6EC2f8L+gLwbnQl0 DIyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Quiv5vbH7lzjgQxwPWoCohOnwSfDfP+7M3aharRivYE=; b=DzxWV8PGvoJTPr2ApzsIcUCAaqW+UjAFvs9p69DkM1/6Ip1wntCl7Ku7f0UUtwVt24 voOh0Uzb4jBVy2LWkvxyEezTVl0C7BiT8EhHdKwyHaa46O8dURtZ6PslL4IjJxUTCvJ3 QD65MvN8yIWgnqOrMWKVjmAQTgFNPq/S+2sMDXitLyez52OPzFs9/eKo1wiKog4sL4x6 FI/Qu5NtkgknJY73Z6WNGz6Z2yp2isf24gN/YR/8XEIjL5vmasdZJPfP2sN06RUipET4 GakhveInukyXevO3e6G5mpGM1biQJqJM+CymWHSc2kTgzMyhEXoQcgtNYOvTucS487BL QiRw== X-Gm-Message-State: AOAM530ZRxh8Smy/udQ4gKZFhvm7NH3gpsa1y6sMT85QEZ0xiabJxU4w qWKhEBpJQCmaNTxwuruVXpFSr3bpzllOPw== X-Google-Smtp-Source: ABdhPJwggJJs7t0tXaZvB3Fz7fmShjP7AWgqFkOEYxAOXy7dD/nd7WeQLQ28Kvj6U6MBNT8mHFeIwQ== X-Received: by 2002:a63:e041:: with SMTP id n1mr24109530pgj.211.1634055728090; Tue, 12 Oct 2021 09:22:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 09/23] target/i386: Drop check for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:45 -0700 Message-Id: <20211012162159.471406-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056177634100005 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/i386/helper.h | 1 - target/i386/tcg/misc_helper.c | 8 -------- target/i386/tcg/translate.c | 4 +--- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/target/i386/helper.h b/target/i386/helper.h index 574ff75615..ac3b4d1ee3 100644 --- a/target/i386/helper.h +++ b/target/i386/helper.h @@ -56,7 +56,6 @@ DEF_HELPER_2(syscall, void, env, int) DEF_HELPER_2(sysret, void, env, int) #endif DEF_HELPER_FLAGS_2(pause, TCG_CALL_NO_WG, noreturn, env, int) -DEF_HELPER_FLAGS_1(debug, TCG_CALL_NO_WG, noreturn, env) DEF_HELPER_1(reset_rf, void, env) DEF_HELPER_FLAGS_3(raise_interrupt, TCG_CALL_NO_WG, noreturn, env, int, in= t) DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_WG, noreturn, env, int) diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c index baffa5d7ba..5769db5ace 100644 --- a/target/i386/tcg/misc_helper.c +++ b/target/i386/tcg/misc_helper.c @@ -110,14 +110,6 @@ void QEMU_NORETURN helper_pause(CPUX86State *env, int = next_eip_addend) do_pause(env); } =20 -void QEMU_NORETURN helper_debug(CPUX86State *env) -{ - CPUState *cs =3D env_cpu(env); - - cs->exception_index =3D EXCP_DEBUG; - cpu_loop_exit(cs); -} - uint64_t helper_rdpkru(CPUX86State *env, uint32_t ecx) { if ((env->cr[4] & CR4_PKE_MASK) =3D=3D 0) { diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index c8d919bc3f..e9e1451540 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -2660,9 +2660,7 @@ do_gen_eob_worker(DisasContext *s, bool inhibit, bool= recheck_tf, bool jr) if (s->base.tb->flags & HF_RF_MASK) { gen_helper_reset_rf(cpu_env); } - if (s->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else if (recheck_tf) { + if (recheck_tf) { gen_helper_rechecking_single_step(cpu_env); tcg_gen_exit_tb(NULL, 0); } else if (s->flags & HF_TF_MASK) { --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056707; cv=none; d=zohomail.com; s=zohoarc; b=fN8qs7petGBUdCQsnXoHku5OOUD/xa+n0S/rqTiVBXyiJv8sy2kdSAkPHJxed71E7mG6GLqLxZQAUPlzDGalFlCaA3sf9+EFM8wGUBrzh6auZEb143/0pJWwxK5z9IcAMkY32flFv7P2YTDYYyYIhnAnNatJOqp0DzxZUKOUJiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056707; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5vzsS779Ji0aZH1T0g3pZgPZBGZ0QiFgHfm7fgPItP0=; b=VdRLANiKii6cwCqoTeY+4hG/LN8zXq+4KB0/bH+x5eVBT0lL4CLaXe2sbSD67WELlUl7v10/O11jkICAK+zvCanVyw7sCFmDpFkgiU1qdT11uWRprxreLxYDHLkGyNuVTidGfFpCMn3oVuu2ja9uxbshXuyL5lLnEmrZ8/SkEk0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056707904693.921299682734; Tue, 12 Oct 2021 09:38:27 -0700 (PDT) Received: from localhost ([::1]:60710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKnK-000177-PP for importer@patchew.org; Tue, 12 Oct 2021 12:38:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXg-0006UT-Pg for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:16 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:35759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXb-000456-Cb for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:16 -0400 Received: by mail-pf1-x434.google.com with SMTP id c29so18146pfp.2 for ; Tue, 12 Oct 2021 09:22:10 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5vzsS779Ji0aZH1T0g3pZgPZBGZ0QiFgHfm7fgPItP0=; b=Z3KOtrT8Xx6IEO7Nuhz+kXDLzurPwkuuuZLa7c8wuCwZRekJk6WTxSYGCON6pv5H12 Gkog/c3rz/doV7mWAaQbk/VmkXOZY10xrq22onfuolY2C5zSjJXk0eZasC5movmZQ14B xGowh4Wev5IRGhXsLTZ7A3G4OmC/dAYuRSjy4QtCYfCO2cah1qapwId9MC0wtlCfEg85 HCWQpGGbzIWgLOdJ5b4tcsfol/WH6NVV28XyzXyMYVu5y/YJHUS5HsAFG//fe3mgUoME b3qNupYiZp1v2UDJthuV250z8DKznY9Wk9eEET34xV4Gp8oZyThW+YIHEseZpktQ/rdD IzqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5vzsS779Ji0aZH1T0g3pZgPZBGZ0QiFgHfm7fgPItP0=; b=7Kz+5yd/TX3NAbC1FZ+1fzXlYmR1N+q9l/dnXEK3acwspaQgLO/DsbA/MA0Z6rDa1N 2oq5rJz8FBId+9ft52D1wLmsG9GjY91qz6pVTCTeMSe3BbUchttGa5DiYITOedBrTKCT BYYmgyWp83TjuCKdwYXVi+fJxl3Lohoem1p3liY7dY2Q/sDpIskm5+YNVepNLA91Y/wY 8JbBQPZwyPFI+BADJHuBZuL5qf0SXLYRXpFDUFp5D0JyAu7uNKkYEDF1tVhYR533n315 mlJf9+KrdWBh8/Fb++mwAA2oJcP+kxmNBXcx1QUpWavpdotF/gnsuK8hCPfl78FfYP5I IO4w== X-Gm-Message-State: AOAM531Lmv+mTJeVHGQbtAnPh1g9OfFm79VTMkrQXJIdUjPJWQUhE7qW jMQmK3B5U/Fgz66xxOPUNDzlP/neb/IJNQ== X-Google-Smtp-Source: ABdhPJyM2ZRqHS07lP1Dfe+VjMDOJ88ld6JomKaccAqj643YzfeYTbwqajBc0RKsxKjEaJYfo38Jiw== X-Received: by 2002:aa7:8bd3:0:b0:44c:68b3:a52e with SMTP id s19-20020aa78bd3000000b0044c68b3a52emr33005726pfd.74.1634055728857; Tue, 12 Oct 2021 09:22:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 10/23] target/m68k: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:46 -0700 Message-Id: <20211012162159.471406-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056710133100003 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Acked-by: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/translate.c | 44 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 50a55f949c..af43c8eab8 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -194,18 +194,6 @@ static void do_writebacks(DisasContext *s) } } =20 -static bool is_singlestepping(DisasContext *s) -{ - /* - * Return true if we are singlestepping either because of - * architectural singlestep or QEMU gdbstub singlestep. This does - * not include the command line '-singlestep' mode which is rather - * misnamed as it only means "one instruction per TB" and doesn't - * affect the code we generate. - */ - return s->base.singlestep_enabled || s->ss_active; -} - /* is_jmp field values */ #define DISAS_JUMP DISAS_TARGET_0 /* only pc was modified dynamically= */ #define DISAS_EXIT DISAS_TARGET_1 /* cpu state was modified dynamical= ly */ @@ -320,20 +308,6 @@ static void gen_exception(DisasContext *s, uint32_t de= st, int nr) s->base.is_jmp =3D DISAS_NORETURN; } =20 -static void gen_singlestep_exception(DisasContext *s) -{ - /* - * Generate the right kind of exception for singlestep, which is - * either the architectural singlestep or EXCP_DEBUG for QEMU's - * gdb singlestepping. - */ - if (s->ss_active) { - gen_raise_exception(EXCP_TRACE); - } else { - gen_raise_exception(EXCP_DEBUG); - } -} - static inline void gen_addr_fault(DisasContext *s) { gen_exception(s, s->base.pc_next, EXCP_ADDRESS); @@ -1522,10 +1496,10 @@ static void gen_exit_tb(DisasContext *s) /* Generate a jump to an immediate address. */ static void gen_jmp_tb(DisasContext *s, int n, uint32_t dest) { - if (unlikely(is_singlestepping(s))) { + if (unlikely(s->ss_active)) { update_cc_op(s); tcg_gen_movi_i32(QREG_PC, dest); - gen_singlestep_exception(s); + gen_raise_exception(EXCP_TRACE); } else if (translator_use_goto_tb(&s->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(QREG_PC, dest); @@ -6193,7 +6167,7 @@ static void m68k_tr_init_disas_context(DisasContextBa= se *dcbase, CPUState *cpu) =20 dc->ss_active =3D (M68K_SR_TRACE(env->sr) =3D=3D M68K_SR_TRACE_ANY_INS= ); /* If architectural single step active, limit to 1 */ - if (is_singlestepping(dc)) { + if (dc->ss_active) { dc->base.max_insns =3D 1; } } @@ -6252,17 +6226,17 @@ static void m68k_tr_tb_stop(DisasContextBase *dcbas= e, CPUState *cpu) break; case DISAS_TOO_MANY: update_cc_op(dc); - if (is_singlestepping(dc)) { + if (dc->ss_active) { tcg_gen_movi_i32(QREG_PC, dc->pc); - gen_singlestep_exception(dc); + gen_raise_exception(EXCP_TRACE); } else { gen_jmp_tb(dc, 0, dc->pc); } break; case DISAS_JUMP: /* We updated CC_OP and PC in gen_jmp/gen_jmp_im. */ - if (is_singlestepping(dc)) { - gen_singlestep_exception(dc); + if (dc->ss_active) { + gen_raise_exception(EXCP_TRACE); } else { tcg_gen_lookup_and_goto_ptr(); } @@ -6272,8 +6246,8 @@ static void m68k_tr_tb_stop(DisasContextBase *dcbase,= CPUState *cpu) * We updated CC_OP and PC in gen_exit_tb, but also modified * other state that may require returning to the main loop. */ - if (is_singlestepping(dc)) { - gen_singlestep_exception(dc); + if (dc->ss_active) { + gen_raise_exception(EXCP_TRACE); } else { tcg_gen_exit_tb(NULL, 0); } --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056425; cv=none; d=zohomail.com; s=zohoarc; b=k01N6rJ5tvaU9I79U9JM9vUWPPs9qYugVEQskb/2gr6JMe+cNBnbuTPos+glWKr6z6js831A7w/tipqP3XUFPC8YChaGyK7vJBk2/6/YbFi0SH2i+CjIbKaV+ax4w78OhmNAP2yXdbVedLQMia444pjk7oxImnwU7DOG34I3zu0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056425; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R6dlxti+/N1vnkKixu8IUh/Zl8M8i7vv7yb2sO8QtGA=; b=S52OCGFZX1rZJo73gxBB3u/ks9G50JTyxVhuYfwWgPcxRyKYQ+jL02ihtiYNJh+6LOVQXDVaNeqyI8hFKHsny79q3XufGioHXzVRgmj0LbT0uILU7/zW+1xQ0HQ88sxvI0CXTBl1bRZAMQrBeSLa5r4IkawDAFvrokCuWLs4S6w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056425092580.2808454164268; Tue, 12 Oct 2021 09:33:45 -0700 (PDT) Received: from localhost ([::1]:48032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKil-0000qE-55 for importer@patchew.org; Tue, 12 Oct 2021 12:33:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXd-0006Lo-OK for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:13 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:39562) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXb-00045i-2c for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:13 -0400 Received: by mail-pj1-x1033.google.com with SMTP id ls18-20020a17090b351200b001a00250584aso2266572pjb.4 for ; Tue, 12 Oct 2021 09:22:10 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:09 -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=R6dlxti+/N1vnkKixu8IUh/Zl8M8i7vv7yb2sO8QtGA=; b=ssEMTlOy8+7MVSdBRIL5CfNkPE0aQSqbhT0F8022JXOOuIpwvr5KPYdV9MW8lGscKQ HoaF3iAtl9rVNh7it3/++nqnhH8i7+825Dp4F4dTsUqdZilz0AMrUUCNLVbmcZAoHuN2 82m3RfL7uL4o0/6FEPAB5sJDYyZF5Ic4OTglCmU8fgILkTUs2V4diSgPmzbf9vzsUyM2 CBQKsNqO7iEftTj23KcOH2EnJJ/xEU2QfSjtkcd1sBpd938LFxaxBdAB0DTnZv55NHX6 7lsl25kVIjvXucRdIF3QWqjLl/d7d/inssB1QbZeT2iqkRt7+IMZmpwTKYr/pMKOFWug QJYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R6dlxti+/N1vnkKixu8IUh/Zl8M8i7vv7yb2sO8QtGA=; b=PPDITuRDgIpyOz0Ncje6imZ7iP1gCjtBuEgQiksJmMnNfnmgO0ZQtE4Ps7cyNL8L9Q lff1ROnssfsQg6ZbCHhb7uEO+AeaAtMEipWS6Jm6nzO/XtQ248GUAd4TBus5uw+wy+Xw jJMVLvOenj28Ub8v3VY4fpqBt/DCao64QeUhep3KZ3COsmpCtKpZqMRfYlbeadKrzOYH VW3wQWemhavJ4J0oRidhj8th/+PSBXglcrngMOy9WiMTFcSVYkSBBazVLlhvCsf1WarN ICo97tgBVjK0vk74Uci1SYiHDVqui9BucPOPvFtXMoNEh1uHrfNK7sH0cj3OaeJLgC6H Tg4Q== X-Gm-Message-State: AOAM5315LuOxleIh05/i4Ir27lu93MS+DYIWUrS0nj3WFD5Of4dUji1Z BYnuxLx8pp6fBwOJg2S9JHhVlpbJgr3LBA== X-Google-Smtp-Source: ABdhPJxAUnDU9jQ4t1w4RT36dW1bO/RCBAOB+EQRogAkP52HqaLmLBXILcd6wtwpbtITrT4a897Z9g== X-Received: by 2002:a17:902:c206:b0:13f:68f:675c with SMTP id 6-20020a170902c20600b0013f068f675cmr30413322pll.8.1634055729708; Tue, 12 Oct 2021 09:22:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 11/23] target/microblaze: Check CF_NO_GOTO_TB for DISAS_JUMP Date: Tue, 12 Oct 2021 09:21:47 -0700 Message-Id: <20211012162159.471406-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056425975100001 Content-Type: text/plain; charset="utf-8" We were using singlestep_enabled as a proxy for whether translator_use_goto_tb would always return false. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index a14ffed784..7e465b629a 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1779,7 +1779,7 @@ static void mb_tr_tb_stop(DisasContextBase *dcb, CPUS= tate *cs) break; =20 case DISAS_JUMP: - if (dc->jmp_dest !=3D -1 && !cs->singlestep_enabled) { + if (dc->jmp_dest !=3D -1 && !(tb_cflags(dc->base.tb) & CF_NO_GOTO_= TB)) { /* Direct jump. */ tcg_gen_discard_i32(cpu_btarget); =20 @@ -1804,7 +1804,7 @@ static void mb_tr_tb_stop(DisasContextBase *dcb, CPUS= tate *cs) return; } =20 - /* Indirect jump (or direct jump w/ singlestep) */ + /* Indirect jump (or direct jump w/ goto_tb disabled) */ tcg_gen_mov_i32(cpu_pc, cpu_btarget); tcg_gen_discard_i32(cpu_btarget); =20 --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056854; cv=none; d=zohomail.com; s=zohoarc; b=Ed7A6hKxPEj1bF9PjSSSe97eKLeYWvI3A7POz4N3841uIhnjw52yfQYerhLkRbq1ROnEgzGoqJhtQaFYfASS75Rt/5qLKsrjp+NYEf18MHdzKTUn+7/uM/hlaPCPvhY/nKWF7SuYwLqRqHnnyUiHOtXGKf0XfBLB8fvVXFWXMQE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056854; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RDO2b1TAF4ztgLUbPUMoAMU1yhwWU0vJ3YMD4i8Z5ck=; b=MC6BUw9Ho1jW95l8VylobtYCXnqhAqEjysoKhJ6euX5EiMoCMbpVi3/VJDuMTegbTPkUGOXs38eSPoOn5NpIpAnCgF7YNijjS39gFMLezMtz5YbzUV7PATw9dOIvIITsWyW0waI73IoeBN4QhIz+XKhMQ1KOYEZEib5pa9R9Tmo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056854519411.75844260217264; Tue, 12 Oct 2021 09:40:54 -0700 (PDT) Received: from localhost ([::1]:38880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKph-0005ZG-EG for importer@patchew.org; Tue, 12 Oct 2021 12:40:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXg-0006UU-Q0 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:16 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:34672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXb-00046d-MP for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:16 -0400 Received: by mail-pg1-x534.google.com with SMTP id 133so14339588pgb.1 for ; Tue, 12 Oct 2021 09:22:11 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:09 -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=RDO2b1TAF4ztgLUbPUMoAMU1yhwWU0vJ3YMD4i8Z5ck=; b=gLpjH35DtYy/LfwCVLYBXMGKwBcYM8FSfx9CGd58O4Q+QHYR8l9f8cGIqSd/8Kb/Fg oPlzeyOouRYgr7DhUmi+eYC/sI5uvj+OxTOGqcC/Kip3ISQVvAxe2dDQeWGyry6S3BAo ASiKOLvPDmk47cre3CObcs5IyVIS9AOF8wJtf8NpvD1+AAU3jZoC0vP5K4UavwY5ekDA LZfA6qlM0v8Ectv1Q9ru3iIlbtU/qK5tLKSqm/0kmuLAPVsG/l410lnmzrhCWOAGS7Ol 1yI10WB09BNrphS5u17tBg4neRfVYlni7BEoqqwP+YchPjdV7d+TYD/dQWU2DzjEI/LG h1IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RDO2b1TAF4ztgLUbPUMoAMU1yhwWU0vJ3YMD4i8Z5ck=; b=QVr3VCu3ffdhn1UNEGN5iMCjOCYCV+s8QutybvLZxuImBjo8wxIPwC9o9RWm+jQEYL DhB/sPV8Fn9pztYD4fUtC/fIUyIwFNZkubhmJ/Sf2SrRaKWRmMqt6VymYZa6E0b5EG5o HeTXjRsuSps6u+Q0GJbJCfNEaxgWIXM1mk3xTZdoSEagPufKQF7qI28iBuQO0yiknh9i c+xSREtS6hBeQU5VB94NkQDAe6GXsxiI9nvOrgB/uERBhwDKIYcdVJy5lIj4nYEckgaT zq3FtwRgkouOYvLQQmnz1RIZA+UHHkE1G+RDK3T0t9sKMfhATXeOXVEdOFsgf3pvk0uY cqCw== X-Gm-Message-State: AOAM532oktTIT7LbExsLJYjYXY6W8oX4lFWa3AWztNEpTSxFS+VRx6mH LWSqZm14CagDnAEclKDj2t+Z1A/6NHWdrg== X-Google-Smtp-Source: ABdhPJxcCjSb/K7PZFzGMEB7V4knrOKsxmY8hADOO5EiS8CCyIOVOivUujMdUQK5PRZLHwW1jlT7Fg== X-Received: by 2002:a62:1b8e:0:b0:44c:9318:f6e1 with SMTP id b136-20020a621b8e000000b0044c9318f6e1mr33197333pfb.84.1634055730308; Tue, 12 Oct 2021 09:22:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 12/23] target/microblaze: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:48 -0700 Message-Id: <20211012162159.471406-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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, T_SPF_TEMPERROR=0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056856758100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 7e465b629a..437bbed6d6 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -126,12 +126,7 @@ static void gen_raise_hw_excp(DisasContext *dc, uint32= _t esr_ec) =20 static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { - if (dc->base.singlestep_enabled) { - TCGv_i32 tmp =3D tcg_const_i32(EXCP_DEBUG); - tcg_gen_movi_i32(cpu_pc, dest); - gen_helper_raise_exception(cpu_env, tmp); - tcg_temp_free_i32(tmp); - } else if (translator_use_goto_tb(&dc->base, dest)) { + if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(dc->base.tb, n); @@ -1807,12 +1802,7 @@ static void mb_tr_tb_stop(DisasContextBase *dcb, CPU= State *cs) /* Indirect jump (or direct jump w/ goto_tb disabled) */ tcg_gen_mov_i32(cpu_pc, cpu_btarget); tcg_gen_discard_i32(cpu_btarget); - - if (unlikely(cs->singlestep_enabled)) { - gen_raise_exception(dc, EXCP_DEBUG); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); return; =20 default: --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056189; cv=none; d=zohomail.com; s=zohoarc; b=H87x5faLDudmGkJLfC5+RIVo3xcREdQvfwwtvgKFCq1pleIOLPJEdMks6QIANvR3xg9dXlp2CON21XE1iCzIqhDEKan7Aj9zaLN+5QwCTXyxLkB6mMfUxGrCSwsJHfrUx8haLox6K4rERMY4zI5mKTEDvOZ/el4Ne5/N5ALmnus= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056189; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9ywY9ZTgvf8lxwlmdR3Zdf9KRJMgcNgLbM1CBd+n8PA=; b=RwLh3x4gnrw+ItNd3GdMuD+4IyXx/UvpG/E8CSxUMxdZXs3yNPnt0ldfjUUPyiUfIfIN85iwq0D2ElXdrdfxsSPZS6flZfG3ZZ7Q2nIDuHUPNXrIMvELQ+1aHlXczulHthKw5W92q3zH99mJRFGLhGCMpZGZ52ExvLyR2MIMkh0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056189723193.9508092394284; Tue, 12 Oct 2021 09:29:49 -0700 (PDT) Received: from localhost ([::1]:39810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKey-0003gP-ME for importer@patchew.org; Tue, 12 Oct 2021 12:29:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXf-0006Rf-82 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:15 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:39563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXc-000474-CQ for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:14 -0400 Received: by mail-pj1-x1034.google.com with SMTP id ls18-20020a17090b351200b001a00250584aso2266624pjb.4 for ; Tue, 12 Oct 2021 09:22:11 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:10 -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=9ywY9ZTgvf8lxwlmdR3Zdf9KRJMgcNgLbM1CBd+n8PA=; b=JbvjLToTKiz2p7vMrDPT97RbJmCRXr4aRU7iwvw9Ib9MlphA4ozmDIf3lbzSB8OEfc qQa+7QhlFAqY4G8DeBL8NSm4xLxAteTMfwZEMYkwgxY4tTkYgr+UcCPY0KmNeaisFRbW vy7sC2+cfItbduBNhSlDzoXqyDV7ME/0R2mpigQwTyDX/NqfJKnpqjA4cDqMFp4XdfEa 2i7L8WwkP4hvVihUL2SwKM9FGmD+roDCsYLoQTp4ELSqYTucpdvyjqyambzUcSAoH12o JK4qO388uf0bdbAnfcOM6ffL/Vby0oBlOqwsUVRIxemQEQHgdtqgqEgVOREP7qWp4Bxb XHPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9ywY9ZTgvf8lxwlmdR3Zdf9KRJMgcNgLbM1CBd+n8PA=; b=Jkd++meYWnzRmBq7jSkXt16STtf07Gs35L7DTJ0U3N3dCVjLxA3r+z6QG5EgGRfX2t CgQKj/bYs0JLav//JPWRA0jT8hhnG7zQimkQoHXMdSwftuot9yML/Nsmh2sIP/xOkOZE lXMWGSMXC5csIXqVS8Q2yh+J6RqvGofSF8FDDV/U949SCP148yH/QlEwNym6r5UB2FZx OgGiLL+dkbk+YJMfo7sXd5nhgyC9/7Cy/EfWRrjFmisldNI4Oad/yfXuGtkWOuxm/cba SMTwjPwGdL9rVSnaYSx+9zbPn19DwOF0QzbVAXy51ZXB6qjEXBTR9qfksca69VqY6EV9 AqNQ== X-Gm-Message-State: AOAM533+wi4ccqKIyCs1sdptyv+jZYDomkjujZeI4SZna5hVXId5z7r0 SeB+BJZHwZEmHaSoHSFFCmekiqEwYXMZvQ== X-Google-Smtp-Source: ABdhPJyIdMeOgTGbFUgORuvIZlpXo7Rh8pvEiCZdO2xF2Tz9TGyHa2e0OjlKV3vbafBtV7qrLRJ03Q== X-Received: by 2002:a17:902:ea0a:b0:13e:8b24:b94 with SMTP id s10-20020a170902ea0a00b0013e8b240b94mr30947579plg.45.1634055730906; Tue, 12 Oct 2021 09:22:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 13/23] target/mips: Fix single stepping Date: Tue, 12 Oct 2021 09:21:49 -0700 Message-Id: <20211012162159.471406-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056191653100001 Content-Type: text/plain; charset="utf-8" As per an ancient comment in mips_tr_translate_insn about the expectations of gdb, when restarting the insn in a delay slot we also re-execute the branch. Which means that we are expected to execute two insns in this case. This has been broken since 8b86d6d2580, where we forced max_insns to 1 while single-stepping. This resulted in an exit from the translator loop after the branch but before the delay slot is translated. Increase the max_insns to 2 for this case. In addition, bypass the end-of-page check, for when the branch itself ends the page. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/translate.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 148afec9dc..f239f9ffc0 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -16016,6 +16016,16 @@ static void mips_tr_init_disas_context(DisasContex= tBase *dcbase, CPUState *cs) ctx->default_tcg_memop_mask =3D (ctx->insn_flags & (ISA_MIPS_R6 | INSN_LOONGSON3A)) ? MO_UNALN : MO_ALIGN; =20 + /* + * Execute a branch and its delay slot as a single instruction. + * This is what GDB expects and is consistent with what the + * hardware does (e.g. if a delay slot instruction faults, the + * reported PC is the PC of the branch). + */ + if (ctx->base.singlestep_enabled && (ctx->hflags & MIPS_HFLAG_BMASK)) { + ctx->base.max_insns =3D 2; + } + LOG_DISAS("\ntb %p idx %d hflags %04x\n", ctx->base.tb, ctx->mem_idx, ctx->hflags); } @@ -16085,17 +16095,14 @@ static void mips_tr_translate_insn(DisasContextBa= se *dcbase, CPUState *cs) if (ctx->base.is_jmp !=3D DISAS_NEXT) { return; } + /* - * Execute a branch and its delay slot as a single instruction. - * This is what GDB expects and is consistent with what the - * hardware does (e.g. if a delay slot instruction faults, the - * reported PC is the PC of the branch). + * End the TB on (most) page crossings. + * See mips_tr_init_disas_context about single-stepping a branch + * together with its delay slot. */ - if (ctx->base.singlestep_enabled && - (ctx->hflags & MIPS_HFLAG_BMASK) =3D=3D 0) { - ctx->base.is_jmp =3D DISAS_TOO_MANY; - } - if (ctx->base.pc_next - ctx->page_start >=3D TARGET_PAGE_SIZE) { + if (ctx->base.pc_next - ctx->page_start >=3D TARGET_PAGE_SIZE + && !ctx->base.singlestep_enabled) { ctx->base.is_jmp =3D DISAS_TOO_MANY; } } --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056034; cv=none; d=zohomail.com; s=zohoarc; b=Tx4X2c/b5qpQOcXZZbrql2gC1RR5cJVscqAD3fwkAuSdWANtdK1habSK42xxPrfeq6CFDAfeZpCD9T7IRrDPcXZs60dF/FkAzWQVx4/N3lsMqWiMvqImWBqyh+axhIkvW1tuTM6+NpT0BYhlPW+aD5aSo0IGT8rymzMmYC6oSQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056034; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RZhqGge9vu+6Bc5Ne+L+64OR4mcrgGsrXPqV5KkLFEY=; b=G5hffJJepdf21483xtmoSA0aCE73YXFZYwKSFh8O9gtl1nKRktmzn1WDH4VK0euUEoLRhsulINJZlWhxwSZ1TzsKBWj/w3dKB2LnND/Obbt23l+L65OkaU13nlb3w6clfVJkMgS7mzytuB7IqC+TNDXpqzkQgSCmfkguqbUBwEQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056034306632.3232938292563; Tue, 12 Oct 2021 09:27:14 -0700 (PDT) Received: from localhost ([::1]:59066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKcT-00064l-5j for importer@patchew.org; Tue, 12 Oct 2021 12:27:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXh-0006ZB-Pq for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:17 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:39741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXe-00047O-4M for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:17 -0400 Received: by mail-pl1-x635.google.com with SMTP id c4so13873247pls.6 for ; Tue, 12 Oct 2021 09:22:13 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RZhqGge9vu+6Bc5Ne+L+64OR4mcrgGsrXPqV5KkLFEY=; b=qoflFB00Kmd4hh29Hpa2RQDAgTvIBVC2FRsSJAam2z8R2rB5tdbguf1wsCS1GQ72xW iAzfzHPllAUSX+5yNh6L4gHHttJ6Y8y1qV/TN+VVifSPiZUDNo7Uxj5dEzD+tLKCr3Br yyFSiGjjuwCcrm1J3am+jo/0O1FuYfT01g5g730mhrCnqPbd71xylEtd5z6M2OdNfAT1 h2whYIb2Vc7VDrjGJZgeTwXcUlEWAiTjY5t54yxSqmuX5zBqtkLOZzqQHvPl5zgTU123 WQRR1mSCSzyrWamfBMcU82vUAlWKh+Vna/k5DbqnbR0wGCcxFQQV1Tjt+y//eT8TqqfQ woqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RZhqGge9vu+6Bc5Ne+L+64OR4mcrgGsrXPqV5KkLFEY=; b=ilDZj9OUrp//l3t6StIbaW3YIcjPan6TFbyr4G5R4VnGeYs+FK3U9K5/1BZXTsXZPM 76gExJst74u5nxg2xU0w7Qk01XW0zxKrCi9fp7g9hi4RcWL5wv73Lq/9iWweXsBdQjvN Tu9vrdzAQ3IT1Ln09u/Q/yC/bn8jpIhAnOvOBArCmZGlBHdR5qxeR4/CwEdhZLUGPEtx /k/7n971V7WY+IzrQcrRjtqKFiNzV+cHrNyqMx51NtharCQY/MyZYXKmMPGU04S17khQ xH6ETNyioYcyraaS0nkV/kCLiCF66LICuthmvGDOuADl7CgCOtkJcOv2HskEp2egX0qj Ak3A== X-Gm-Message-State: AOAM530/JBHfRwTjEwmPIBVAzxL7ocrz/CGixI5JlX0tQHM+uWMyO4G7 d6FffR0hh0ySJ9a4Xn7LgIa1QCtGzpgeAw== X-Google-Smtp-Source: ABdhPJzXgbo7yzhHB/fkNf+zNxFAwslGTBWW07pzfeZJsJfirzIF5F3GR6Fdl/RLRddoFrxt1Z4ZQw== X-Received: by 2002:a17:903:22d0:b0:13f:507:6414 with SMTP id y16-20020a17090322d000b0013f05076414mr31124613plg.69.1634055731690; Tue, 12 Oct 2021 09:22:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 14/23] target/mips: Drop exit checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:50 -0700 Message-Id: <20211012162159.471406-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056035860100002 GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 50 +++++++++++++------------------------ 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index f239f9ffc0..0e59b97190 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -4823,12 +4823,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, ta= rget_ulong dest) tcg_gen_exit_tb(ctx->base.tb, n); } else { gen_save_pc(dest); - if (ctx->base.singlestep_enabled) { - save_cpu_state(ctx, 0); - gen_helper_raise_exception_debug(cpu_env); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); } } =20 @@ -11788,10 +11783,6 @@ static void gen_branch(DisasContext *ctx, int insn= _bytes) } else { tcg_gen_mov_tl(cpu_PC, btarget); } - if (ctx->base.singlestep_enabled) { - save_cpu_state(ctx, 0); - gen_helper_raise_exception_debug(cpu_env); - } tcg_gen_lookup_and_goto_ptr(); break; default: @@ -16111,28 +16102,23 @@ static void mips_tr_tb_stop(DisasContextBase *dcb= ase, CPUState *cs) { DisasContext *ctx =3D container_of(dcbase, DisasContext, base); =20 - if (ctx->base.singlestep_enabled && ctx->base.is_jmp !=3D DISAS_NORETU= RN) { - save_cpu_state(ctx, ctx->base.is_jmp !=3D DISAS_EXIT); - gen_helper_raise_exception_debug(cpu_env); - } else { - switch (ctx->base.is_jmp) { - case DISAS_STOP: - gen_save_pc(ctx->base.pc_next); - tcg_gen_lookup_and_goto_ptr(); - break; - case DISAS_NEXT: - case DISAS_TOO_MANY: - save_cpu_state(ctx, 0); - gen_goto_tb(ctx, 0, ctx->base.pc_next); - break; - case DISAS_EXIT: - tcg_gen_exit_tb(NULL, 0); - break; - case DISAS_NORETURN: - break; - default: - g_assert_not_reached(); - } + switch (ctx->base.is_jmp) { + case DISAS_STOP: + gen_save_pc(ctx->base.pc_next); + tcg_gen_lookup_and_goto_ptr(); + break; + case DISAS_NEXT: + case DISAS_TOO_MANY: + save_cpu_state(ctx, 0); + gen_goto_tb(ctx, 0, ctx->base.pc_next); + break; + case DISAS_EXIT: + tcg_gen_exit_tb(NULL, 0); + break; + case DISAS_NORETURN: + break; + default: + g_assert_not_reached(); } } =20 --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056570; cv=none; d=zohomail.com; s=zohoarc; b=nOp8jOk5YOZkGip2McvHc+W/FeRqev3j92E0uDYul+HcOVo9Oqg9FPQO107xaftrYeTM9H6+ci/F1d/nBxrkrbZZ3LiObXGjgRWiI9+CiWUdiwtA2+NapT0mJCmkPyt5VCB+70yPS5mUHi3ZsJ+XECoalyyHx8fANZs4DheEkVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056570; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Jym3b2uwL2PhBIHK4zVSTvoSJnlM3mgPVmGSpK6sCOA=; b=mEmhPB5kaE5KI8uo+PjfLJNTJE2r+P+qqyi9DaQKI6RvCmJretlBXxzLEJnLlTmp1GL6hOXUFx8+g/OGgEQnH9KRN1Rbv8L79LraYGk8OTiE2yWFBbrAG3Y92lC4dFt5jknOfDllp5kn7TfEodDwuZeB/bpBv4IasEgHsutc7GE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163405657089275.76723676847064; Tue, 12 Oct 2021 09:36:10 -0700 (PDT) Received: from localhost ([::1]:54490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKl7-0005Gk-Ro for importer@patchew.org; Tue, 12 Oct 2021 12:36:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXg-0006Tl-PT for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:16 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:37556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXd-00047X-VZ for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:15 -0400 Received: by mail-pf1-x42e.google.com with SMTP id q19so7391pfl.4 for ; Tue, 12 Oct 2021 09:22:13 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:12 -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=Jym3b2uwL2PhBIHK4zVSTvoSJnlM3mgPVmGSpK6sCOA=; b=qLeSCTviBV4Et66OEA2Oyw7Wi8plulYBhQHz+JhNJpEvN+zLfMnNNgV0dtpdrDP1lk 9YkVkSPt2g9gUaRlOeXph+233vILZ5vNJrFaEZjXpeXFa9b72QMf6FNOww6k9Ci4rWqU A4jhScwe9RzL6G6foOc9pJU0EPniOxCKPsDeHqb7EQVtOvRQsateakzSM1ilFJnpgg9G g9Zomp9hQSb27Fww8d0AQWXyrmkoZECadPc75/26JDZ8xigtD2Vlk+8/cBfCD595EbGx PqsofYOqUm22OXS24SVCF8TD8rPz/LeFOMIw53zwzBvt8OazGxLPEO/6Lal+mtaVMHv5 r7Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Jym3b2uwL2PhBIHK4zVSTvoSJnlM3mgPVmGSpK6sCOA=; b=MoQDIhFHMRRlWH80TsbVXSff0q+Md+hT2eIZa1eaF6AVuTxI+DO5w8Ximtlq2DJ1LX 0WqfrOjgSWQiYWpB7OgKbu6nY331/uDMnE2YUEdVsR+9dHjbqJyn6TW1OSsdKV+gPDdl vKnjRbKIH2PlV9b+GH/qiYN7OVrX3r7E4bVxrwTAa8OPK16Vslb8xcUrCSZe6dnP1Scx n+V5dZawf/DT9ihYWy6foCSK0vzQqqX+6QPQTRAw1X0L0NJ89TvZ0DTR5yW6D5GhYT36 dS+OA3cAY+3svxZW34N8zGvcvSW/DlL6dch8Bbo+pyT1SHNE620jfPSxcKZw4Ebbd3+K jZRA== X-Gm-Message-State: AOAM533QjNXKexcLUwAiBhfEQFw6VRabq0TpVt74qTHqAYYqEOXvvM9Y BAu6MCE5d8cChy6TC+ZpJ7OQqlTkvMH+0Q== X-Google-Smtp-Source: ABdhPJzVw8zM3ggMEzA6iiIAzK4bQw0j0iWoCWN3n9p2XGxHI78J/e1NxTcCFpUyCEssuhqWagWQ6Q== X-Received: by 2002:a05:6a00:c1:b0:44c:ec40:b47 with SMTP id e1-20020a056a0000c100b0044cec400b47mr22126103pfj.76.1634055732512; Tue, 12 Oct 2021 09:22:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 15/23] target/openrisc: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:51 -0700 Message-Id: <20211012162159.471406-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056573191100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/openrisc/translate.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 5f3d430245..ca79e609da 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1659,11 +1659,7 @@ static void openrisc_tr_tb_stop(DisasContextBase *dc= base, CPUState *cs) /* The jump destination is indirect/computed; use jmp_pc. */ tcg_gen_mov_tl(cpu_pc, jmp_pc); tcg_gen_discard_tl(jmp_pc); - if (unlikely(dc->base.singlestep_enabled)) { - gen_exception(dc, EXCP_DEBUG); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); break; } /* The jump destination is direct; use jmp_pc_imm. @@ -1680,19 +1676,11 @@ static void openrisc_tr_tb_stop(DisasContextBase *d= cbase, CPUState *cs) break; } tcg_gen_movi_tl(cpu_pc, jmp_dest); - if (unlikely(dc->base.singlestep_enabled)) { - gen_exception(dc, EXCP_DEBUG); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); break; =20 case DISAS_EXIT: - if (unlikely(dc->base.singlestep_enabled)) { - gen_exception(dc, EXCP_DEBUG); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); break; default: g_assert_not_reached(); --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056417; cv=none; d=zohomail.com; s=zohoarc; b=iOlWfWVgpmu2ChBPB7gY7HNsMRn6kpjpoSZuBkt7bpGWMnl9RSyNDJZzOiMIw1KZgbO9kOizt/AU9Q1RL2KH4kxNmd8qG0HXA9Q7wvHe911GvRsmDTE4Lcn20hui2zGhHVR43+ouA2wbDDtONs1p3YoTciQ7D8HalBvmdNdcMHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056417; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=c+2jqTHYz2HTI6HWdOH/qFDNzECfx/sjJFCOKjm9YjM=; b=BP5aZiJxVmecwNT/DbJt1dZaPN5lb5yU8g6KYGZZbkF6wO3ONioVTSaFsKhlTQD/SJd0C8L/47BMLePwhknQZrkZH6IKWOIup8H7m1pJ6+a4FcIZkU23fqn50Gr4T92C+3zmgKC6BMRbFniumm3RseJIVv83KFV8LLln3NA8TLA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056417613212.19393350539542; Tue, 12 Oct 2021 09:33:37 -0700 (PDT) Received: from localhost ([::1]:47840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKie-0000hW-Kk for importer@patchew.org; Tue, 12 Oct 2021 12:33:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXi-0006cA-AS for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:18 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:38740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXe-00048g-LY for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:17 -0400 Received: by mail-pg1-x52b.google.com with SMTP id s75so14335330pgs.5 for ; Tue, 12 Oct 2021 09:22:14 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:13 -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=c+2jqTHYz2HTI6HWdOH/qFDNzECfx/sjJFCOKjm9YjM=; b=RWstJtMl3aEqYL2dVvkQmrB5CHCmrnyI8UEWHCyHhOZoNgGJt6vtp2fUWtDBLsCl3l 9gvY5gHwACF30Lx9ngqEKGCLoNwf5yIwq7wMtm/+hyDLTadxkDOpZqAoyY/9144R1XMP b1ApRi+sfLOsTBQK1j/DB/7BrnO+qJckOIXGY6rVGf8wjla3LZZ//oqHbfxb0ekrzamX cKDhjgEENPMgliwGS7pWVyKTNX4c/A/7zypAZNHCZiMcO5Z6FAlHXt9Fh4o7wLhQiFav CboCNw0+IrjjUiWhbYaY4JnBbzUShzhw5kS7jTgAXYhlW1Z/5vPPA+Mp6cmdXjChXie6 zC9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c+2jqTHYz2HTI6HWdOH/qFDNzECfx/sjJFCOKjm9YjM=; b=NL1q8KsWYzEUNt0M+5FGr8ffNaiB9dED35XH9TWuy/peZ+XXfQqCa7FmlEKMkmtBr2 Fq6+0uI4idaiYfHwRCgh4D/h73r6yp38nBs57nNg49BxMB9euJ5iRskZ71o1hi3YGqcM hT1P7TnENW5N7i5q5OFpa+czYgjPAsv47rDe9hHoNxEKeeiE+ybfk5yDlY5dTED0tWTX aQ3SMYOJcxRr3S4iajBO3bofTkP2udtrILraQ0pPp/YSqpbgfuUCyL+w43id211hDGb8 1/Mx6cpFejhqAEMvKhmDGOcQvy73zP0D079SQRKxhur3gVZ4GwuM81IGbgs11in1wI3f x1tA== X-Gm-Message-State: AOAM5324FI7wY6E5sSFjjUKrSpH9aG3EytDJxeeX45ZdTLDy1A6WI0CU r9k+mdIBSiEnEQ0tS15qjpvefHHaXwazFw== X-Google-Smtp-Source: ABdhPJzuIdX+KnqJ5lowzXsESbUwfFgY7p/yClLBewlD8LUrBfdG7f2n3/rI6if+rssElaZwOhMPyw== X-Received: by 2002:aa7:8891:0:b0:44d:a66:2f1b with SMTP id z17-20020aa78891000000b0044d0a662f1bmr16303973pfe.22.1634055733326; Tue, 12 Oct 2021 09:22:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 16/23] target/ppc: Drop exit checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:52 -0700 Message-Id: <20211012162159.471406-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056419295100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Reuse gen_debug_exception to handle architectural debug exceptions. Signed-off-by: Richard Henderson --- target/ppc/translate.c | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index b985e9e55b..80635b0621 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -42,7 +42,6 @@ =20 #define CPU_SINGLE_STEP 0x1 #define CPU_BRANCH_STEP 0x2 -#define GDBSTUB_SINGLE_STEP 0x4 =20 /* Include definitions for instructions classes and implementations flags = */ /* #define PPC_DEBUG_DISAS */ @@ -333,7 +332,7 @@ static uint32_t gen_prep_dbgex(DisasContext *ctx) =20 static void gen_debug_exception(DisasContext *ctx) { - gen_helper_raise_exception(cpu_env, tcg_constant_i32(EXCP_DEBUG)); + gen_helper_raise_exception(cpu_env, tcg_constant_i32(gen_prep_dbgex(ct= x))); ctx->base.is_jmp =3D DISAS_NORETURN; } =20 @@ -4307,15 +4306,8 @@ static inline bool use_goto_tb(DisasContext *ctx, ta= rget_ulong dest) =20 static void gen_lookup_and_goto_ptr(DisasContext *ctx) { - int sse =3D ctx->singlestep_enabled; - if (unlikely(sse)) { - if (sse & GDBSTUB_SINGLE_STEP) { - gen_debug_exception(ctx); - } else if (sse & (CPU_SINGLE_STEP | CPU_BRANCH_STEP)) { - gen_helper_raise_exception(cpu_env, tcg_constant_i32(gen_prep_= dbgex(ctx))); - } else { - tcg_gen_exit_tb(NULL, 0); - } + if (unlikely(ctx->singlestep_enabled)) { + gen_debug_exception(ctx); } else { tcg_gen_lookup_and_goto_ptr(); } @@ -8561,17 +8553,11 @@ static void ppc_tr_init_disas_context(DisasContextB= ase *dcbase, CPUState *cs) ctx->singlestep_enabled =3D 0; if ((hflags >> HFLAGS_SE) & 1) { ctx->singlestep_enabled |=3D CPU_SINGLE_STEP; + ctx->base.max_insns =3D 1; } if ((hflags >> HFLAGS_BE) & 1) { ctx->singlestep_enabled |=3D CPU_BRANCH_STEP; } - if (unlikely(ctx->base.singlestep_enabled)) { - ctx->singlestep_enabled |=3D GDBSTUB_SINGLE_STEP; - } - - if (ctx->singlestep_enabled & (CPU_SINGLE_STEP | GDBSTUB_SINGLE_STEP))= { - ctx->base.max_insns =3D 1; - } } =20 static void ppc_tr_tb_start(DisasContextBase *db, CPUState *cs) @@ -8640,7 +8626,6 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, = CPUState *cs) DisasContext *ctx =3D container_of(dcbase, DisasContext, base); DisasJumpType is_jmp =3D ctx->base.is_jmp; target_ulong nip =3D ctx->base.pc_next; - int sse; =20 if (is_jmp =3D=3D DISAS_NORETURN) { /* We have already exited the TB. */ @@ -8648,8 +8633,8 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, = CPUState *cs) } =20 /* Honor single stepping. */ - sse =3D ctx->singlestep_enabled & (CPU_SINGLE_STEP | GDBSTUB_SINGLE_ST= EP); - if (unlikely(sse)) { + if (unlikely(ctx->singlestep_enabled & CPU_SINGLE_STEP) + && (nip <=3D 0x100 || nip > 0xf00)) { switch (is_jmp) { case DISAS_TOO_MANY: case DISAS_EXIT_UPDATE: @@ -8663,15 +8648,8 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase,= CPUState *cs) g_assert_not_reached(); } =20 - if (sse & GDBSTUB_SINGLE_STEP) { - gen_debug_exception(ctx); - return; - } - /* else CPU_SINGLE_STEP... */ - if (nip <=3D 0x100 || nip > 0xf00) { - gen_helper_raise_exception(cpu_env, tcg_constant_i32(gen_prep_= dbgex(ctx))); - return; - } + gen_debug_exception(ctx); + return; } =20 switch (is_jmp) { --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056569; cv=none; d=zohomail.com; s=zohoarc; b=a2LypNKvGhSq3aDlw7EmGTmvM/SEYzoYYkMhIuSNhTHK3qakoD4izaY8iV08t2B2K9G93AO6UlEOgG2Ozffj6gVK1N8YS16Gvj4Fp5SKzW+2Hkyt9JsKKUvyJzKTVShZHmaOhEL+wMx5Vlma+cASP5DPaFJbqA1xY9qDQZoxluc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056569; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=V2zdE05QdBMVE/Q8UPWwFC62R4UEZKPsDdj46AZ66gZSJ6yW54RcRemTqYyoAWxxovCwG+wParCtPrAlgy3Qf/dgJh+7t1e33a9hLcuQZI8E4OgpaMdQEXF2XlVLUhqHTwftgvl8F0HBDQpCuJ+7AA9Ri7cMcZ+AlEZ3e6TnMl0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056569132946.6384440323048; Tue, 12 Oct 2021 09:36:09 -0700 (PDT) Received: from localhost ([::1]:54264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKl5-000572-UR for importer@patchew.org; Tue, 12 Oct 2021 12:36:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXi-0006ee-TI for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:18 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:53189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXf-00049m-Ho for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:18 -0400 Received: by mail-pj1-x102a.google.com with SMTP id oa4so18153pjb.2 for ; Tue, 12 Oct 2021 09:22:15 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:13 -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=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=hId+N/iVvu8tR9RGnYK8oOaivh5PSFr5//0/wBhvo16lwjrth7lA0j18PYn2yRfVXh jAQwhocMbv/zPnIyj2AAff8TYR0pSULB2vl3Wm+a2YGKFmeKWs2iJdw9UBbkDrXmo5gg tgA2ID8qQeFStLWdxL4E7foPglCIW9ItZncHUTAd+56YeX6gGC/XGllFtX0Oq+gnglfU qd4kBPkte1/QPg8DfwAxa/7s+wvKENmCIu4gN+o9wtxqJ0q2U/1qMYK2mi4kfx3bc6UG 7gxynAvlnDLvTsHtImhh9PhNxiMKYspATHVTl+SwTQqAkeFCAryP+m2PT3xVyptmNbqC AdYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=c7CR/wddgFSZSMXjqiZ3c+hVM5RFbYk6S3XcgL6F5NAVFScnK2KB9AqkcKsmVi16ak KK806FIS55zL25UUqH9AQb3YV5RFf7HkbG6EgV97QKq5oxpqOqPuX3uUjO+ac1voDeAY 28BS/oSNYk/nBJGR4UNAv1A5gyernee2jxxoe0n++K8dJb+uxIUrn0RjwKKO57PbXnO4 Yv5NWceHLoOr4X4XP97aPkThjDz6A6qRywnTEbAlN2JMsk7HUIdvyrz6WL+dEZj0fLyt xYtNbTPJrEt/jVzN+WiGiYC+3Lwe8p1/FBu7jlHzh2mS4sAn4p7rnM6k5MNF8DzenDjM EWwA== X-Gm-Message-State: AOAM532wbl6VuWKP4KwGlblfB2C3kFuHPrmUag/ipUODAQQEhZuX0WQd 1pnpOVwfvSikEm0kER3zBwbv+xXnTL9ghg== X-Google-Smtp-Source: ABdhPJyby/J2NoemUptFn9a6OX5xKDgJzKBMb0q8qPWSTnYvhowDcxmUH+MPWh7R9LNYVMdCP6gk0g== X-Received: by 2002:a17:902:6b07:b0:13e:d5ba:3d8f with SMTP id o7-20020a1709026b0700b0013ed5ba3d8fmr31105481plk.32.1634055734165; Tue, 12 Oct 2021 09:22:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 17/23] target/riscv: Remove dead code after exception Date: Tue, 12 Oct 2021 09:21:53 -0700 Message-Id: <20211012162159.471406-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056571105100001 Content-Type: text/plain; charset="utf-8" We have already set DISAS_NORETURN in generate_exception, which makes the exit_tb unreachable. Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn_trans/trans_privileged.c.inc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/riscv/insn_trans/trans_privileged.c.inc b/target/riscv/= insn_trans/trans_privileged.c.inc index 32312be202..a7afcb15ce 100644 --- a/target/riscv/insn_trans/trans_privileged.c.inc +++ b/target/riscv/insn_trans/trans_privileged.c.inc @@ -22,8 +22,6 @@ static bool trans_ecall(DisasContext *ctx, arg_ecall *a) { /* always generates U-level ECALL, fixed in do_interrupt handler */ generate_exception(ctx, RISCV_EXCP_U_ECALL); - exit_tb(ctx); /* no chaining */ - ctx->base.is_jmp =3D DISAS_NORETURN; return true; } =20 @@ -60,13 +58,11 @@ static bool trans_ebreak(DisasContext *ctx, arg_ebreak = *a) post =3D opcode_at(&ctx->base, post_addr); } =20 - if (pre =3D=3D 0x01f01013 && ebreak =3D=3D 0x00100073 && post =3D=3D = 0x40705013) { + if (pre =3D=3D 0x01f01013 && ebreak =3D=3D 0x00100073 && post =3D=3D 0= x40705013) { generate_exception(ctx, RISCV_EXCP_SEMIHOST); } else { generate_exception(ctx, RISCV_EXCP_BREAKPOINT); } - exit_tb(ctx); /* no chaining */ - ctx->base.is_jmp =3D DISAS_NORETURN; return true; } =20 --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056471; cv=none; d=zohomail.com; s=zohoarc; b=Hw2xZvGd2OX6XjgMSqC3iwXoIIUUfPSnShCNyftXN4CBSQg+u3ePxD6Tny+LVnTxIJH+tCyzk7lB7SLgHxWrD01ycgEfl+zSXGdksjQpB/8k0lA/uaffamZQt1ZRCvvzIDaZrN7qB8sLiXaXp7qCwUNoZ4EJeHflI7pHqwp2Uac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056471; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OsVHscHYtLfwDDw+tqvsDJaaSG6z+QDdlNvtyfnUTaI=; b=VCZ9n658/AHcgWGyPcEwhW2FX6IYAQ1HR2pnXgG3fHKyeCScvYU/JvRGPdHQhuY2Zv+ArGuUA5EJbkY28jWxi0E5zPm8dS0AP/IjQEsx5cbaVUtCvBM3VMooWSbgTtGpqFjfcxSz+rn1eFcbnWKP7yEpXRy6Z3f5dU1VaBq3re0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056471358863.270538879542; Tue, 12 Oct 2021 09:34:31 -0700 (PDT) Received: from localhost ([::1]:50350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKjW-0002OB-CN for importer@patchew.org; Tue, 12 Oct 2021 12:34:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXj-0006hE-GL for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:19 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:45048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXg-00049z-CK for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:19 -0400 Received: by mail-pl1-x629.google.com with SMTP id t11so13829970plq.11 for ; Tue, 12 Oct 2021 09:22:15 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:14 -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=OsVHscHYtLfwDDw+tqvsDJaaSG6z+QDdlNvtyfnUTaI=; b=hIinLvsOQNH/8xHp6OJmOeLtdm0mLeBg16ib5xOoyajRzbBqCXQSlM0CDloIZxXern T3XTttM8MPn4dZWa4nMTOmO8fF8AOFh8ajSwyJ9QaBRwlw14Vk+Zls60TUN3EmObk87C nI0rd/x1jnP7jhYudRIKvq3RTIo34r8IeW6J+poCube2MaziUTsFpTFx6hhs4p9N+Zi+ yGrkSBBBF3HEPW6ujYogzA+jV4s5qG29lZkPevfrJk+/KXPfUuuH8wTg4DLbPaItCWQ3 NW5MfcJ8gZajWlEPWtQTcxQHs1i1RJYOHiJ7WFrq9AzJRKV9wwnDK04RsD3yR7BYKYTM m0JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OsVHscHYtLfwDDw+tqvsDJaaSG6z+QDdlNvtyfnUTaI=; b=lCZE3YMCldFTDf+gb68JmIRD7lrP9MYq7EXqNHelJvYMm4IEBcON70NWsyUcRFuJSi gttDihV5xvSMhcCWCuNWN5sSkyrji3vz2Fjeu+x19lo9KIhz1eWglis1M9MALx2sidrR tHNViUB6gvik7ZpxhQuGhBGk0nf4oMvD+wJEf6gN7hYpd99RDjeTmXdim77TEICU+6eF Oq+n0F75acoKPf7KFp/hoYsZ1i872HaAdO3M4VsBOWm4ThqtgcXE2bCLXBJTtgU51iiO TD51yFXPhHCifn0P6vELmt9EA7vrC9XuCHiNYF1qTQjSmn/4nN6IzS6MxvAODWGf+aSO WOZQ== X-Gm-Message-State: AOAM531A01UWOd2iis5gibWKB4LP0M9w8HcfUOdTtLR6g6TA0LzXnjQz ONJD41tzpKeUgNO6Z9LfPfeROBQutPdEhA== X-Google-Smtp-Source: ABdhPJydasuXV9kNPy+BFmn/gWR8HJKnX2/jEDdkjuaZVbQLQ1HHEiovxbFxbnOs7H8WHDv1mW18ZA== X-Received: by 2002:a17:90b:4f46:: with SMTP id pj6mr7213794pjb.63.1634055734994; Tue, 12 Oct 2021 09:22:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 18/23] target/riscv: Remove exit_tb and lookup_and_goto_ptr Date: Tue, 12 Oct 2021 09:21:54 -0700 Message-Id: <20211012162159.471406-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056471773100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically, which means we don't need to do anything in the wrappers. Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/translate.c | 27 +------------------ .../riscv/insn_trans/trans_privileged.c.inc | 4 +-- target/riscv/insn_trans/trans_rvi.c.inc | 8 +++--- target/riscv/insn_trans/trans_rvv.c.inc | 2 +- 4 files changed, 7 insertions(+), 34 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index d2442f0cf5..6d7fbca1fa 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -149,31 +149,6 @@ static void generate_exception_mtval(DisasContext *ctx= , int excp) ctx->base.is_jmp =3D DISAS_NORETURN; } =20 -static void gen_exception_debug(void) -{ - gen_helper_raise_exception(cpu_env, tcg_constant_i32(EXCP_DEBUG)); -} - -/* Wrapper around tcg_gen_exit_tb that handles single stepping */ -static void exit_tb(DisasContext *ctx) -{ - if (ctx->base.singlestep_enabled) { - gen_exception_debug(); - } else { - tcg_gen_exit_tb(NULL, 0); - } -} - -/* Wrapper around tcg_gen_lookup_and_goto_ptr that handles single stepping= */ -static void lookup_and_goto_ptr(DisasContext *ctx) -{ - if (ctx->base.singlestep_enabled) { - gen_exception_debug(); - } else { - tcg_gen_lookup_and_goto_ptr(); - } -} - static void gen_exception_illegal(DisasContext *ctx) { generate_exception(ctx, RISCV_EXCP_ILLEGAL_INST); @@ -192,7 +167,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, targe= t_ulong dest) tcg_gen_exit_tb(ctx->base.tb, n); } else { tcg_gen_movi_tl(cpu_pc, dest); - lookup_and_goto_ptr(ctx); + tcg_gen_lookup_and_goto_ptr(); } } =20 diff --git a/target/riscv/insn_trans/trans_privileged.c.inc b/target/riscv/= insn_trans/trans_privileged.c.inc index a7afcb15ce..75c6ef80a6 100644 --- a/target/riscv/insn_trans/trans_privileged.c.inc +++ b/target/riscv/insn_trans/trans_privileged.c.inc @@ -78,7 +78,7 @@ static bool trans_sret(DisasContext *ctx, arg_sret *a) =20 if (has_ext(ctx, RVS)) { gen_helper_sret(cpu_pc, cpu_env, cpu_pc); - exit_tb(ctx); /* no chaining */ + tcg_gen_exit_tb(NULL, 0); /* no chaining */ ctx->base.is_jmp =3D DISAS_NORETURN; } else { return false; @@ -94,7 +94,7 @@ static bool trans_mret(DisasContext *ctx, arg_mret *a) #ifndef CONFIG_USER_ONLY tcg_gen_movi_tl(cpu_pc, ctx->base.pc_next); gen_helper_mret(cpu_pc, cpu_env, cpu_pc); - exit_tb(ctx); /* no chaining */ + tcg_gen_exit_tb(NULL, 0); /* no chaining */ ctx->base.is_jmp =3D DISAS_NORETURN; return true; #else diff --git a/target/riscv/insn_trans/trans_rvi.c.inc b/target/riscv/insn_tr= ans/trans_rvi.c.inc index 920ae0edb3..a6a57c94bb 100644 --- a/target/riscv/insn_trans/trans_rvi.c.inc +++ b/target/riscv/insn_trans/trans_rvi.c.inc @@ -71,9 +71,7 @@ static bool trans_jalr(DisasContext *ctx, arg_jalr *a) if (a->rd !=3D 0) { tcg_gen_movi_tl(cpu_gpr[a->rd], ctx->pc_succ_insn); } - - /* No chaining with JALR. */ - lookup_and_goto_ptr(ctx); + tcg_gen_lookup_and_goto_ptr(); =20 if (misaligned) { gen_set_label(misaligned); @@ -421,7 +419,7 @@ static bool trans_fence_i(DisasContext *ctx, arg_fence_= i *a) * however we need to end the translation block */ tcg_gen_movi_tl(cpu_pc, ctx->pc_succ_insn); - exit_tb(ctx); + tcg_gen_exit_tb(NULL, 0); ctx->base.is_jmp =3D DISAS_NORETURN; return true; } @@ -430,7 +428,7 @@ static bool do_csr_post(DisasContext *ctx) { /* We may have changed important cpu state -- exit to main loop. */ tcg_gen_movi_tl(cpu_pc, ctx->pc_succ_insn); - exit_tb(ctx); + tcg_gen_exit_tb(NULL, 0); ctx->base.is_jmp =3D DISAS_NORETURN; return true; } diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_tr= ans/trans_rvv.c.inc index fa451938f1..081a5ca34d 100644 --- a/target/riscv/insn_trans/trans_rvv.c.inc +++ b/target/riscv/insn_trans/trans_rvv.c.inc @@ -41,7 +41,7 @@ static bool trans_vsetvl(DisasContext *ctx, arg_vsetvl *a) gen_set_gpr(ctx, a->rd, dst); =20 tcg_gen_movi_tl(cpu_pc, ctx->pc_succ_insn); - lookup_and_goto_ptr(ctx); + tcg_gen_lookup_and_goto_ptr(); ctx->base.is_jmp =3D DISAS_NORETURN; return true; } --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056707; cv=none; d=zohomail.com; s=zohoarc; b=KV2vNXOwhxJwd5aAqMTQr/3hPB0Fr3XDrSFB62hYzeBSiqSXzNR7+DsrlQ5cDHgkwY5BnOJsuYSc1/gFt3EkBMLXmk9zUq36FLEDso+NZJw+4uXobfgW76fa6/V4mbwUFJfATOKq0WDwRnjD1wxqvdAWKFKVVfF91/8p8xZQzG8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056707; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=e1o+LTNCDTCEYnibXAgW5W5UXTzPq2g9X5wgbhLcsnA=; b=EDXGK2yOodwwAt5NYFFYF68ohGQxUgpVGBvT/Ma8Xc5lpniF0hABoY3vg8Q2GVCkXrlCyJKuaPuAuq/voscpXqd4BIRXwzggF30A5a4Mu8DDvBvx6SGB//XedWEEXCGGJLsKuy0uPIZomL/Zknl+5OaIAHCEZWkxR4f1yVVhca0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163405670783696.86066619813096; Tue, 12 Oct 2021 09:38:27 -0700 (PDT) Received: from localhost ([::1]:60680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKnK-000168-PG for importer@patchew.org; Tue, 12 Oct 2021 12:38:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXl-0006oH-5v for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:21 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:35381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXh-0004AJ-6o for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:20 -0400 Received: by mail-pj1-x1036.google.com with SMTP id d13-20020a17090ad3cd00b0019e746f7bd4so2310545pjw.0 for ; Tue, 12 Oct 2021 09:22:16 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:15 -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=e1o+LTNCDTCEYnibXAgW5W5UXTzPq2g9X5wgbhLcsnA=; b=EKMRS9lCc0gvT2CEndKhNcQsPmreXg7ubbG4vjldMDCWEVMzvq/PYDU51wFbgUq6GW JJ4dRfgE4s/MigG80GLjYWvtCu+bSJESEem97jGb9g7+pb7NtgBBFMlpiA4GzImUCjyj pQLjmKXg+FyXrXy4UYau8tVtQCf3xikWKTdlQCrHTtFi08qT5q6alNjmwbzxnRobCnja 4eE7vFIVzGMKiojhL908A3VGzbqlusxj2oSA4jiETmilvLV7OasD+00j2HT1auNYafF+ Z92D0ZFbcNW0QOrNye3rOdajeOgBhQHKu6DZ5hgBhG2clBEj9eMC7TovcFVT/Z4vH7+2 ncYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e1o+LTNCDTCEYnibXAgW5W5UXTzPq2g9X5wgbhLcsnA=; b=5kwkvr7coga3KGAyGZxgTMdiqRtogSmDWxSWCzIbreSifCq2676dV+OPSffkPonc3Z DL2Y0WXqURWIEdDuqZzAIvehcNW/d7rv+ZPnD+Wid6dAw/4wPD+yRT8x1nNKXulZIrSu p3ffaCuIhBiZiP20UPmbLbfFxV/ZSUEnaDT0bcwOlxomFMsbOk5QbBGWc+BYeJGGg2y+ V76TSeAuQZjrxjXALwXA8wZJv1mRBsIB4sccwkGBb8WhKBwe1PPE4HhrEy+eFyOK/NC6 pTrk9P0BOkG/QzGw70gDxKAbwZniSal1sctzUTsBH4rqP2Wbw/oQZ7y7KL2Vxp4OlaH8 oyxQ== X-Gm-Message-State: AOAM533W/aV5FXeCCrIETQBpfLX3K+GTdm0/kZ6Lg3GtOIJ49jOl/V10 J+o4Y1hPmdKL+E8eDN3WYiygOitloMmSQg== X-Google-Smtp-Source: ABdhPJwp6Il8Msz0mJ/+CfKhjcUs8sliUmHSCVZJlfwdCEFDX7goccA3uhpBVXp8WPuWgKL3knSSsg== X-Received: by 2002:a17:902:d4ca:b0:13f:36bb:9b20 with SMTP id o10-20020a170902d4ca00b0013f36bb9b20mr12957877plg.1.1634055735856; Tue, 12 Oct 2021 09:22:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 19/23] target/rx: Drop checks for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:55 -0700 Message-Id: <20211012162159.471406-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056709949100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/rx/helper.h | 1 - target/rx/op_helper.c | 8 -------- target/rx/translate.c | 12 ++---------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/target/rx/helper.h b/target/rx/helper.h index f0b7ebbbf7..ebb4739474 100644 --- a/target/rx/helper.h +++ b/target/rx/helper.h @@ -2,7 +2,6 @@ DEF_HELPER_1(raise_illegal_instruction, noreturn, env) DEF_HELPER_1(raise_access_fault, noreturn, env) DEF_HELPER_1(raise_privilege_violation, noreturn, env) DEF_HELPER_1(wait, noreturn, env) -DEF_HELPER_1(debug, noreturn, env) DEF_HELPER_2(rxint, noreturn, env, i32) DEF_HELPER_1(rxbrk, noreturn, env) DEF_HELPER_FLAGS_3(fadd, TCG_CALL_NO_WG, f32, env, f32, f32) diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index 4d315b4449..11f952d340 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -451,14 +451,6 @@ void QEMU_NORETURN helper_wait(CPURXState *env) raise_exception(env, EXCP_HLT, 0); } =20 -void QEMU_NORETURN helper_debug(CPURXState *env) -{ - CPUState *cs =3D env_cpu(env); - - cs->exception_index =3D EXCP_DEBUG; - cpu_loop_exit(cs); -} - void QEMU_NORETURN helper_rxint(CPURXState *env, uint32_t vec) { raise_exception(env, 0x100 + vec, 0); diff --git a/target/rx/translate.c b/target/rx/translate.c index a3cf720455..5db8f79a82 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -150,11 +150,7 @@ static void gen_goto_tb(DisasContext *dc, int n, targe= t_ulong dest) tcg_gen_exit_tb(dc->base.tb, n); } else { tcg_gen_movi_i32(cpu_pc, dest); - if (dc->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); } dc->base.is_jmp =3D DISAS_NORETURN; } @@ -2331,11 +2327,7 @@ static void rx_tr_tb_stop(DisasContextBase *dcbase, = CPUState *cs) gen_goto_tb(ctx, 0, dcbase->pc_next); break; case DISAS_JUMP: - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); break; case DISAS_UPDATE: tcg_gen_movi_i32(cpu_pc, ctx->base.pc_next); --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056743; cv=none; d=zohomail.com; s=zohoarc; b=dxE+fqKW6eETA8zm9aYgS7F7/KD+jh+FeEhFzOTfeVHG0gQV0howF7O/zUKY5qkBUT3RnBnyGmNFHUApKJSYwhmHA1feYr9HyjKueF1xzKZSM0krqzDUciZ563kQdHVvFqjBnEeQwIsnV1jc8zoCO0nSZLwfdYqY5kUZ0FTsyLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056743; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=md7tXLcF0ecrK6xLXX0Gaf8SSiO+KoPjDXsFC2Tw3gE=; b=JzrGJQjeYDeDynUp4DdmAXD56Mp1SDSo57cxfaAeRouspyjQQU6IP5fu+i9jMuaStZnlo/rn+EyQhoO6gG9S+reoBVfri+ysfSqw+qUZIviSuCHIzFo8TTDKlWW7rL2/Vfc9ZAgj9Gf8RC+d0ky3Tf0HUe8aihO7XIV8+DqT6GY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056743606997.8347181659886; Tue, 12 Oct 2021 09:39:03 -0700 (PDT) Received: from localhost ([::1]:34838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKnu-0002i3-CO for importer@patchew.org; Tue, 12 Oct 2021 12:39:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXl-0006qQ-NG for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:21 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:41488) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXh-0004BR-Sv for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:21 -0400 Received: by mail-pj1-x102a.google.com with SMTP id na16-20020a17090b4c1000b0019f5bb661f9so55014pjb.0 for ; Tue, 12 Oct 2021 09:22:17 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:16 -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=md7tXLcF0ecrK6xLXX0Gaf8SSiO+KoPjDXsFC2Tw3gE=; b=O+qkl0iOTqjJj0oQS4GPG33LtmYyJ4spxoCxPs1Ih6oalkjNKTNnMZrtiDK6PcItj/ jUtSOtpkCpWBXho3j1issk+g5qwpkbgQIS9FR74Ur7gxqV5pqnmuogU+D48RAMwDlIl+ PgPJDz2+U1iqVL4lQNAuxIqygcQJOiyqqlbBK1r7X5/iXLI1kFSfKD7+Hbb/FnaG6eUp UXZti1X4EEOJRI+I9Vdh1iWgGoSL2phv2+98z45jIwWt5Vs3AEhVBB75JLJKdH442J2x HxqY0IqjQKIkJIiDCZbC7RjL8g+9wxoSWxynoTKJrxKRFaNd/ztDgqZPTSrnvNTvDG+E F7Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=md7tXLcF0ecrK6xLXX0Gaf8SSiO+KoPjDXsFC2Tw3gE=; b=iGUYUFs+a8vLeA/TepjQBGdRe7fPqfHrFj3uMMZrfOFfuX21wNdwCHNTEafBUSjYLP n5TxReUqKj+x9MHQ0Ej/uERdvP3kYLqLHvSalQoy74uCoiEbcjVir86KejpEJwcscInV cVwxWOcE/+PAZDmYtuWfM9qfhkNQIux1fYCGL1n/BsRGXVsWKCzYaaMnJsgFe2ceT32x P9F6LfZw8soT9idNpovd58Wwk7w6qWPjHYsVAMc86SF3DHODoQIqDY2DdnogBHfJ34Dy 6cyOhJwhgovqpgiqeqDHfys2+D9kzy3UagLTbuAnxm8c/2X3uhTwaC/Oogn+sk0uSS2R 5kFA== X-Gm-Message-State: AOAM533Y70C3NN3d6buOHImTBc6rW1xZxte7EpLg/y8ZcoW/le8BiHug hBlUtYGH1TJnjo/1Jp+d99e3zCztzdmcpw== X-Google-Smtp-Source: ABdhPJxATHwyqHDmwueLE4MC+lI1xdDT8liMaBPgEyUFwUF70Khm8Dh2Qv4SXdCJ2VkiRKuBU4VwEQ== X-Received: by 2002:a17:902:ed0b:b0:13f:4318:491a with SMTP id b11-20020a170902ed0b00b0013f4318491amr9656773pld.4.1634055736555; Tue, 12 Oct 2021 09:22:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 20/23] target/s390x: Drop check for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:56 -0700 Message-Id: <20211012162159.471406-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056744399100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index f284870cd2..0cbec29f2f 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -148,7 +148,6 @@ struct DisasContext { uint64_t pc_tmp; uint32_t ilen; enum cc_op cc_op; - bool do_debug; }; =20 /* Information carried about a condition to be evaluated. */ @@ -6543,7 +6542,6 @@ static void s390x_tr_init_disas_context(DisasContextB= ase *dcbase, CPUState *cs) =20 dc->cc_op =3D CC_OP_DYNAMIC; dc->ex_value =3D dc->base.tb->cs_base; - dc->do_debug =3D dc->base.singlestep_enabled; } =20 static void s390x_tr_tb_start(DisasContextBase *db, CPUState *cs) @@ -6590,10 +6588,8 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbas= e, CPUState *cs) /* FALLTHRU */ case DISAS_PC_CC_UPDATED: /* Exit the TB, either by raising a debug exception or by return. = */ - if (dc->do_debug) { - gen_exception(EXCP_DEBUG); - } else if ((dc->base.tb->flags & FLAG_MASK_PER) || - dc->base.is_jmp =3D=3D DISAS_PC_STALE_NOCHAIN) { + if ((dc->base.tb->flags & FLAG_MASK_PER) || + dc->base.is_jmp =3D=3D DISAS_PC_STALE_NOCHAIN) { tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056605; cv=none; d=zohomail.com; s=zohoarc; b=irHGMHg4vgNQsiLZSG9Idk1ylvJv7r5I4N/nV7t433H4EkoFa4Suphsdl9Ac0LzI2ascgNZe609fiIbG7HSrour5N8EdCzqLr8Wtm5aobhzg2gtH2IngSKOTyzWgF3tF3UaFE0q8Qeinfdk5/bUJJouIr7Mh6E1bb0K24Mb3UbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056605; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Lhm3i8dv7cISRiranLLYJSVbRTBKDG8gMQNChvdAMxQ=; b=jDOCWf83u+9JDl17rW4GefnNBR6RiiA09A8IzV3EkzKmo6apUxFi6lFEd8S2OL1PPJiLL6+W76sNw7tgaPV3BNW6+CGAMLROEESF6oGJ0pVs5Fk7ugCqwwljYPOzJDOwClUx8aC2MfwwFtBSaCDGb2zUMFHNMuMklgFnOe8D9GU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056605015224.7953368921992; Tue, 12 Oct 2021 09:36:45 -0700 (PDT) Received: from localhost ([::1]:56766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKlg-0006qA-1r for importer@patchew.org; Tue, 12 Oct 2021 12:36:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXk-0006nL-Ue for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:20 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:45606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXi-0004C4-Uw for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:20 -0400 Received: by mail-pj1-x102a.google.com with SMTP id ls14-20020a17090b350e00b001a00e2251c8so2983778pjb.4 for ; Tue, 12 Oct 2021 09:22:18 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lhm3i8dv7cISRiranLLYJSVbRTBKDG8gMQNChvdAMxQ=; b=u9MUfGtAqEYcv+bFp8Rll9r7+CUk2XRXOHpF52nsbrmw13/E41iLrk6OKkkZCE4VUF gQk2eEFX3hHXrGmJXBtwCgpKVybWtx64seE0SEuJ9QZHxFfFm4x4fP9xLAVzRPB3jPE8 I3k5p/2z/BKpOM1PF56rHAWoP1woVcoBHRCVuWmyZ+TU+HFG+29+caASrdR0Av6G3jaJ 4D0PaU0WqT2sba9ln7YFhpJOOABYe/m7chrAwKnynzSTtd9NjNeHacBob++y0XSaCgXU mR2vfC4BmjoqVXdAIoZwgpx1P+HS9RlmZ/A54IK27gCQe03kS52GOZ/PrUgroCMytqcA rsqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Lhm3i8dv7cISRiranLLYJSVbRTBKDG8gMQNChvdAMxQ=; b=um/VEybKdZk1JEGpewex9zRunvzpQKw99dFM5heO5NkJyLKN5WuolT5MGR6FE6wt52 KzaZseMhQf+naxQNQJoYzXbTYWBHq4JxxpK8mketxchsObjym+mgno6u21xmm1cSc+mo VwEx+UQltxTSKjFymOhtZNZUpsEVQ4C2FT/w3pWW/J7yyuRJqusIHjM/lr6XmoCV7b7O WYiblGQdt2O2M1hPV9T+FJZi0o3C753WjxRhO/788/n9PoKn/tkq/RCYifn58TIjLQm3 pnmbZ4PUHDjv9kmq835UoG2nfWd+HArbODfvTu2D6iiNxdQetsymyJKqJMZjAXV57jCr eDSw== X-Gm-Message-State: AOAM533q1GLaGlIdKBFAeNzFXur7WB1VDD0wFxD8h5YXhXwps4ri5RBX hCBV+7YdbGmuRgPSWxXKxXyJVgS5NF0oDQ== X-Google-Smtp-Source: ABdhPJyy1gLwLvUKlzDsspFyE4Cl7GNSsLII0IWr9uEmj9KLwJQvlJQXCyGyD3ZYHW/fbw9L3K3P/w== X-Received: by 2002:a17:902:a3c9:b0:13e:2e41:2a76 with SMTP id q9-20020a170902a3c900b0013e2e412a76mr30858364plb.43.1634055737525; Tue, 12 Oct 2021 09:22:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 21/23] target/sh4: Drop check for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:57 -0700 Message-Id: <20211012162159.471406-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056605917100001 GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daud=C3=A9 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(-) 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); } =20 -void helper_debug(CPUSH4State *env) -{ - raise_exception(env, EXCP_DEBUG, 0); -} - void helper_sleep(CPUSH4State *env) { CPUState *cs =3D env_cpu(env); diff --git a/target/sh4/translate.c b/target/sh4/translate.c index d363050272..ce5d674a52 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -240,9 +240,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, targe= t_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: --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634057021; cv=none; d=zohomail.com; s=zohoarc; b=RnxxJzuZNtWRe7lCSnArV3TPshiO+BhSO0tIggdUrqXX0IGT+w85ZLbvlCd6lzr1Z6TcidTTsD7HKXo05cGI+H30KT5MCoFLB0aisZJwWVMzCxrQhDBsiuQzzhlNLF2Msrp/Yri77XD34p1t49+Ez6wVvuwGON7HdChkyJlICyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634057021; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lWWxg8MR6KKJ1tBQpQnAGh32uFzHWDCE77XSSdScV5I=; b=jqm2t/MOOP0dVO+RRG7uuSYesagtdFlaC1fw1o0QC5CworLp0TQbx9a3ETmZLQZuFVTpII01MK+PAQzHnp02EiNWnjVKgxywODsxLdcx74o3w9E5LXdQO6TuIf1k3r/lIT6VJxJUSoww2lirxMpmhrgbQd+Zqcp3N2oD88O7kck= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634057021030239.6355537175574; Tue, 12 Oct 2021 09:43:41 -0700 (PDT) Received: from localhost ([::1]:44342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKsO-0001CP-1N for importer@patchew.org; Tue, 12 Oct 2021 12:43:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXm-0006sw-DX for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:22 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:40728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXj-0004CS-O9 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:22 -0400 Received: by mail-pl1-x62d.google.com with SMTP id v20so6774646plo.7 for ; Tue, 12 Oct 2021 09:22:19 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:17 -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=lWWxg8MR6KKJ1tBQpQnAGh32uFzHWDCE77XSSdScV5I=; b=kfdVtP6RD4L9n8aInOd1qojHZTDc8MshQLR3Uc2IkKwBjwPzDINwZEZW31t243xRA+ 3t97Yg136Yp4uM/qBk53eHHk5kGUCDCF/yp8JAV/dP6HxGMeYg9eRQse8EtfZ6G32j8P bTm4F83Wpfxa6F18Ki8Wl5kyjNT+aZuWMXlzxUypUnhSa1oRYdz0FRXZKGn2oHY4PSfb HkPIkVJTSEIy8EVk+Y0QUXtgJqmWlflDvqMYLNgN7o+sGEH069yFwzB3dcMMbNV9giEt g0HvfTAfqysXMGy51BUqp70LaNIa7n+xojXwPath9inhks+0Te2a5hhNXeIH7eaGagTn vVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lWWxg8MR6KKJ1tBQpQnAGh32uFzHWDCE77XSSdScV5I=; b=RXOVoc0faDRE84SYJA6EAbfkt8O/9tbvioHeNPT6VfC94pi7S7TuI2fHkqoXLuCWK3 Wco8hi9C5WOG32OqXShP7UsfZE//k7N6RDDcL2lPz/8ZutTY5CmJ2PDJ4rDCf5/ot4mR hYMguTn3ok9jfApo4rEw0NGvbUQaN7cpeUSh3a+yWUiThpi0iIBlj64LLT2iQyp7ulxz Bu2fzKphawy1jZzlm35KLFX9smFQX7WOEtJj7c98Z3YCj994BlYHPcFYa6mti4iwPAdd dylWg6U/RGEGTIwPH2xqehIH33QY982D0m/E8oLbJ6qMKHnQeEjxhVSPKjheWlLbvYVI jqUw== X-Gm-Message-State: AOAM530yqweLt8MwG4zt35J58XR2JvtmKx9vn2QKDf1xnaf0R0SJd3Wq YZKjmVSpb2DfiR/q6c7eIhlE53rNseJaCw== X-Google-Smtp-Source: ABdhPJyTh7VjjvMs1UOcf7oj8TU1uodKMmnISEoD/sUPbSyl7TVsAMfXZOBREKLNS+kCFOsC/obfdA== X-Received: by 2002:a17:90a:5d8c:: with SMTP id t12mr7202898pji.98.1634055738251; Tue, 12 Oct 2021 09:22:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 22/23] target/tricore: Drop check for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:58 -0700 Message-Id: <20211012162159.471406-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634057023353100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/tricore/helper.h | 1 - target/tricore/op_helper.c | 7 ------- target/tricore/translate.c | 14 +------------- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/target/tricore/helper.h b/target/tricore/helper.h index 78176aa17a..b64780c37d 100644 --- a/target/tricore/helper.h +++ b/target/tricore/helper.h @@ -153,4 +153,3 @@ DEF_HELPER_2(psw_write, void, env, i32) DEF_HELPER_1(psw_read, i32, env) /* Exceptions */ DEF_HELPER_3(raise_exception_sync, noreturn, env, i32, i32) -DEF_HELPER_2(qemu_excp, noreturn, env, i32) diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 32c2bc1699..9476d10d00 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -107,13 +107,6 @@ static void raise_exception_sync_helper(CPUTriCoreStat= e *env, uint32_t class, raise_exception_sync_internal(env, class, tin, pc, 0); } =20 -void helper_qemu_excp(CPUTriCoreState *env, uint32_t excp) -{ - CPUState *cs =3D env_cpu(env); - cs->exception_index =3D excp; - cpu_loop_exit(cs); -} - /* Addressing mode helper */ =20 static uint16_t reverse16(uint16_t val) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index a0cc0f1cb3..07084407cb 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -3225,14 +3225,6 @@ static inline void gen_save_pc(target_ulong pc) tcg_gen_movi_tl(cpu_PC, pc); } =20 -static void generate_qemu_excp(DisasContext *ctx, int excp) -{ - TCGv_i32 tmp =3D tcg_const_i32(excp); - gen_helper_qemu_excp(cpu_env, tmp); - ctx->base.is_jmp =3D DISAS_NORETURN; - tcg_temp_free(tmp); -} - static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { if (translator_use_goto_tb(&ctx->base, dest)) { @@ -3241,11 +3233,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, ta= rget_ulong dest) tcg_gen_exit_tb(ctx->base.tb, n); } else { gen_save_pc(dest); - if (ctx->base.singlestep_enabled) { - generate_qemu_excp(ctx, EXCP_DEBUG); - } else { - tcg_gen_lookup_and_goto_ptr(); - } + tcg_gen_lookup_and_goto_ptr(); } } =20 --=20 2.25.1 From nobody Fri Mar 29 13:14:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634056174; cv=none; d=zohomail.com; s=zohoarc; b=D7QQnatxmXm4MU6VqQ39GuU9yPQNqcIg5HkvrDQpIr9K1ZKp3rYFgHiEycxjTFJ26DYWRlmNrmvXQ8tk2bG54YblCa32kLFdfVFrMlvic51lPyFz5KrUpvkcs6S1dilsIA8pbDxv193syD0p3nSYxb9StTG+UoE8K82NMqg9qKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634056174; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KpJskJGYG8NwOwmiH2Iu6UhY3Zn5zWd+0hF4Ppw0hnM=; b=lLFYAIDPeWXpfLY4XQJcdUum4xbNJoTCds2BUlnG8sLbrmM5l9zdeFamr62aUbrla3MazELkq6UpuXYyw10jLGVy0ViEJKZzWM2VJB0ETp2a/kGQuHaDB8jdfouJ9guKpevzg10z0g8uuDnYHM1EMWyrZ1wibDSAlXOX/lzj2i8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634056174878158.05235065878844; Tue, 12 Oct 2021 09:29:34 -0700 (PDT) Received: from localhost ([::1]:39266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKej-0003Ko-73 for importer@patchew.org; Tue, 12 Oct 2021 12:29:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKXm-0006tQ-DF for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:22 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:37376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKXk-0004DK-Fv for qemu-devel@nongnu.org; Tue, 12 Oct 2021 12:22:22 -0400 Received: by mail-pg1-x531.google.com with SMTP id r201so14340753pgr.4 for ; Tue, 12 Oct 2021 09:22:20 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id k190sm11525023pfd.211.2021.10.12.09.22.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 09:22:18 -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=KpJskJGYG8NwOwmiH2Iu6UhY3Zn5zWd+0hF4Ppw0hnM=; b=P2JX9NcqR9R9sJ10TUPmFcTmeWIoDAlBw3L0qaLGafmBiFA3xrR3zDq5kSHzIMfPel Ga3XW9U1/nf64gfjaVHtx0UreRll658cqEi2Ceyx+89P+G/8FBfa/I04IiWnkGTKy+cJ eQopVOpWlBA67r0dGGN/rF6DlesxVUjqt5oRDiHZMrBF1Ar2hB9FaT3nYIXn1d8XCIsn YeYpz0dDUgNxPJwVFFiPokMHo9LWfIdvc0LyHDzS6yetpJxVaM4dXUlQMmPEari7Ttr1 Vq0uv3HzqyqvDvMlZTDE3GbA2Se2ik+OtY1tGwaXpL/pkPAFZ7p7wr0NvzUNm/30yvIg aM3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KpJskJGYG8NwOwmiH2Iu6UhY3Zn5zWd+0hF4Ppw0hnM=; b=g+BiI4zid8xQwKm7ZKhTdyy8aq7rwJfiqsC3v7odbqpby+nNIohMljCSUNWzTZ25g3 fyMMXQuaahDOsxLLm3HfyUop7UkBKzfvk+5gktqJa5RFmkYeQP50D6FO+//J3wBWz7sM pKj5yNYxd9Mj2qxQ432kYBeZY3VpErF+OjSV7NzlisbuJ0d35Kc2mUQ/LW8JvTwHaBlC DhuJf7mbKYENc90voHji1fJvhVYeQ91hFS5tb2lNukd/oyv3pdJqYoFbbQ9TCB+lNzDG /pe+3awGlJedFmxr3Y+FyEN5o4UvJ2tl3cMAHJPyBvlfdRqKyX1F4EksFOJ7e+cbRkJD Igbw== X-Gm-Message-State: AOAM532bNjIk6kANWYOEGr2PgfTkOVFcBlcJxMnP86FGTNeGrL7PIg5Y HnSUqCwEAwJuuMq2d4FFig14W2hrd5+mPw== X-Google-Smtp-Source: ABdhPJzm+ZRX/sZhW7+wv57k9o55HXJLDSy88lE7jqAQcA1OLMNUgukqLdyshePexMSkIHG0MSepXQ== X-Received: by 2002:aa7:978b:0:b0:44c:abf1:a8b8 with SMTP id o11-20020aa7978b000000b0044cabf1a8b8mr32699395pfp.35.1634055739093; Tue, 12 Oct 2021 09:22:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 23/23] target/xtensa: Drop check for singlestep_enabled Date: Tue, 12 Oct 2021 09:21:59 -0700 Message-Id: <20211012162159.471406-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012162159.471406-1-richard.henderson@linaro.org> References: <20211012162159.471406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1634056175595100001 Content-Type: text/plain; charset="utf-8" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index dcf6b500ef..09430c1bf9 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -382,18 +382,14 @@ static void gen_jump_slot(DisasContext *dc, TCGv dest= , int slot) if (dc->icount) { tcg_gen_mov_i32(cpu_SR[ICOUNT], dc->next_icount); } - if (dc->base.singlestep_enabled) { - gen_exception(dc, EXCP_DEBUG); + if (dc->op_flags & XTENSA_OP_POSTPROCESS) { + slot =3D gen_postprocess(dc, slot); + } + if (slot >=3D 0) { + tcg_gen_goto_tb(slot); + tcg_gen_exit_tb(dc->base.tb, slot); } else { - if (dc->op_flags & XTENSA_OP_POSTPROCESS) { - slot =3D gen_postprocess(dc, slot); - } - if (slot >=3D 0) { - tcg_gen_goto_tb(slot); - tcg_gen_exit_tb(dc->base.tb, slot); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); } dc->base.is_jmp =3D DISAS_NORETURN; } @@ -1293,12 +1289,7 @@ static void xtensa_tr_tb_stop(DisasContextBase *dcba= se, CPUState *cpu) case DISAS_NORETURN: break; case DISAS_TOO_MANY: - if (dc->base.singlestep_enabled) { - tcg_gen_movi_i32(cpu_pc, dc->pc); - gen_exception(dc, EXCP_DEBUG); - } else { - gen_jumpi(dc, dc->pc, 0); - } + gen_jumpi(dc, dc->pc, 0); break; default: g_assert_not_reached(); --=20 2.25.1