From patchwork Wed Jul 21 06:41:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483238 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5903195jao; Tue, 20 Jul 2021 23:42:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1UAYIGmCYIQc01SDAUtQpCNI2bF2AM1t3VB7QqdKYe7+ByWUIHE2wZVYnXdJ9/ylJ8WY+ X-Received: by 2002:a25:7394:: with SMTP id o142mr45383656ybc.220.1626849759891; Tue, 20 Jul 2021 23:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626849759; cv=none; d=google.com; s=arc-20160816; b=AJNHi1+t4iPVU5V3kobt0vqTnzET9SsCZr8cT3FHXs6RTzxOjnDFIX5L92tod2N4hg /kYTguuP1N3cXNYQcybgeX811gUE0v5J8jU+BUUdVjX+IUiezUluc9V8fssWr6P32wgA PWrjsT3tL9A4D71rsLZ2U8Q6J+kU8gMBrGt5Eu+b+QKtioYTXC/hOgi+7R5KIQad8olc WUQ32fwFAec393/mEed3Ce4dya4GWekvJU6FXubFjROJ71ryIxX5EsOFi9/85/4uFbV8 r8cBRxTk4fj5vRTDiSDdjKaTNWRDh1xSs9/qQTVMJfuxSTkE6sWdUfJr2dNiHd5bZohJ royA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=geDxZApSmUqLJlF8yeLXrKLXpspgtXWGcFizFU4A/+s=; b=PPrb5zoYqvZydwv4qdlC1YyCQKDWyQQxMYv9NrYyKWvEpTC9DEE2GTZo9gsdDDUC5G 946bQ0jzh7idWD3spPGbWI5A88CHQQwD1MQM9hS8BTCM6SO6v8iXWNvgF2Z55HntEBSw bunNO6gV8rQLiOku72Qmyu9ZSuO4X2r7RaijrxuFlV9+gN1Jvn6BHfx1Plailg5xVbn+ CS1YF6KhRtinmUqRMCHsAVRckcSgx4y7apeSycFIK32/UrznSZDKDkOP31L9xEqDx5Aw Yjw6a2GoAGCvTrzy+FTsMCxcmu0jjz2XZtY9eqbnUmnFiS1V72q0Y9oYNpusgbngkrvg 5lOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d0LRJRxy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t39si30027716ybt.470.2021.07.20.23.42.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:42:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d0LRJRxy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m65wF-0004z8-CY for patch@linaro.org; Wed, 21 Jul 2021 02:42:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65ve-0004x7-6O for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:02 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:43646) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vc-0005Ka-Ql for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:01 -0400 Received: by mail-pl1-x62a.google.com with SMTP id b12so471440plh.10 for ; Tue, 20 Jul 2021 23:42:00 -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=geDxZApSmUqLJlF8yeLXrKLXpspgtXWGcFizFU4A/+s=; b=d0LRJRxy5wQYTQMGvkIbqouGclGE4cppIZV1Bi5MM/6vcRSDaxL4gKq8W0ioOqCSbt aL2qWmqSK5qYSvYyXZsImceKt4VoicMOi0qNMETj93nH05ozvIfyTQbWkiuZ6QZoDbkn NJ8X9x8TvRfQZVai7tc2mm+NbglodjywD9XeIf0WzW+Zq4g9N51e3ZEs3FHrZ+w7je2D AmmX3LWC/ZxvVL2cpjr0BTnD6Z3qL0nULlb8yCoBJ3IuIlYX6fZPBzlabSCPE415nasv JOxJzk3/yBc7iAJ6KuAU+DjBg1QljMp8KZdmOfADv1xVn3AOCbRduJ+Swf9/HkS6dEV7 H2UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=geDxZApSmUqLJlF8yeLXrKLXpspgtXWGcFizFU4A/+s=; b=N0KZ0lmM5KAMGEJebDUBMIp6Th9+ihyZPFGfQVVQj8z+CJ6HnJcqrBRibl99S7Q+DD J5oI/W3T3ferveMvEu1kJ6liJMgKpGEX4j5dzoXpwJ64g3toEN2c44tx+eD0YAcbAyAT OUHTqiGfsCuCuu0tYj1RtEzvncUeeqwXY0DvgDlLTIWz/bGFf8ixrkUdMukGDxjx+WQl lf9WP7HuvCQnWaFAo84o6/ONYvQBWh/xAgXlfKNn8COFSYsoGeyLqgwkZ1zIQaKpR0Qf ojWikXiQCf3b1Gg4ApFRkfm88nDDTnsFkbINIXD7MQ0il3h11Zi2YSoF0IVnhRnCZye/ x4Fw== X-Gm-Message-State: AOAM533eSYFITb1nMaq4YA6UGECRK+pJVWNVoJBkmlaJutylZXkobPjx osA6v0fFSy3vGqIn3kb+gAuG3+uVcBJJJg== X-Received: by 2002:a17:90a:e513:: with SMTP id t19mr34084096pjy.104.1626849719468; Tue, 20 Jul 2021 23:41:59 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.41.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:41:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 01/23] accel/tcg: Handle gdb singlestep in cpu_tb_exec Date: Tue, 20 Jul 2021 20:41:33 -1000 Message-Id: <20210721064155.645508-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(+) -- 2.25.1 diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index fc895cf51e..313f0b748e 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 == -1) { + cpu->exception_index = EXCP_DEBUG; + cpu_loop_exit(cpu); + } + return last_tb; } From patchwork Wed Jul 21 06:41:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483241 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5904736jao; Tue, 20 Jul 2021 23:45:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSpIJ7XVyHsifqFZPSW525cy9x2hRGOKa+syGEu7AkspKQ6+cJlfpbBD0SNOKJxragTxmu X-Received: by 2002:a05:620a:1423:: with SMTP id k3mr20268946qkj.311.1626849906378; Tue, 20 Jul 2021 23:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626849906; cv=none; d=google.com; s=arc-20160816; b=w/QAsJGD5zNy2gjkq6H6/e3dxiZwoQAOl4c3hNgjxjv3I+4C4XNejJKT8SIUdyHbhq VAy3MIAkzZlGrk5Owo9GlYSoc6TvFNazBiavlRLptM8JDnQm46qIDAWRFpWVLgpGzNYT Zh6FHkAnEQldzu6mDmW7B9kQ7u6aysrZjknIpF89JuS/CY86eNDZff1xWFWqArlEZO51 1Hy0qH6miUgpJj8j5y7YBsfububLpXVvPOz9OzO0ulp0d+49TNFtDBRGcu1r0OJetHJo t6IiPhi9T04kPxYeORGG6BT8jR3MjT6m1Fc7M89yugxMvhIZGzg3R7jhZxMjcvo/AS/u ZjGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QqOz2OAJuUMwPzqIuUXnZ3o9P6oZ5KjPCS5w95lKMNU=; b=LF6SeIml/wbEcpI1rMaNOCqwNAx+2WjE4nXyb3EfkhvFt3WhOrmmp2umzfwj2dY+Bq cO+koWYb8me08DDCZB5iE/C9u6ozRVuK8ci2breiUvXra8dOiykfZMmydaXRe7RmTns9 +JjPfz/0PWStLc2pu3rMrH1EqD9KoPXLzADebYKdE9K/mvSosfNT3jtGP1A1QISsJ/Hz HgP+bL1Pm8hYONjSFoBoq0DqvLQvzZ4memngSBmAb2zpf419+dDRuVMzslPHLbVFtKhL j1IKV8+l2tSkjusFMNSKNMrmvh2zvcbuGFvIZws+9+zFYFjyf9nODhS6o9GFRXclBUVl Wksw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kfNC2JA5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u13si16894214qvj.180.2021.07.20.23.45.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:45:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kfNC2JA5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m65yb-0001e2-K2 for patch@linaro.org; Wed, 21 Jul 2021 02:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vf-0004yJ-Bd for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:03 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:40674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vd-0005LW-OU for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:03 -0400 Received: by mail-pl1-x62d.google.com with SMTP id j3so479804plx.7 for ; Tue, 20 Jul 2021 23:42: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=QqOz2OAJuUMwPzqIuUXnZ3o9P6oZ5KjPCS5w95lKMNU=; b=kfNC2JA5o1/emXw5GG78iOojJqrt6yiF/8TD0WH9echZeWbSGXmDQaka6uTZJd8nP9 4GImG3AOQJt7V369ZPq7oNK8KpLQ3yFWkI0no4OdbIiPNbjUMtVZX68VHvj87Og/sVE1 PTQ5S/N6d4Oi05V9rx7IuYAU6DBvm+jmKOWtwutLLvvUNV8yxyKsvHUM7Xt+3uB32iy6 4x60a89UGfUyOPz6PLayiwo+LzfQKJh9D5F2lpY2GWKmbYC+kgNhrvtJunAcJzfOXjr9 PZVyAUzxjFLAgNRrcJ5klUG1nrHTZ7aIyzw/qqrIncu/Ln+8yA9rHYra83oveGpYZ313 ZiBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QqOz2OAJuUMwPzqIuUXnZ3o9P6oZ5KjPCS5w95lKMNU=; b=PYsAhPZU20VYHd7MtUQnzjpC0N7HHZd1kr2HQDDf/nsiBxCJVyrzAUvpTToANp1kSD 0jUbsgAyK+T49htZYCbnL65yOE2eo7KUjfdgjR5WtZAPKCeOSjhCO25/kiaJKa87XTqN Y5VY8fs2EIPizZtyFbla7L5D9b3leJ2dAeaJnA1+HTckVsEP99NbwUQw7daS0gcnP3CI aVVEbzI/U3S4gvxa9l9GebKAPaAbuwV9dYOR/6v0bbkySuZ/UV73i7qKiEpOF7Nbht+n wmgL72FkcB5t4i/yV96eMzIlv+JSSWxdzX9K2cemi7Pg4qjvjaTXZWFxLXScR/d0CQ/O +foA== X-Gm-Message-State: AOAM531/pzTJE9xNkW5DusrDWc++vo28wugAl7REbMYqrLt+wdU/0khi lGuakPFxY7Y7y7KpR3jJCC/0dphC9mTy3w== X-Received: by 2002:a17:90a:e612:: with SMTP id j18mr2430499pjy.196.1626849720534; Tue, 20 Jul 2021 23:42:00 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.41.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 02/23] target/alpha: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:34 -1000 Message-Id: <20210721064155.645508-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) -- 2.25.1 diff --git a/target/alpha/translate.c b/target/alpha/translate.c index de6c0a8439..cfb0c3d675 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -2998,17 +2998,10 @@ static void alpha_tr_tb_stop(DisasContextBase *dcbase, 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(); From patchwork Wed Jul 21 06:41:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483245 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5907334jao; Tue, 20 Jul 2021 23:49:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9tyegTGj75b5hoeRErEZ9wwZhZustumnFrD26Tawf4phyyeJwRbf7PEeDffC9UsGzpbX4 X-Received: by 2002:ac8:4783:: with SMTP id k3mr29062109qtq.296.1626850189854; Tue, 20 Jul 2021 23:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850189; cv=none; d=google.com; s=arc-20160816; b=ZPGXLOKvmrBPPpFEoWuMhYzv5BnQqGKAILoGswXxpA1dOu0d9GpkAHalhf5wiiGU3x LLulPL5EIPJq3rjLWMAQCJYsM4OPBfujWn/TQM1DOsXioMd95l1aLeZcmIr/GM08LDNH yubclBsfxGZ6zQgLoRs7SkR1lUIqYQ6H/FANkprxP0YqAbWCsn1uSG9ArCdoiari6jOR n/3xnzJRGjWmE29wkLiBR6Hzt9pmcCnHXIcS2LJFVScDI37MRy3/J6mf8pzx4JuswNZr TWugxuyvRmTGjfRGYn6JvBvmttHhu9YDrxNJxOqk21Q+4EmpRFS6BZYfsfTQ6rJFveDm ssPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=+CojFzxCaThMHHcZRB87I08hMuveAHZO4gdu6ijvdyY=; b=a739qtunqBO+jS9gFhQmlZq1p/v/z9vaJVqDvtlEAURi2R4vLl16CiKZsiKBlgIYft a1t4rZ+OtvAxjhyey2us0vLdayHV63Slr0W9Ng7vNtYRXCIk8FHeCGN00AJR/8H79Uj+ m8TrN7lgsJNajXUnztIGmapsjrWX4kcH2nMLDbxSczvE1fCmkaT1Gbx5XH+fKFNwwqj2 +WDlSPxnA+IifB9o3Q04QrRaXj3hyJw6/4yuGaJolOZSck0m0y9yfMmZJ9qpLk6XvkQ8 2TX6Du+qSEnRpOfNQXe1bwcCV7RIVNUzzZtPVQXVe8r3BMLEsYHtne+ErXij4+CY+QfP 4c/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zm5KjuKa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ey1si6247059qvb.124.2021.07.20.23.49.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:49:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zm5KjuKa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:32856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m663B-0007FP-8v for patch@linaro.org; Wed, 21 Jul 2021 02:49:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vh-00051Z-DR for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:05 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:38633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vf-0005My-3w for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:04 -0400 Received: by mail-pl1-x632.google.com with SMTP id u3so481921plf.5 for ; Tue, 20 Jul 2021 23:42: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=+CojFzxCaThMHHcZRB87I08hMuveAHZO4gdu6ijvdyY=; b=Zm5KjuKa9mwqubGY4GN8W3JHfa+ZwAbHURW8OXplMyf/c92bqvSeO7NjNsuezc1vOL f6xoKEf+sW5FTA+BKrfpBIq5gGLdYakL3H1uD2wJ7jc5j2mR5IGxKw2q+T1F8FQZsjzl xQ/MHZyt041QTh7CRIfMT5mXMpTZWnm/YehBvQwJ62RE+lUBMyPlGDuvkkl//xkvx2XJ 0/5O5c6tMlp1rdhEznC0eOjQjfhl6DsNxwKbTWGSwhdew16GVFuPe5+2whbAQtILaUEI ldu3QVvXA565ENSrk+thxUPFdAjJX82/im9o3waTWSjSGvoXMSItiDOswsZYLBaqzQgd gPVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+CojFzxCaThMHHcZRB87I08hMuveAHZO4gdu6ijvdyY=; b=M+sbf5Smb+cD9/EdPCIxnsOfLPtsnmiMGtTNcAayicLSyJAINwAZ2Cyn546rfMI1sP 4OHdKttLmhs5NMIxBpaCM6nj1lyXRv2bH78HY06g+truxGQYBazwTaON2WhtbYxxVqwe g7rXVGdislqz5Rmt9skl3BbDfvWoYfL9qbsYopDuEX8su3p0f81h2M/E4uBwG9cl/g8k jeurn+p6RMpkNllIpgDD8Im+qYipTk/1PMGs25LhoVw5A1WnaptDTt8FfupUKQSfqa7w XMr+m+tg236a4A2TZVHihg7wOKCrws1uehy/1PSZ2713ZJ+x3xEQCkVgmIZdGYLM+jn0 kCvw== X-Gm-Message-State: AOAM533m5m6plywJ0//OcDYEhZWSyaiqGjqNmJIclSpzsh+UaN48f5be oY8EjsnfAnjiyPMHSGgUUMSm+tLphR8yuQ== X-Received: by 2002:a17:90b:384c:: with SMTP id nl12mr10466407pjb.114.1626849721589; Tue, 20 Jul 2021 23:42:01 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 03/23] target/avr: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:35 -1000 Message-Id: <20210721064155.645508-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/avr/translate.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Rolnik Tested-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/target/avr/translate.c b/target/avr/translate.c index 1111e08b83..0403470dd8 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -1089,11 +1089,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_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 = DISAS_NORETURN; } @@ -3011,17 +3007,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(); From patchwork Wed Jul 21 06:41:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483243 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5905978jao; Tue, 20 Jul 2021 23:47:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKjZ6apES8F82mio5ZZdOyFNuYHljwNs3qmrkfI6GzzEstAwaIx1iUhEipUELUfZX2OppI X-Received: by 2002:ad4:52e3:: with SMTP id p3mr34528310qvu.17.1626850040780; Tue, 20 Jul 2021 23:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850040; cv=none; d=google.com; s=arc-20160816; b=vObFxdE6qRuhmvu5hCB9ZIkS422yARnfJ4Gd74Zq+/IJHWZ+V3DnGLbLZzUtQU+/P/ eA35UhnBcvMOnW2TTok0BiB3yH3nkdo3feTXrFvbZRqzc29dJTKajdLy0kbZgGwaZc5t huiOAwL5Re11C0K7EnfHxIeC1f/PbAvK2FSED5JYqE38CIMFq/WE0UoNbifYhtGOHpq0 rwYM20s4NA3DpD941GsJhrLEbRiTsh2lsTwZkjwOj4ACUI7ZcvPo/65mn96KpbkVqpYE eswZq+my8seNLqj3N3zPwC/Rr42PT7Pm84adtpn8l4sajcynORU13oy51z8VUdhXIrlO iscQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=I0CzIZRWI2JoSPxoR4xs5SpApEcqlDWMcO9xYzu4ImA=; b=ydNE3Pb3XFHryN8PC6DWXmQD4cGin8tryZ5aI6si6V232zHVHcAJ6JQaS2FFU1e1eU 0Bfzy2hY2Pgf7rvYINIDGuFl87uAgwZELCfhPMTs6CLNFtN6Mp6Gcblo+yTZE42q1mnH JjiOSPECxiUFScg+pIjl5c8IcJXwiFHvR9yApjU2Q3+mDzQInrWd6VplVAJjzMvqmIIz ClV24hzMTfv5ZWvqPSe5JAA3G2rQmbf2+RNB7IAVoOppX0VyDwrHQvOV9CtTHqFEmBd+ bbDRXcaa02EjOTEsgs2Mi3nEEQppnEIp1985rJTs+SzUZCUY9a2kIOn/fk/EtfhZTxYB 1wKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nuC9N2Cx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y17si3363309qtw.158.2021.07.20.23.47.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:47:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nuC9N2Cx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m660m-0003dV-5h for patch@linaro.org; Wed, 21 Jul 2021 02:47:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vh-00051k-FE for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:05 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:38667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vf-0005Nn-PB for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:05 -0400 Received: by mail-pj1-x1031.google.com with SMTP id me13-20020a17090b17cdb0290173bac8b9c9so3415270pjb.3 for ; Tue, 20 Jul 2021 23:42: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=nuC9N2CxCG37ZN6U7OJesz3x/uGry3HpgtHxrlnPHAsjrUm+SK7M4MJoSgEJaaKCb4 yiGKfwG1DG3DeBmVSbZtXnhxcoCYnhpwifnQIh8AxrqFieQQ9hHi6Y+tBPghpr8qt7eH BGLby+VFgfD/CySda+vw/vk4To9nNBC6ofrop8gV+xEfopJAakpFvDng4srtab5iPOWk fEgYHhXvBC6pM8HtzM/2908AR/bvKbpvjQ79VTxr+oveyNPRTg1Nh/0iixJugQV+VAzO sA+Gus7UPADEb3kCpLHgaVdUk+Y0Bm1gzCFxGuWQds/UcpHY5TzIGM++SxU8MZTzPwlj hhYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I0CzIZRWI2JoSPxoR4xs5SpApEcqlDWMcO9xYzu4ImA=; b=mbG9s4b8Qr8jiGuthAHilxhZKw2tFlkW0+/ZBIbLCc1S166ulqYODH10hjEPm7rXWv +QuiAUaZ+ZCyJNmnuQ8r/lS+7s9FHw1yAGLejyL2soemogz/aE+X/Bk7KGlr4F9BXH79 4472osPGQE0fDcH8PR/2qjgGK0dhfbTGb0AxAltAlrsEy8l5SoBck8oft9liXp9aPbq7 mNWJRJn4fZ97pSlInKXuGJdYKE9dohfbR7epE5B9g+NNtpiELrb7cHCjAZ1LKO+/gjQZ ZVsnlLWwxw72UlZGsHjnDd4igov4Q30eWcTkRO4VaSk3nhjplJzi9K12cjcySOit3SYo aVwA== X-Gm-Message-State: AOAM532MXLbt1o05RK14JJm7z31gDj/CiwZNmpkPcT9a9ojF5el26QtG RsJl3bwHkL7sJq+6Dmy50SoeYbWpFotv0Q== X-Received: by 2002:a17:902:d395:b029:129:c8a4:2302 with SMTP id e21-20020a170902d395b0290129c8a42302mr26864817pld.2.1626849722590; Tue, 20 Jul 2021 23:42:02 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 04/23] target/cris: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:36 -1000 Message-Id: <20210721064155.645508-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1031.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/cris/translate.c | 16 ---------------- 1 file changed, 16 deletions(-) -- 2.25.1 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) } } - 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); From patchwork Wed Jul 21 06:41:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483246 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5907453jao; Tue, 20 Jul 2021 23:50:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmDdfy1vG+HRhad9+kyYwUgTE0Wst8KGwKprssuqwajFNQHFEmVGR7FUpMa8GUJMoKxp0N X-Received: by 2002:a05:620a:893:: with SMTP id b19mr22779918qka.487.1626850202428; Tue, 20 Jul 2021 23:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850202; cv=none; d=google.com; s=arc-20160816; b=wrSTx6bntG9hvV8vCcs18z+hiwA5yH5rQhRKW6+xuUUdYuE35otjayQmGRKBotn1ux 7wf5G336n+Rm04gZz2abG4AIwY+MPxP3a/jrTVjwTLGPuoIU39TeG7PWM8ewj85phjEa efaRA+zP/Senu21Au/wZ0MoS9QtaaDPQha1D+AK6jFCj7YtBDL+C8iDmuw1lihHPr2yt EN1DXTHmkXKlvVCnznjuXGipb36RG7ZAkcmS9a3UU0MNbKJ/QC/ngLSK7U1tyhYrdLdQ MKJWKHu6gs17B0C1WkBPATSjh2lIft5N09HIjFE1Pksy0+KbT/00zd0F/5P1uQEt6+OI Oaxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=afuaIGxukxdg3kFBtbeR3uAcd4no5gGCD1NH3Ez0XYE=; b=GOzr+4ESQHo/OZvlO1Vfy64OvqERm8cLifsxkpNsGmXcYdcjHhFJGOh9pYmpz75FfO lIUpWdJY7Ej+LibwH3638ech2COkB5P1reDVKTOM4vxmVdSJaHTmROLwcOIqcJd5DuA/ eqgvoEGouCNtv9mCmIYtFo401Ekjk27I89g2v3gpL1Fm74MXc0oLqhvYbLWkyhFnvhgI qpIwnOPIpy3cmJjJPNR0d62FSnPw14CJ9dbULVmRHTbJ5nsGXIY8Stlb8we5FkDy0pKg /dPmVkjWqn03byIfK2t25NAMfL2E53F7oCP4HGyIQUnnA6ElLmcfIRnFgZ9svJxfIgGh 92RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gwxPpNUe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l4si5314825qtp.173.2021.07.20.23.50.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gwxPpNUe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m663N-0007UO-Qq for patch@linaro.org; Wed, 21 Jul 2021 02:50:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vj-000567-TW for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:08 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:46955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vh-0005PF-76 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:07 -0400 Received: by mail-pj1-x1035.google.com with SMTP id g22-20020a17090a5796b02901763aca3df6so442863pji.5 for ; Tue, 20 Jul 2021 23:42: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=afuaIGxukxdg3kFBtbeR3uAcd4no5gGCD1NH3Ez0XYE=; b=gwxPpNUeIygQY+TmfIewuTzRvomSGJZ1ismo1DWEhElVpbI6vd54UHlWmEsmItSAxu p9VyLxgUENKcTL7cClYJSr6tKZT7qfvfIuSzmvGMGDG0nv2rt0LPHFM7j931oTk8iHG3 P++0H4cl4gcElzXbpo/L/1Wo07RNcqUVLf3z23g/UkMUuuSxtiDeaE9jjEUZj1UpTahC p52C0y9mCpDj6R0YA2T4ipuHRk9ipMFExihT5iN5kVBICOOs5DxidlC2kCEA3oFpwyGS NYDzsgL3lUp3AogKZRY9Us9w7EH8X/K4mYPM3NBPIZSNmTV26PkfeGPTFN6QVS5VbXQQ sNsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=afuaIGxukxdg3kFBtbeR3uAcd4no5gGCD1NH3Ez0XYE=; b=m9GbCgfYYBfHF3wswJP9NX5+Z7/Ic5k1i/V4A7i6IDmjm2xgv9QLA5oj2VJ6qA3Ylh oatVGK0FauoAZ+Z+WC6OqMn+pmgxjjZg/KVQQQvOa6WKll3cPwusmYsSXS8wVnT6Y4Vm WNLQWgnKRaEz42gQl84ELNOy7Utpj1mSjSp7Td3lqcDH6rEPUTk8kjfQo5x8gQ5Chcq5 j29QU2SlbkqMaKwrcAHzJr46vJiCGTk9B3/F+YZhGwrQNa65Qdg+bhXU0Cb54vwALNtU yU8jE/co06BG2sDUSiDtB61+o0rSyapLkP4H9mubB/pmS/CUEUkEujiVq7V57hmyWpKI Me/w== X-Gm-Message-State: AOAM53319jceu+YgAQzRDlp+Y6W5oa04sUQItF4r6Yj30D2CMeSTACkB mvGKnT2f7PnGjrshWguDKfRw44AWHzMEJQ== X-Received: by 2002:a17:902:e5cd:b029:12b:8d80:afc1 with SMTP id u13-20020a170902e5cdb029012b8d80afc1mr10169747plf.55.1626849723595; Tue, 20 Jul 2021 23:42:03 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 05/23] target/hexagon: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:37 -1000 Message-Id: <20210721064155.645508-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/hexagon/translate.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.25.1 diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 54fdcaa5e8..606fae6b06 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -71,11 +71,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 = DISAS_NORETURN; } @@ -591,11 +587,7 @@ static void hexagon_tr_tb_stop(DisasContextBase *dcbase, 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; From patchwork Wed Jul 21 06:41:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483247 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5908119jao; Tue, 20 Jul 2021 23:51:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJrMYQo4bMuG3xns/0+TepLvEUUcCspBcj6ynuMpEwkPUTHhANEM3RQ/ymei+7xDP+ljZQ X-Received: by 2002:a05:620a:54c:: with SMTP id o12mr24635998qko.88.1626850275000; Tue, 20 Jul 2021 23:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850274; cv=none; d=google.com; s=arc-20160816; b=q3eQ9vpUjp237vmLJC0MIZDGWHDDyVUenzytGuXN+kJJtdf0Lm5WNzcH2ljlqsUI1X hGWxHS5ahniBJ5t0+MSMXTJ0KAlfQ7dJOnz16ePoprhhxjZyuuhbGVRa4dd0d3oo/0sQ DodUtKHO9cg0lEyel9MDBn0pwVuypoNYOvKquTu9i7W1m/4PPLQiR/qi54kwou2jxVUq fC87VErd/bF9IRfU+NgAAfcC6HP371cH9jB1top1EENotP8WrYm9bG0FoXWRn0utO1j8 h6OpN90CSAqFS8NtDAV0VyhysMJfrlZM7yoE28Y/klQFExIR6TPert56FS8WQ7sKg/Qh VopQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=hdcHXTBndQJ60bOp5yOpBpWN/uojHbOe/orD+nT3HGI=; b=f03/8ns+BIHnA2TcXAGmFmRgrvqaSmGV7uPPHYMNgfDGdFvnSW8ZowC7SUZJIxl2si u31ztrz5vBh14oKOksti/4KXS1t+hYV5ii4HwAvUdH1+8om/mzZkkpH2N4PsKXn+dk7Q iHFs1a1rIQKUw2vIFNvgahR4lDjvJ7u3EYVVkcZXdVQVjYvVAoO1XnjoZ8fvL1Dgy8c9 IcPqJZSMY3WuEnYHVVH0U57jwd8/Jc1eQoxHC+wXMQ6EW1UK2oLcpGgvcoSYGt80WRsA Q/PewrRjz9bQnTlfdhOMwNK1gmkKvEi2Qz4hf1LqoMjHpTeiTqXNBNVVKc3R5FZoiq3U Q+MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pXps9aDu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m3si17985664qkd.94.2021.07.20.23.51.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:51:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pXps9aDu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m664Y-0000iz-9t for patch@linaro.org; Wed, 21 Jul 2021 02:51:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vj-00054u-F4 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:07 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vh-0005Q1-QA for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:07 -0400 Received: by mail-pj1-x102d.google.com with SMTP id p14-20020a17090ad30eb02901731c776526so3409786pju.4 for ; Tue, 20 Jul 2021 23:42: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=hdcHXTBndQJ60bOp5yOpBpWN/uojHbOe/orD+nT3HGI=; b=pXps9aDuEWzbbhgK3IRRjZk8SRlnocDTC9MgLErvLxRVEtLwMMOe5aK38OjcpZWzeU i7HKW1e5j73085gkdAaHCOp6Zzji0Vznmf/l4rnd/9CbrHgpcr02VJGsdcKhTZVt+JZI JeKy0AbgfCg+OQS8mY/53FoYuhv4P7K9/V/lTTm6t2PcdIA1DBGqNx4MEhzFAjYb8QtH 1KiJDXQO89O/jF78Nhua13qxhl0bvKnlo4R17QCO3J4VxLwoVIIuYdQfW3ZC151T2n5Q KvwLkbaUKqxPLMjfyFmzSybYiBhqCztDRVz5QEq+5tMBd2bfx9XcRRc1VkL1tovbkSE7 uiCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hdcHXTBndQJ60bOp5yOpBpWN/uojHbOe/orD+nT3HGI=; b=tJf6uGVXg4j/JFRYh9QDWfKz6wnAR+PWSmqHccJOInr2QcKnqfTKHCxGLNGkDNAmH6 7YVyG2RIp9Fe9ra6wHWLxKSxUb+cMaqVwLi0ZoYX46+tO7i4Ola/pi89KNKJZU1DZegI 1rDp1ZYNc64PRD4720xXWFjXghgBdNgNYv5nDQPETHLa6Uqk0HzwWGdbsWU1qcKOWP3O hEcNNA9iMKaISyV8rcm5KzT4Lbl8nobDuUtHxp/HlAkNOXG+UM5YWQbWMtL2vV+UuUDb MHw0z5AO2OUE4ZbZlWH+EjXnhdUE2XcSgMBPSoLWFFCSA0SzmzO0fK0KUn1IU5uDH25O ZZ9w== X-Gm-Message-State: AOAM530Pl6WEpGrEWDt2FVKhjJ0+/LuI39GM3Y305hkcPdQj4i7r7uIp UuMhF91TbMJ+1QtN5kTEvIrH4f/CPRrFYw== X-Received: by 2002:a17:902:b941:b029:12b:81c3:6919 with SMTP id h1-20020a170902b941b029012b81c36919mr14184101pls.7.1626849724515; Tue, 20 Jul 2021 23:42:04 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 06/23] target/arm: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:38 -1000 Message-Id: <20210721064155.645508-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 10 ++-------- target/arm/translate.c | 36 ++++++------------------------------ 2 files changed, 8 insertions(+), 38 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 422e2ac0c9..a7da3c5d45 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 = DISAS_NORETURN; @@ -14874,7 +14872,7 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) { DisasContext *dc = container_of(dcbase, DisasContext, base); - 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 @@ -14886,11 +14884,7 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, 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 351afa43a2..4fb2b846a3 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -338,7 +338,7 @@ static void gen_exception_internal(int excp) tcg_temp_free_i32(tcg_excp); } -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. @@ -354,30 +354,6 @@ static void gen_step_complete_exception(DisasContext *s) s->base.is_jmp = DISAS_NORETURN; } -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) { /* @@ -834,7 +810,7 @@ static inline void gen_bx_excret_final_code(DisasContext *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); @@ -2603,7 +2579,7 @@ static void gen_goto_tb(DisasContext *s, int n, target_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 = DISAS_JUMP; @@ -9360,7 +9336,7 @@ static void arm_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) dc->page_start = dc->base.pc_first & TARGET_PAGE_MASK; /* If architectural single step active, limit to 1. */ - if (is_singlestepping(dc)) { + if (dc->ss_active) { dc->base.max_insns = 1; } @@ -9684,7 +9660,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: @@ -9779,7 +9755,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) /* "Condition failed" instruction codepath for the branch/trap insn */ 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 { From patchwork Wed Jul 21 06:41:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483239 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5903223jao; Tue, 20 Jul 2021 23:42:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTgY1nBZTy64epJ5xJlL/6uoPFaiDn9vQsDlPihTpllJlp/Nf74Zmc7yFttM85oDZVbCqN X-Received: by 2002:a25:da84:: with SMTP id n126mr43007943ybf.412.1626849763719; Tue, 20 Jul 2021 23:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626849763; cv=none; d=google.com; s=arc-20160816; b=Fkbd4grWlsvPANTqBHNwC7RvJWiZu/iYKDMTUS2j9XLfZw9Ml1NafSEHVDA6fnX/tl eyT8LHCHlyxAljuaPuHgH9TMKogei64aOttxaLc8Q+XJ8IEyTkDjoC/OqiFUTNFWTQo0 WSyEoXXgb1qB80/ieBrp8dQNns0HWrt0g8w9FaY4qQXAQrx9BKAEkNeRZbuaUTnHPIAg vwjG0cyQ+GXUgdG4sYTdDd8/4lxjK9nn+oppdrco2TC4tRfZkQ7iDDxjOSVF/jpZX5Gz vJZ2MJFYCppcbqNPA27f5m3Ro9WolrlOQwoPGstXYE/aQp43gTkopn/AFkd59Jfz1Bl4 QY5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pwrBjNjNNTyCMJtkAsuRpXBoHyTgIOoOTRWqB1Tn0SI=; b=00zcSxu9+BP1ZcjlBGGJ7u7sp811+oXd9TQMQByU/KlUVhn1A74/fx2TmEdtea+i7h RZo4n6CasZaBVozUEPHzvCMhkCFtnBp2Mah7ddzPAsmB/1ljPM8WBciqfApwWRQd9X5t PiKVEFWgA6YaZMlqur9MbRc1yh27PQlyL/yyOLgfqIYLytOlflLt/DNdhtqmMefri2HD L1Fb8900vJ5E3Gc4YkPkzPlCajjglK9JD1DYT01G5N+Dh11RXfKfTEj705Qr6l9MoGOw 4+iXLT1sGb9KfUyF33cTxazaNBMXfwPD8QCx60RhiVM9ZD7AO0RylOQJQdk+zCTufiZO rEjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zcovy3ku; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b38si23524550ybj.257.2021.07.20.23.42.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:42:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zcovy3ku; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m65wJ-0005C0-6h for patch@linaro.org; Wed, 21 Jul 2021 02:42:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vk-00056P-Fx for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:08 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:35821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vi-0005Ri-RU for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:08 -0400 Received: by mail-pl1-x62c.google.com with SMTP id n11so489009plc.2 for ; Tue, 20 Jul 2021 23:42: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=pwrBjNjNNTyCMJtkAsuRpXBoHyTgIOoOTRWqB1Tn0SI=; b=zcovy3kufBWQ0yTqYFynM39cw8KgGmeuFocC4SFAWC/i/xc+5JuB7fw0yL464hiu94 Hyecy8O0PHWzxR2nVbbXjVPvZcMPKmi5JeCIr3PlOhL6aFXKNod+NArRlMaqkElBbm2n m7OYn4jm5upzLCF/HTRpqZ6J2FTDjeXgn+PaVM2yjy0dquZEyGZ2lYm5WDDpxGduzdDk /4Lgh7YOCBVXAXR4FSGiY6D5QFn9kegyQnAmjRwBcdKvfUgxI3Yq3sN3EfL91m0/+VdF DEtYWqA6J5Op4saOqP2QRaTMIaDiMyG1wZbS9w8VXEsAjMdQYjgvW1LFdKN/Kc9DofdA 8zeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pwrBjNjNNTyCMJtkAsuRpXBoHyTgIOoOTRWqB1Tn0SI=; b=ITlDnsXHy+rcC3is+wplBYZtT/EmMVWuBDHVVGIYQXLTEQtG0AJTgV+5aNA3b1Bw++ WXTUn+QcNXmI5E5q3YHWsuqOolWOe74RgzGo6CFCXIdTPi1cC68gJZwq7CwmvNAU/huD EuFKx8hI9NSIfDIRL4rtq6Ib9xtEIpXXNivc90NWd2MnBELm4rptnQaZ7kj3CsUwrG3a RBYAfDu06rYENZi44OWL4LYFiy5jxmuCRlMH3oJ9pxHdsWoCIf582IJQ00qsnHRGgHhw 89tM6XN/I8B7IrNxiUYDIc1wsfQiPsyXS5TceQdM49AIUI5Ecpnsnposcf4GfHXMaZkK 6wzA== X-Gm-Message-State: AOAM531fPcfw3HvhOyOQgClwhwFJ1JgRnc4BnMGFncak5NqDjTJcPYIB mpE7Qfl3oa6I6c0a45KSpuhsjsVox7IGrw== X-Received: by 2002:a17:903:32c5:b029:12b:9107:8684 with SMTP id i5-20020a17090332c5b029012b91078684mr8504556plr.73.1626849725409; Tue, 20 Jul 2021 23:42:05 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 07/23] target/hppa: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:39 -1000 Message-Id: <20210721064155.645508-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/hppa/translate.c b/target/hppa/translate.c index b18150ef8d..9e0524efef 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -817,11 +817,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(); } } @@ -2349,11 +2345,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 = DISAS_NORETURN; return nullify_end(ctx); @@ -4277,10 +4269,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 != DISAS_IAQ_N_STALE_EXIT) { + if (is_jmp != DISAS_IAQ_N_STALE_EXIT) { tcg_gen_lookup_and_goto_ptr(); + break; } /* FALLTHRU */ case DISAS_EXIT: From patchwork Wed Jul 21 06:41:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483244 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5906968jao; Tue, 20 Jul 2021 23:49:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzl2RWzTBqTCODTW36fSNSFFmWdCdhSZNC78fml3dOGC6iAjnFZZ60kYUgglcs1zFUcMnY5 X-Received: by 2002:a02:8783:: with SMTP id t3mr29470079jai.45.1626850149678; Tue, 20 Jul 2021 23:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850149; cv=none; d=google.com; s=arc-20160816; b=JLmEXA5OEedtDy64NNftKnUNRrgFJSCQQNd2qUeAgVQxk5qP3LtfPvO8e9OZPaFmrp vvg87UiFAtIcePckkhPmYYjNPmckoit2EyUErR+ztLaZXgz0CaHHUNkvFNtWpu4m+KYP ucZWHtPbep9B+4mbLly5630c87JGPycYVsj9oJmSYJ9yvV4tsM5G+J4eMtKlaLxrE2es rtJN2tNyGfZvQh+/gjffg8UD5q6t+kcZw4uyWyxTOgV50aHK/e7I7w23Dg91KfUtDN0r F+xbcKOZRM7zPfRWCwOQQnjk3vU8gSLxWSWy8rGRZMreWEtUWgn2zjEMSy52Zn10Y/Y0 T91g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=KI7SkeMtjhEbYkH+2Re6f8L1tCElUFagFm8gC84/Czo=; b=FNyio3fS+8iHForljWmeksxDAcHY6zUnMXLry1cIilwBouAl+/WUHtnC7bWOaPPZJb RolrRc4qEVtMN1AgcVHCN3CegDg6lGHBw81yhxR6xf6vpLr+ZQwny65dQprQJVneNlTe 8R+o04l/mLvXk4aIprv8Ixnb5jH5e5EumBZl/UnNydw/9F+Uz40zDZexaqvC4gn+1b9K Oelhfg9Ini96lLPQZd50aDB7cXrNVYa9n7vZA76HQt56wLbImuHv+G932gw/MmTDaYBl sQZILCWTN0/jRw0ChQ+RGrspSPbZ2PVpUKSIGV15US1g+qiH48elkKHgATuSb4Rc390E m61w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="IEo/eTu4"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m10si35320276ilu.53.2021.07.20.23.49.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:49:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="IEo/eTu4"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m662X-0006cD-50 for patch@linaro.org; Wed, 21 Jul 2021 02:49:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vl-00057P-6k for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:10 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:42691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vj-0005TQ-JB for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:08 -0400 Received: by mail-pj1-x1034.google.com with SMTP id i16-20020a17090acf90b02901736d9d2218so449744pju.1 for ; Tue, 20 Jul 2021 23:42: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=KI7SkeMtjhEbYkH+2Re6f8L1tCElUFagFm8gC84/Czo=; b=IEo/eTu4COFvw36erdTRwzo3/rk8ON264O4Z6KRJp1uOR0k6YoHWZi4+LM+e/fMQNZ O/VYo6YkL/0v2Ldh1ysxas35rQeOobAc4P3O4nfXzahv6xG3RH8nph1Tb8yXzK+WZ546 iiXuXzZwSkNAHvGCVfzyDZwzv2vuVyrTc63nlx5QR6hR4FClWEJGF+LPXQm8ySTQd2ET nxf2u5mPiw+t1Jt+nhgq6WEp/8Zv5tyD+6Y9ARiZq2luSyeqyMiMZh/Ubm+3Wtrh5HyP N/o4DTNJ7cfKrMsCd4jE24BW68cxdT7TGd7w7Urgm0JugFYNlh5uwhQk8qwnk3wSnkQ2 Kp1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KI7SkeMtjhEbYkH+2Re6f8L1tCElUFagFm8gC84/Czo=; b=jBYGB5uJXbjrXFBRsjh/M7Mno0UEb9XQKjxctqy6Ku2GqROwTWKytJSiFoI/0spGOh UZ34tSFOEYdt49kddcXPVI+5SYRhio2kWhRl0AfCoolHppnEq/7PhfR16nFqXCRcKcUA LWn0gbHxjd3qt47h1b3qUxW1/hwPETZFXLrEI0wXH5I19dqoVfWXRsGFyRIIlGXWXBc+ qm4SKpHO1TB8G+Jd5Tf4C/vQ5DDfPetZOTlqUGhj8BaTyN1XhtoP06frQe+qOANe7igX SROulm3zxIwNHpcJzhsVQeB0wVKbSRixx0fDP55Uh+Gn732EY+mmwTBjWoqY219C6TVV xG1A== X-Gm-Message-State: AOAM5332F0y8x+bheUAPPmZur9pnAN1S4+hhh0PEz+lXgBIDJeCKs3V3 lcnXpw2TpHQIsf4C3j1au/nzlf5xpMyaBQ== X-Received: by 2002:a17:902:9a81:b029:12b:567:6eef with SMTP id w1-20020a1709029a81b029012b05676eefmr26170174plp.35.1626849726313; Tue, 20 Jul 2021 23:42:06 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 08/23] target/i386: Check CF_NO_GOTO_TB for dc->jmp_opt Date: Tue, 20 Jul 2021 20:41:40 -1000 Message-Id: <20210721064155.645508-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.25.1 diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index aacb605eee..4bd947cf86 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -8556,6 +8556,7 @@ static void i386_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) DisasContext *dc = container_of(dcbase, DisasContext, base); CPUX86State *env = cpu->env_ptr; uint32_t flags = dc->base.tb->flags; + uint32_t cflags = tb_cflags(dc->base.tb); int cpl = (flags >> HF_CPL_SHIFT) & 3; int iopl = (flags >> IOPL_SHIFT) & 3; @@ -8593,14 +8594,14 @@ static void i386_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) dc->cpuid_ext3_features = env->features[FEAT_8000_0001_ECX]; dc->cpuid_7_0_ebx_features = env->features[FEAT_7_0_EBX]; dc->cpuid_xsave_features = env->features[FEAT_XSAVE]; - dc->jmp_opt = !(dc->base.singlestep_enabled || + dc->jmp_opt = !((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 = !dc->jmp_opt && !(tb_cflags(dc->base.tb) & CF_USE_ICOUNT); + dc->repz_opt = !dc->jmp_opt && !(cflags & CF_USE_ICOUNT); dc->T0 = tcg_temp_new(); dc->T1 = tcg_temp_new(); From patchwork Wed Jul 21 06:41:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483249 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5909248jao; Tue, 20 Jul 2021 23:53:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwz1SAbmgNQ830lsuhFXz79kJfIQRUCfVgbUneF4KfUzqh/+xAOdNVdd5VEP1VnNIDacbMj X-Received: by 2002:a25:31c5:: with SMTP id x188mr43771838ybx.291.1626850397777; Tue, 20 Jul 2021 23:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850397; cv=none; d=google.com; s=arc-20160816; b=hXbE8nOQiwfFJdp7ufPk05+haHGs1pUhMz1b2cCf4xI4XFdc8n2BZhjXrOUV4qM0gm ucDCvatub5E8xSks/fNO0I2SYIx1r6+fTD5X6fU5JTS7HkLutk4TaPLyEg9rLSnZNIYn EyqUvVfIfE1hyQ7vkWdwFEny2whMd9oZeWWkyLZxoi5MrISkgKQNjWRj6xmisNRaxB5x rJe0vheXpKWHosFqBRaUEXVmmlmnImwAhlihrAAEZbRT3g1CNKWk6bpygTqfm48/gTrg d2covV9GTD1fefmzJkw1lvKfFVN5l641Fg4XJkhfXBHdzvWnIipgePRJysT+528O+hN7 KAaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CKMyfEupmGKlxmCLNCm/wefn2vfKhH3KArdazgmADL0=; b=Ss+yYpmzVrFHKNAM1Jckr2e6m5D6Hk9Wc8wpqHLqph3fSzvlrinqQxZ4/LkCwRZ6vG X3IypA8vV3FpTLSI2Int8xnaRrQD3m7v883HaqbC+CHC+Im78pwlZpO6cZF6OGzkKWvO Lx09v9qH2d4oCb5/UaL+9KsQRWR+YE+U39CAka5tdpuwAObX7PCuuXlqJrG/kxQLRzXX 5tYJTW7CbeK2ii6GLls2zkb1wfFhKlrIlQRaoWyFXUvcYCkoS2phsR+lWWr9qqhtOvZV z2MdcCrJUUC/yzJbRzA3ztDk1wJ0yQ0PQiWt6dS5l6erGepkh7jQ0oICn1cyxCSrSNrm p55Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GyprLExT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c10si23517475ybr.208.2021.07.20.23.53.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:53:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GyprLExT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m666X-000420-6M for patch@linaro.org; Wed, 21 Jul 2021 02:53:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vm-00057b-4I for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:10 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:56226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vk-0005Ui-Ke for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:09 -0400 Received: by mail-pj1-x1033.google.com with SMTP id gx2so1085949pjb.5 for ; Tue, 20 Jul 2021 23:42:08 -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=CKMyfEupmGKlxmCLNCm/wefn2vfKhH3KArdazgmADL0=; b=GyprLExTVZcofwcCl4l5uOHBBiMxCWEFZ3Z29WRxjE3m5SPR7bPOKAqMhd47AiQcgp z9FkqfLJ5cYs+OjmPxnpHGnH1Iva8KAZhojuV0uh2dMB+jGzhXl3V+ozGAYO6zV3wXJE I5vL23tzckPeRkWNqmJ9r5v+elfgxhk8NQucnhAmiVIYa7wo9oaet2zEJuffeHaLNBAA YzO6+Co1QrEWnUragfDbfN7+dg9Atxzq5xJ9ic7knz2mpbjinhGySccL8NqUqOGriywk Lu2sSWmKVxZrzdhLBbnDCyEnwz7Fk/6mN8fyADBphEUzT56JIZiUGgIQkX6XS1yh9Gmd xRow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CKMyfEupmGKlxmCLNCm/wefn2vfKhH3KArdazgmADL0=; b=aO/KQ56lO+/4JEX4KXVezelRyHORKGRgEW6EjXWIQDPzWouxr8gJWNNAA8AOFzCv1F 1Aiv7o812DxRGGf8RV4TicTkl1eH4gBi1oTdzNGGgl/BcimeU4YCUrkKn4ZfBmxmScSb i97orOioUy+rzwOqGAcfEIWFFlOkx//XYbN81Jhg5jejEEcv7YIujbKwHbdikWECUE0h yji49gUsqrZMGGV6qCUYCq4jMRpvlsYkxfZ+2EqvkGJf+5ykNOSDq1i8dKertUpSiCy0 kqwKRLoX5cgD23BIEFBflOt3PWQtSNBWe03lpJgOW/OUSy9ivGXjpy9xKd1sBKWZQIVJ No0A== X-Gm-Message-State: AOAM532jNU96i9EWk00RX5ByZzp9Em7HMPT8XwpymYwOX+3rSegEHLYN Fqpg9ofqQUDAxTAklM/JsWoPDTSrAIE5yQ== X-Received: by 2002:a17:902:9b87:b029:11b:e66e:a1b3 with SMTP id y7-20020a1709029b87b029011be66ea1b3mr27070888plp.33.1626849727420; Tue, 20 Jul 2021 23:42:07 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 09/23] target/i386: Drop check for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:41 -1000 Message-Id: <20210721064155.645508-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.25.1 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, int) 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); } -void QEMU_NORETURN helper_debug(CPUX86State *env) -{ - CPUState *cs = env_cpu(env); - - cs->exception_index = EXCP_DEBUG; - cpu_loop_exit(cs); -} - uint64_t helper_rdpkru(CPUX86State *env, uint32_t ecx) { if ((env->cr[4] & CR4_PKE_MASK) == 0) { diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 4bd947cf86..0a200d2f68 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) { From patchwork Wed Jul 21 06:41:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483242 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5905961jao; Tue, 20 Jul 2021 23:47:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFIpE7IMaTV7+1j1W6nSttga/baEYrL/swv8+8XtdLuh2/cOprDwD7Us9lOg9YYKAJXRdf X-Received: by 2002:ac8:5552:: with SMTP id o18mr5514290qtr.51.1626850039435; Tue, 20 Jul 2021 23:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850039; cv=none; d=google.com; s=arc-20160816; b=xA+i5rZL6yzLvrjYIH9EugeXTzBmvZn6qkzwDRGx98K/hfJ6PiKq60mpoBqtc8kzYB KzweHF5sw+98S3tSMupP7aQHp+utob5S2U5TKXQU7Ba8IUt7h20SaGoZi89ARkRgoVk3 PXs11M1QWkB2nfv+nGF+t+1VV+EA/TMYxcLU8Cw1YG6DByiwXwE1ZSYIv5jweniXO+19 QDS0+JZk/GfBzMXdhy6dr5Mq7+6pbo3O09yyqSVKKNaeE1eWuMZrjs4PNeRZHrpDNbEC 4BK0dVguCYegP3C8dbAnAfynRkf3t5mvIqU7jvXVvdaV8LCmMfy2UZMrKLXcZU6aGfib 2jUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=BlPIdpEMHDG0f7nAulWHm2+Z2nPdA6tFMSfI///rGBY=; b=tGSzNQzAlB7hFiADexcg5X403jPFtq6Qb53XUY9+aKdCJenhBYcJBPXz0XFqAZ1jQG kq5oPAONYTXx+5IqHEuOqNWnzm0A8PnS/GRMMZjwft/4gGYqLu33zz6C4xXCo3z9l9Eu 21Y4KrFRQoeCxJ+5UwTDkNHVzNnF5Kt3dTs/Afm4X9sroJ3oleaFQk5DhM0m8R24DpGt v16Dvz1/SARTx6evfMAHNcyKLGO9hVVej/il4RORnaDMssrjj9ZQeTpdBpHaAHslqT/S VZi+xoO6vjdVrnkAnNUpOpa/p/c6LsLNVrSfI/QOS8tjetnZJ/kPplRudjq9ffYsM4X4 wY3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jrKPNI5F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o8si5286819qkp.269.2021.07.20.23.47.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jrKPNI5F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m660k-0001tM-N6 for patch@linaro.org; Wed, 21 Jul 2021 02:47:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vn-0005A9-Hw for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:11 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:39592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vl-0005Vu-Na for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:11 -0400 Received: by mail-pl1-x631.google.com with SMTP id h1so481420plf.6 for ; Tue, 20 Jul 2021 23:42: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=BlPIdpEMHDG0f7nAulWHm2+Z2nPdA6tFMSfI///rGBY=; b=jrKPNI5FIbqUc49RzqJ1LIjPQe1QvmBn9e6VjAwHn61mmR+E4oIWW5Uz6O2i9+DY9/ yr347/UgEh1YD88FcfLiIjrNDmKec9lerYzb7XZ4HJwUgHHthtYvX+UfvZqq6xSax81F 6g11Q4i9Fsh1c8iU/X2bhM7Z/ZtJPWdudldgVwMQ6aL4hlJMH61GU42LfD2PQgLzyfL7 Z0rl/6XMwNiZ0laD/IYc/yKvb+rMDXX/sinPWzQiruNyJR/mVWhCYnkRk2DsHIhZEvlW Onq7E2d/VeAIwc4frpDuXim/Kno5taq9vwEvndD+lRaFqxAKKMQz1OulXPPCxbDZBYKT YiAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BlPIdpEMHDG0f7nAulWHm2+Z2nPdA6tFMSfI///rGBY=; b=m0Hb6PGohQi0UqiCjkJaL/Y3EGgGYTQ7mvMB+NukydavKu3wRCw78Q82SNYGcbsYW1 9HYf1jvraxuF6B6GKGQbZ/Kk/JDs/6OjDLEadlvVIliZ8QqTeSKT3+yZBSp3tOFnMoZS c0PBvaPo263WyeloBwu1LlLhlbLc4CKZQjjea7mfzlrZTvffu9x0zAh/VCbq3aeTGDin KDlY3+6b4H8Y4Pi5/G0Sdx6Uo28tXsW07D7CqfnACgX/Mi2jmV6/AAF7SQVab9S/ILxz hMtlr5IiBWpNyU0nHoPxQPBcSn1/JMSIumLhvJ6gYNqsLJmdGJWT4Co6mB5spNiu23K6 FdAQ== X-Gm-Message-State: AOAM531MI2vHDW+JHHC5aXv//2MXmhIJRLRHrPoXu5E9KSQSInzd6C4X gMoPRPFpMbDc+v1c8oOfEbpzAqp6zyFWuQ== X-Received: by 2002:a17:902:b218:b029:11a:bf7b:1a80 with SMTP id t24-20020a170902b218b029011abf7b1a80mr26397488plr.82.1626849728382; Tue, 20 Jul 2021 23:42:08 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 10/23] target/m68k: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:42 -1000 Message-Id: <20210721064155.645508-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/m68k/translate.c | 44 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) -- 2.25.1 Acked-by: Laurent Vivier diff --git a/target/m68k/translate.c b/target/m68k/translate.c index c34d9aed61..c3d281a5f2 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -194,18 +194,6 @@ static void do_writebacks(DisasContext *s) } } -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 dynamically */ @@ -320,20 +308,6 @@ static void gen_exception(DisasContext *s, uint32_t dest, int nr) s->base.is_jmp = DISAS_NORETURN; } -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(DisasContextBase *dcbase, CPUState *cpu) dc->ss_active = (M68K_SR_TRACE(env->sr) == 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 = 1; } } @@ -6252,17 +6226,17 @@ static void m68k_tr_tb_stop(DisasContextBase *dcbase, 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); } From patchwork Wed Jul 21 06:41:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483252 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5910349jao; Tue, 20 Jul 2021 23:54:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWqsB6qqg83N/Oxc0g7W6NmW7wphef19SKSN7cbNOKTjgOp6Rrzd3Kr0E154+ZKL+VBkbh X-Received: by 2002:a37:c12:: with SMTP id 18mr32920677qkm.414.1626850499724; Tue, 20 Jul 2021 23:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850499; cv=none; d=google.com; s=arc-20160816; b=p3sYyC/j0Py/09iVEOm1WMucXsMHTJdygv56e2vt11kzURQxwVqv4CJT7X3WG2EQ+E FXFj1pU+Z6gvSkuxwu5cx6f1svZLDTCGkJKHBbix2A5afiUG7b8WBSoPvs531xFNiPjd zoTFXYaFuxC7G556h2OHacb/fsSPcRKaR+Qgfo6z7HyQ9VPGv+N8KdUrUyk06o1rNp75 f+iHOvpGZuRQM2jbYANdHT7bXHkNZVHOx89edcE3/w6TZBwoR7q560AUzvCogiudOjDt QuL4gn2ZAFG647oFg/aZv/6pjCoL71GA+qj41RPRjDAhyAdxd1h52Bv9egb2D1V7LZcE XiHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=R6dlxti+/N1vnkKixu8IUh/Zl8M8i7vv7yb2sO8QtGA=; b=LnsoDUU1A3pZag8R+Ia2QlgCaPbuosod7OrIn10A7m7X77MlhlZH5LIsKx3YoH1AqP U5IvhWoqhfsbERpSz78gOVIlAZyA3kl73QsvrogxSkWgZ3DOt1MZM3N7xOHHFfaPxbo2 4NN+1aNT3aP+hFyk6hHYCpKmwAmAOBHeLeWhZog3t6hCJB+GTevpJyvEGALG/moLySoj AZJARjML3s+CgJxVf4+xKyFjM+G6nZTMtbNuiTxEUO1tDMEgdFENUWS1Mxcxo6AlhlDL ztBqceG3T6mwEIViwt/EeUPy0K0C5TNFkf+Kt54D3Xs7415jwBi7YAVCq9A4UGtptN9/ vAXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BOALdA3f; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s8si17088976qkj.327.2021.07.20.23.54.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BOALdA3f; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m668B-0001IM-0r for patch@linaro.org; Wed, 21 Jul 2021 02:54:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vo-0005AW-1P for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:12 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:44564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vm-0005Wf-Iq for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:11 -0400 Received: by mail-pf1-x42f.google.com with SMTP id p36so1469124pfw.11 for ; Tue, 20 Jul 2021 23:42: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=R6dlxti+/N1vnkKixu8IUh/Zl8M8i7vv7yb2sO8QtGA=; b=BOALdA3f4TKska56I97TBbU7NVNb5c6vDuySWwK+y0FmaDdppdr9Si1W8XrhsvyXJa sda9v8+vZ3l/eEjNRmyzEEjF1aTZRWNvPSh09ATtZEXv2c41Y9Ily7XKsqFcPxYJ/qFZ j9PMmzhjwn1ExX/v/eltoeHw6jFePDdhCP9Lz3AE+2WmM6Ggu3eVGv+3FJOcnuTh4QBQ s3PrzLdmjJsn3dNnkQX0FxLx350fLQcMLCwJNQqUJ9AYQ1opEwHSf3xF9ikF5MdVLMsA WOqbcIOAqXOHlLNEwPBrDY/eXSu9Hw5IQSPBM6s2eNJRDY8p6SaHesdNnBdtVE7lwECk b++g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R6dlxti+/N1vnkKixu8IUh/Zl8M8i7vv7yb2sO8QtGA=; b=c6sKeivKfkr9LJDe24id6VNL4DUHZvazOpRbKZ2h7X8PDBXZgsWep3gek8VrMk5q8Q 6tZRwKF5eHx/LEaiYcwczqgCoydZtmoDPGwVGDvuefI+FTW09AzHgkBfRYPc5Cut+R+5 e+kywJGrYkeX3xUyQMzk5m4LOq8jTUGfEGHxW0tXSZhX3GETIqXC2Cgry4Wys0TU/bx6 X84yELg7ukyiYDMHDIIriKK+FJcEUv09xjEchgKT5fPyv89M+VA+q0dViu8vOupXX8Zx wOvFsqlq0/MKfauVgkGkQ/MO1Nr78+jrHjVHn7chDYQXewyrva5bNoN5gS2oDdFGxuwY weWg== X-Gm-Message-State: AOAM530LTUDe53yJq4EV8q8qcuSy8vCS2qJkq0Tjc7rCf4ythtMx1esI UGKRRKOGWSUjOW+iWF+NZ0GA5aoCa6alWg== X-Received: by 2002:a62:7ac1:0:b029:329:77f5:8ffa with SMTP id v184-20020a627ac10000b029032977f58ffamr34871869pfc.36.1626849729325; Tue, 20 Jul 2021 23:42:09 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 11/23] target/microblaze: Check CF_NO_GOTO_TB for DISAS_JUMP Date: Tue, 20 Jul 2021 20:41:43 -1000 Message-Id: <20210721064155.645508-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.25.1 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, CPUState *cs) break; case DISAS_JUMP: - if (dc->jmp_dest != -1 && !cs->singlestep_enabled) { + if (dc->jmp_dest != -1 && !(tb_cflags(dc->base.tb) & CF_NO_GOTO_TB)) { /* Direct jump. */ tcg_gen_discard_i32(cpu_btarget); @@ -1804,7 +1804,7 @@ static void mb_tr_tb_stop(DisasContextBase *dcb, CPUState *cs) return; } - /* 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); From patchwork Wed Jul 21 06:41:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483255 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5911839jao; Tue, 20 Jul 2021 23:57:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq8uj0cBe+yW6j7PcC5EKOKN41lIwe8p/K73Eg9n4KsK2he/WBhrXi7ZxNqI8xRKgmjKqH X-Received: by 2002:a5e:a617:: with SMTP id q23mr9529142ioi.54.1626850663747; Tue, 20 Jul 2021 23:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850663; cv=none; d=google.com; s=arc-20160816; b=vH4W0qmi3aJEbSLuDtAjf9NSNVbJECzvico2r/fW7BR2ncxJ+z6923GCSpcy5dFY2t Aiowd/XOWDyAgOUybpDdRkpVRWxe//ue4xgdcT/s3TyR0FPgqAzkXCA3t6zGUETanVU7 17DyKZX9fU7hOKt8pzc3BKXR0gATZ1/9FxfgRtWnY7j4jepnXH5t+dusMcFo/1aRvG21 hwCop0Oaj6YB74OTsLGGoSOe8fll80BeHufegmYvLFw6vMmrHwYDnFoSccsZaIVpSc6F 9xZnMZ4RMIaoIsjPL7K4N90KHwrxrGVLLaonaxO4p1HaVcMujX+eiuX2z8n4sfU0/QtD nh+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=RDO2b1TAF4ztgLUbPUMoAMU1yhwWU0vJ3YMD4i8Z5ck=; b=dt10ILQxr7RYwxj8IXLVL7I91SoS+yukZi1GfQI4WJ8Z1ODf+S7Cgq4ozxsRtm5DJi twzT1GTTjnyzDqyi1AjwGjQAKm3p8gopOlMoCGs2oaOwb0z8cB1+tpUkbE06/XXTyEx1 8uyMSoiQ37BJ9NVhz32b/5UQ64CnI+8Hj+YromvHqME3mI96Rmdlqb3cHZ/i8wJiq3Bw 6xnxeliOqfOIF4YA0Reyi1/147VIwbNafrWZ/fDogEHrqQdJP04XSsGu7CNTc5NON0to oVjsM2U0oJ26rBHJpIgipaQNJHV7rn53hxumoKYeOaG9ahuRgE9fZqXBLKrCx7s82K3L sP1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xUEUzCEJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n1si27865037ilt.39.2021.07.20.23.57.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xUEUzCEJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66Ap-0006Hy-5c for patch@linaro.org; Wed, 21 Jul 2021 02:57:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vo-0005B2-U5 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:13 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:34766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vn-0005Y8-Es for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:12 -0400 Received: by mail-pf1-x42e.google.com with SMTP id o201so1513424pfd.1 for ; Tue, 20 Jul 2021 23:42:11 -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=xUEUzCEJDkm0XJo+d2j09/rHWEEcXkuV4q3eTk6dszJyzFhRkvMeeP+0rZcy76wu9U 7qg/ckh2VetA+vboOBOCICL5zxXE1ueEGIEI3BF5PaUJIzs/rqiKU+2+ySiiWCyRLA1X RpeEw+Tgr71i378n9ORx0YrO4286rzDlqTqlE5PdS8OlBBfk3lw7eorzHhXA9qPyW/zk vTnV//HAK4hXx3l9urBoEmFxc7hAIgvWJIhftNGwdAHdslCMdBEtegb5uqqLkfh8/aLN Fztk9z5NgK8W/JHLuDqG6i71sZNxsTxg8HuNF8Y/sLtWyzHRnK9JbIUZxoBev758DQ+0 oNuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RDO2b1TAF4ztgLUbPUMoAMU1yhwWU0vJ3YMD4i8Z5ck=; b=i189h7K+2LHUX9AxDBCfcJGFXORf9Ud5s02o6aRBWeE7r9KcAJ5m+1BAD/1PY9ZTIj cELC8ME0keC4pt9QN3Ot+XnS9Bv/3ENvrb7yWgGfQP3HkT/WWWbLTMqrEyH8S+OlgggS Yi27mw4ppqirPhQAopwKDAMPVvdcnMsA4EaIdZwjNLQiNKbz+s34h8MDq0LFBAAoLfj7 GR0hgau0NUxhzT7DBpZTyh0lzg7BMZjrc8u3ddTShThDlTLluM03/S2a86aciTcrNfPH J8QbEJ5YfX47AdVV7N4kOIpAziZNdF9rE/E2goIoZVoK68pSPOLbpQeHg1Dz+ux2h6DV rVug== X-Gm-Message-State: AOAM532gMTPmlrSAi073x6FoKkctAHeAbUZ0j4WIlPaGqa1FX6AeMzii Wz6TnWK/BW6bS949IDZR7SZqQ+sQZ/3E1g== X-Received: by 2002:a63:214b:: with SMTP id s11mr26263654pgm.87.1626849730238; Tue, 20 Jul 2021 23:42:10 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 12/23] target/microblaze: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:44 -1000 Message-Id: <20210721064155.645508-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) -- 2.25.1 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) static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { - if (dc->base.singlestep_enabled) { - TCGv_i32 tmp = 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, CPUState *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; default: From patchwork Wed Jul 21 06:41:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483259 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5913854jao; Wed, 21 Jul 2021 00:00:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu94P7Dkfg9Ho1ZiY6w2BmS58DuEr3gW2Dm+mS6D7OraOEM4rVGv49lAOCRpOa6tZWhR7B X-Received: by 2002:ac8:7ef9:: with SMTP id r25mr3060448qtc.356.1626850858601; Wed, 21 Jul 2021 00:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850858; cv=none; d=google.com; s=arc-20160816; b=yY21sC4ozNAT+wgKEWYVRqHp0H1ce5YpMMU2HRwUUjKiFG5V/S5sj6/r1tXSm2m2Jb Q9p5Bzzv6cuMZpLavL992ID3KEPimZ26DfQPiiGNHhtx8NtM72/velcCuj6W52uIAhpt tAnYffBfPSw2eGT9TwBjiiZkjrx08q23KBFiUV8FxeFDX1K8whjwGH2M99kO1n7rRPK4 48GUzHCGOH+9+Kcfq47pjXQ7i9kgCLntaMwMrOPSljkhw0SanWrHeMdk09T30aaO6STg c8y1l6thTOv4o5pXG3mvKQifn7pn9I5JLSJXH7zOwspKyfmMXpmCdVbOpAiUA7+EKjJk ktuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=K170A+q0uF2SxDb8bwUFhGeVCad1b1WRSuX5MHPHonA=; b=FfgzKW/BkuoL5E42bPIYl+zNGVWrG64P6aARuxcuiOVSuc3/CqfgBTgWd4Mcvw9ccA /Po98pH1vtgHwAsKEQxrYCbOMoEaFKS4VfehniLotAvGSk8yRkxK2HkefuRDB0NDgsXP T4BNYsg5keioY151lXg0DoUgasKeTpTEl2sQpmuARAUqhyATnG+1FPUdPUEcVtW904zg AQzP9QOaoYkyIFoJz990yDbMvqLuTEtgD9zAWZtBFoW2I5+m8qdgcj6tvXF3KLDl0xQm 3Nu/fB7rcaqXdHgvVAz/mhwq8AUwJAgiDqscblIexxl+LZUhpKrSrw5B5kxDHrmaU5SQ G7Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z39AUgET; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m13si7432601qvh.166.2021.07.21.00.00.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jul 2021 00:00:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z39AUgET; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66Dx-0002FM-Ug for patch@linaro.org; Wed, 21 Jul 2021 03:00:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vq-0005Bz-6W for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:16 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:42804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vo-0005Yt-JZ for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:13 -0400 Received: by mail-pf1-x430.google.com with SMTP id y4so1478250pfi.9 for ; Tue, 20 Jul 2021 23:42: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=K170A+q0uF2SxDb8bwUFhGeVCad1b1WRSuX5MHPHonA=; b=z39AUgET2tOLJCD34NLoZGFg8x1tM8vfwS8C1XBWc9dNZZVVSS/nS+y71tW41ttjsz /bYs8jnIOI9A9JkYNuMDc37ydVyxO0ofMmD0fQqiUTnrUl9NGjfOmJCcuiMx93Nhd3Rv XazflA5bdhFJciyJrvRm+rF/TkkV1S5QujbtXMcyRQHoY2GzRyCQzzwTIw1tqAW39BdP O2hVun+wfpYz5WRqiYkzbgGATd+4/3mOSZEAwWShn7whMcqaGnurPULIedY1PIeVKkcG q78mNMsEjW7kofNAqyIvvCunKEQ324IIMqRFBH4Hdi8ka6yWdTBth4EaXO8uIbnLLqWf nxEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K170A+q0uF2SxDb8bwUFhGeVCad1b1WRSuX5MHPHonA=; b=rStkiMPVzl0sCwQAQsyC8V8CoFP/ya1e6VBOt3ltHiyCXm2mMWBw2in67d799IGWbI ZwfaLmvM+0qa6IZ5XAAM2GTFDEd0RqLhyImBDp6YmXI2U1/shq9HB/3/M4fVKUTtG5Po pqkbSpRbjatxcZNUcKB9wrUBaLwMqzws/Ik7VhnEYE8y5UPajLC+zo0AA1JaOkYA32oc UP8togeKQ3/ycXARZjjE2Ap6GD3FkoJixscLd9sNQj6sGc+LIXUynIK0qs0eQ533/mk6 Z9xmD69tbG8gRB5GJCH6ykTtvpbEp5P2WF47kFV4+LOnpIWK+835KstdOICdQx4D6BaL NvFQ== X-Gm-Message-State: AOAM531JN29lLX6tiAMDZGYvOVu1iNq+2+775xGRQzrOop5q67qasHZ6 bA1A1aD6ycoDVFHDo9wEA3A4+2MeZpq2aA== X-Received: by 2002:a62:6c4:0:b029:324:8262:b3aa with SMTP id 187-20020a6206c40000b02903248262b3aamr34553341pfg.25.1626849731132; Tue, 20 Jul 2021 23:42:11 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 13/23] target/mips: Fix single stepping Date: Tue, 20 Jul 2021 20:41:45 -1000 Message-Id: <20210721064155.645508-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- target/mips/tcg/translate.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) -- 2.25.1 diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 5b03545f09..4d1e08cfb1 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -16162,6 +16162,16 @@ static void mips_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) ctx->default_tcg_memop_mask = (ctx->insn_flags & (ISA_MIPS_R6 | INSN_LOONGSON3A)) ? MO_UNALN : MO_ALIGN; + /* + * 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 = 2; + } + LOG_DISAS("\ntb %p idx %d hflags %04x\n", ctx->base.tb, ctx->mem_idx, ctx->hflags); } @@ -16231,17 +16241,14 @@ static void mips_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) if (ctx->base.is_jmp != 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) == 0) { - ctx->base.is_jmp = DISAS_TOO_MANY; - } - if (ctx->base.pc_next - ctx->page_start >= TARGET_PAGE_SIZE) { + if (ctx->base.pc_next - ctx->page_start >= TARGET_PAGE_SIZE + && !ctx->base.singlestep_enabled) { ctx->base.is_jmp = DISAS_TOO_MANY; } } From patchwork Wed Jul 21 06:41:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483251 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5909369jao; Tue, 20 Jul 2021 23:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqW7GD1TIVtbkF1FdObVHXt8VKqq5t3waF6gAL6sf1Rpee5wy5vkTB/pfIMlb182eh6pgA X-Received: by 2002:a25:442:: with SMTP id 63mr43182928ybe.114.1626850410846; Tue, 20 Jul 2021 23:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850410; cv=none; d=google.com; s=arc-20160816; b=ViZBNYOO9TaggrcdqF554xNWqrBGF55kFmkAPrBinbMFrb+bQZkHW7efKgisIjXcoo tjhupj0UWWDUD958nsEsRtOF1/1wDA8tbB1oVCMLPhgGfycPY+ui+O6nHCcvZIlIajXk FMB5mwzHnnv64d2wQvc12MvmJZ49DBo5WmVe8myWj53DnaXYiEEEnYKwpIleru8A0HWq XDK+jYLfpmD1kW1ETjqril6rKXSJaiUEfv5fl6j17ZJYJ5oJXrNabziidEDVKmIpFuEZ s3KSWtNzb/P5tvx88phcl6kVFJc9j1ISGlP3EbJ/mBUjtDu/jxgnQcIA2fC0z4tIiRFa fSww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Fd0k7maRz4Hvh/R97SBMlAMNFVW8IZR/FAfbKbq9Fxg=; b=lrMMuTZ1eAJ8kFvMg3PeCPi1MxNkAKxMNANgnWAZ3+ZH2r0iuxnov1pNMqpqhfxiDi ycvTrUeR5BO/y290K3ZFoajuZLtRbu6+RAgm5dXmxVTYaNzEMB6Zkoz8cI7EJeNRIRvI 2fZ09nG/oUGU3BTXc32xR5aXBnro6KDy4sLi6MRkYoWN+6TWgVCYRrUEYezJJbt35hTM 3GVxreqHif8FOd2F/SUIrFZOgJmCPtkviGIKjfrfZZWonebjNl+yy24a7ZT4/1Uh4j4M pWvhv0PKROd3z3OCwJ01ESO1My+5nOBU3weR49fuQ/3/3r7yDNutd4CffZrA9GUHIxNN CZpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lel+ljls; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y15si23836824ybs.241.2021.07.20.23.53.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:53:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lel+ljls; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m666k-0006fU-9a for patch@linaro.org; Wed, 21 Jul 2021 02:53:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vq-0005C1-UN for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:17 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:35453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vp-0005aV-ES for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:14 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 70so981690pgh.2 for ; Tue, 20 Jul 2021 23:42: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=Fd0k7maRz4Hvh/R97SBMlAMNFVW8IZR/FAfbKbq9Fxg=; b=Lel+ljlsnSDj/ONoSKuEu6dDAoEes7dthOvDtm9B+N2jOvnFWr2Udiv8HDzblH31GQ 0Z4xbCH+lk83hjbdBxSWiEnvoXs0bDQo+e3KGN0rsAUDnGFI0pCKtgpYkusWQp5SJsWh 6z/1wSen9To3laoJVj0wBr8T6xVxgyjPkOrqMtvJVa0JuPUMxIM1xfkl81XenlxNy1J0 UQAsgrw58h/Fd0K1NSIYF0kvmu1BkNTEdbwEFqBEIWy1a7Wi5RqQStFcDRRSSQeHRcmc cYvwblc0FlxSUfKVOhynAbZifkwuS4Oh97aLC/IVnVEndxK8368Ccj2TpHGm0QCYAkSG mZmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fd0k7maRz4Hvh/R97SBMlAMNFVW8IZR/FAfbKbq9Fxg=; b=c4c5xGVY0V2XAgUzJ4SJ4MexSvFeSw/rvaUKLSFQggXzxhy/+6pksPtxR667C4lOT/ YoJBc7H86kH84Eg4t5oP7d94puv+xa0jSW+/ehDwP7n+yt/1zmNS/BRvZ6DLZXZfPh0x xyCp5y5y6GJbrr857M7flVLQEPNh4K8/zKjp4OdDl+7jPOGlCdgnET1lS6T0YKUyLglb 3NBHzfA+LY4UUtIjhf/JLOnpClwhGELy3n3CBdzSB6qM4IogQ1TCENaIv+UeFturDhxR smwAgmpasiNGVE979JTRcEg1pXufrGiCJiZyGU4+pswis7cURty9iauxGIw/FyCSAqJj pQQA== X-Gm-Message-State: AOAM532B+gnBi91GeTRkC4vqS+vMzj5fL7HU7pW5+aMCHACFqlgohSxq qb6Of6UHK/zRwkIzIeUmXqZ4Mx7ADosibQ== X-Received: by 2002:a63:4e04:: with SMTP id c4mr34077706pgb.294.1626849732158; Tue, 20 Jul 2021 23:42:12 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 14/23] target/mips: Drop exit checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:46 -1000 Message-Id: <20210721064155.645508-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 50 +++++++++++++------------------------ 1 file changed, 18 insertions(+), 32 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 4d1e08cfb1..cc24d443cf 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -4954,12 +4954,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_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(); } } @@ -11929,10 +11924,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: @@ -16257,28 +16248,23 @@ static void mips_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) { DisasContext *ctx = container_of(dcbase, DisasContext, base); - if (ctx->base.singlestep_enabled && ctx->base.is_jmp != DISAS_NORETURN) { - save_cpu_state(ctx, ctx->base.is_jmp != 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(); } } From patchwork Wed Jul 21 06:41:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483260 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5915622jao; Wed, 21 Jul 2021 00:03:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznDvMKEQZ/QDzUViMAMAysQIA0JIlo1fmW/Ywh7THJ6DoswGhlryoFcdeL93Z76ovKfJwn X-Received: by 2002:a05:6e02:1bc1:: with SMTP id x1mr23107685ilv.33.1626851001396; Wed, 21 Jul 2021 00:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626851001; cv=none; d=google.com; s=arc-20160816; b=xGm0NMCDcazqjKqze6TPij/yB/4TSveobPCvVILY9uxhvwZsZI6YWR/KWMEOWUSkdM H3K/C23h1HZYvzKettkLXbv3k0Bx23ztunZkTW6QrtcqEQmJmPdIGm3u19NfCuuRRugP f+M9YFRIiICYMgcPkg5Ccbm6DzY1gGAyU5Q/iUeRI7qh+oZIkRcs1w8R/FbLRcgsUdSi WDSFxtiOC13VqsbFyR0sJSw9C9p2NKgcW0K7FR1Spg+nR8YVDDFIM6cZsXkKPCwmVCiD RQJSrCuvpA/A3JTPqF3WXlny4rUpEUg26R71dQXlXzjOaCq2m54Zls4g1MQ6/2RTP7xb 7Kug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xElal7zBzDgeiDYpk/rqZK/vrTjKBD2Z3snsIesdaks=; b=Wyem2ix4Js8IpgeBjLUEiJ+FPf15Nr1XwEV6ERMDRg6x3zC9rjPwlkKjqHql4ZoVK5 MOmOvFUz672DCTnNE9nd7uMYNJD/B4fpnPifq4T2ghNi/sP9vfioPPDti8Gf7jON8lyP rz5Ulcx+TGU8GO4Tv/7M6uOkLaFrWCr+YNFaPrC54SSoQlm84R1H+mbv1oF2lJCQ1no3 cZPn9EWHrEwFo9i1iH41lmEyJHF1JE6OmOl7KOm1nTwAAdISA1CBdd2/xSyB4uthR6VI N99do6aHBOzi/DfU5k3kfVw3deoV/Y7hNaWzKeo74P6vLaeCSG0xM5I5iB8w+OsQMq/l NeIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mFVXkgNv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a10si25371076ilv.72.2021.07.21.00.03.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jul 2021 00:03:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mFVXkgNv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66GG-0006en-TY for patch@linaro.org; Wed, 21 Jul 2021 03:03:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vr-0005C3-R7 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:17 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:42806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vq-0005bp-Cd for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:15 -0400 Received: by mail-pf1-x432.google.com with SMTP id y4so1478294pfi.9 for ; Tue, 20 Jul 2021 23:42: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=xElal7zBzDgeiDYpk/rqZK/vrTjKBD2Z3snsIesdaks=; b=mFVXkgNvQAgyiBL/sjul8Z/OlnKd6DUaI9QePkcWjA7v+2pGcykDA7yz6B8qf0SbCl qtq9GbQjGTLNr/9sqJ5MzB+9kRnPovb6ha5CEikIoTbm+OQWP0by4Oh0TkL+ODFCrvQI rpL/5kHkA6E5m+j+yp1pRq6irYeqiPm5hfiwuhn2C6WVdJ/TvHevDGg+vprK1oQS+1pc YirImxHEJTYs9fRGaEhRysOknS1TZ5+yh1TQNPVZVPLzXTlvIPX9E5MaNbTF23GWdcON HizcWa7R6XhXlkf+hfCKDriFuwZUsTR/BEiaVk5b3XdKvGkl8UXzlKZtX4SjwTm3BwBT c6cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xElal7zBzDgeiDYpk/rqZK/vrTjKBD2Z3snsIesdaks=; b=m7o3EuV3clJ0t8kYURshQ3D1X6shu5nKeKtApbvVEkdF0OKGgD6Q3CCBzRlksu9vuZ PRZPF3Vxbtv0mhqBe0SS+M5KbebgfZsCSfC2aKyiQEcTf6UMqBqA/5iMfVVlXdjIdJrc IxfB68jHDrACV4xxPiU/n1qz3z/88kZjCZF5F4xPqHiG+kUtwgiXCTCUYcq6lpMbjxkq GOWWhF7bb3Wnu0HSGDVnCsuJbfn8utvmUyuJg9Tzq89Q2sLF6u6kgvihxJ7HcBD4XayZ 8BHRUA2C8PEPd9+cpiKZuZPfY2JmpuOj4VDGkqq0xw9qUaAhI6KJ26tTXseA0EhqWdw9 G1yw== X-Gm-Message-State: AOAM531vvxkBsrEqkNjH8x+KSD/37XD/jgb+RlDCK6NP2ig0wAmAqoEd agpNL10g+Y/UWYdZ1X+lPIxyGbNIL3Eo2w== X-Received: by 2002:a65:41c7:: with SMTP id b7mr34882402pgq.81.1626849733177; Tue, 20 Jul 2021 23:42:13 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 15/23] target/openrisc: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:47 -1000 Message-Id: <20210721064155.645508-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) -- 2.25.1 diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index d6ea536744..7e1aace63a 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1659,11 +1659,7 @@ static void openrisc_tr_tb_stop(DisasContextBase *dcbase, 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 *dcbase, 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; 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(); From patchwork Wed Jul 21 06:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483253 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5910984jao; Tue, 20 Jul 2021 23:56:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXns4k6V/2HR2F0AkLufbUfIlL8XT1/zW4+nXN0g+zwOE14QcFjYwkC6hQXaz9qWRtjyoj X-Received: by 2002:a05:620a:1322:: with SMTP id p2mr33616193qkj.432.1626850564584; Tue, 20 Jul 2021 23:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850564; cv=none; d=google.com; s=arc-20160816; b=tM9SnPt5GQY+BWk+GkhB7Cb5uNYlY4toHITHwi0BQRWh4g4AZS+PMPtnePIyTSSbUP 0RcZby4q5PWUo0tIpZPSk354q49lu4v9+4HkL/wZT87SjeK0LJQDXx9LNp20UHJhwCon /fX0ue22LRAVU1NQeeThWyZaSvEOo/jiRkM3issItCWR4M8GvkUP09Zr+7K8WW5vmjS0 gBUYcNxQmdCYSCVPBvcQdqzyOBrWmwMVxqIiLErz7rwLmYLx1BuYfZiWG/qMUMoXsoJg i5Ix0cS0tKW37TA+xg5JVfS8TCJnrqSIoI3UqbRFZPCSvzoO3Yeomrumayi5CjGNUOvk cA8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=0yWsbDmTZbiJvikOhyn9x2esTpv/FkMhTyF7Ez0FCJA=; b=IL0hS4uoeq/2UeSfcvOVLXGmHEK0u6fvdPVopz1EgaoZczqIDaXHLcdIPnjnXmOCBe 8EHZal8LxtMph7PhbYJiXNIIT2claBU/BSyhtQxnWJmXzC+gEA5UwAIAI846HZB9FKt4 Mbyzj2LGqIOlxs0NSl13arjOZg/Jp7shS/thJizQrzd6rNkqFKozSiysHgJFyPO6Ol3u HTrCDydoD5qlkvLr4noM0KrbTSn/mFgTgPXq1UpTyadyuPZonwJBtYh4os4OmVHHvKAO JLwiWdq/cuYZvUxC5NgN1DiN/tumCvISu/hpAJFs0201+PEMcs1mccBKFp9wPCpMlcM+ Tk2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gi8QZx6p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a17si6860156qkl.353.2021.07.20.23.56.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gi8QZx6p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m669D-0001vD-UT for patch@linaro.org; Wed, 21 Jul 2021 02:56:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vt-0005Cv-S0 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:19 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:38666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vr-0005d3-EI for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:17 -0400 Received: by mail-pj1-x102f.google.com with SMTP id me13-20020a17090b17cdb0290173bac8b9c9so3415509pjb.3 for ; Tue, 20 Jul 2021 23:42: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=0yWsbDmTZbiJvikOhyn9x2esTpv/FkMhTyF7Ez0FCJA=; b=gi8QZx6pCt2KMMGSsJDZs7qonW/uhYmxiX9PQaZsEjIACAqlRvSMDrhJDyIHXP3Eh+ C6ow1p5vQ5P6iisQ7D0f8yP/4Oi45tVrN2cEJyTJtDeB+zdwJShwfWMOjJ7qJEIMNbwX 8zXKzLKYYvlK5P/7KPZX8bnDcscxvlo7BtjW2NYeJgOnJEUTvod7PCNyZ3yILq++1Zm+ uxrOO/q9EVMgY4Kc6LnbvlktLXhvA8yg7R66e+A+vWa8RWX4HfSoGzAWlNr7dLMHzzgO IAy33oxy3Pd2P+c8nRSRRkFOpeRUj6WzCPuc3ktTdt6y4hhTcP+ZrBKHm8gJRCeZnwnq ybmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0yWsbDmTZbiJvikOhyn9x2esTpv/FkMhTyF7Ez0FCJA=; b=bVwBdfZ+6/zU1rMkKfdKGQnXGeThizsRW0FPbUbqSACV9Ai6zwTdMTw0RdX0vTTwJb dJltJHNo3kchKXNsal2Q1kpFH7/vJzHvd7Z7aBQofyK8uGEHy6j5y+1QFGu/xSnnc4uL q34sjGqGQuUOBW9BPTl2rTIjt3m7EoutN8/7jvVHadhVLAv5he/GhaO29dYqv0kxpabJ oeudj9SvXIEBoH34Ai0p3/ahOnuVUp6Nho6g1gVcQ+Cd0ToS0i2S2DRm8Nbj5KxGHr+X NJfoIxNMG8bLJ3Om5eR0dD3k97+XsNnd9noioyfnB6zsP1TOPquZoUSv+CI2SotOkW50 rddg== X-Gm-Message-State: AOAM530jWXotd9JEDwUD2aLx4Z+cjxkCAX9TSYJ9JnZHjxc20yQIxWet vEAdaeGAH1fcB6vTbbZRUxuh3C6y5sMY2A== X-Received: by 2002:a17:903:234f:b029:12b:7bad:75cb with SMTP id c15-20020a170903234fb029012b7bad75cbmr15859776plh.67.1626849734159; Tue, 20 Jul 2021 23:42:14 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 16/23] target/ppc: Drop exit checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:48 -1000 Message-Id: <20210721064155.645508-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. 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(-) -- 2.25.1 diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 171b216e17..70dbb61a15 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -42,7 +42,6 @@ #define CPU_SINGLE_STEP 0x1 #define CPU_BRANCH_STEP 0x2 -#define GDBSTUB_SINGLE_STEP 0x4 /* Include definitions for instructions classes and implementations flags */ /* #define PPC_DEBUG_DISAS */ @@ -332,7 +331,7 @@ static uint32_t gen_prep_dbgex(DisasContext *ctx) 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(ctx))); ctx->base.is_jmp = DISAS_NORETURN; } @@ -4306,15 +4305,8 @@ static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) static void gen_lookup_and_goto_ptr(DisasContext *ctx) { - int sse = 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(); } @@ -8543,17 +8535,11 @@ static void ppc_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) ctx->singlestep_enabled = 0; if ((hflags >> HFLAGS_SE) & 1) { ctx->singlestep_enabled |= CPU_SINGLE_STEP; + ctx->base.max_insns = 1; } if ((hflags >> HFLAGS_BE) & 1) { ctx->singlestep_enabled |= CPU_BRANCH_STEP; } - if (unlikely(ctx->base.singlestep_enabled)) { - ctx->singlestep_enabled |= GDBSTUB_SINGLE_STEP; - } - - if (ctx->singlestep_enabled & (CPU_SINGLE_STEP | GDBSTUB_SINGLE_STEP)) { - ctx->base.max_insns = 1; - } } static void ppc_tr_tb_start(DisasContextBase *db, CPUState *cs) @@ -8621,7 +8607,6 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) DisasContext *ctx = container_of(dcbase, DisasContext, base); DisasJumpType is_jmp = ctx->base.is_jmp; target_ulong nip = ctx->base.pc_next; - int sse; if (is_jmp == DISAS_NORETURN) { /* We have already exited the TB. */ @@ -8629,8 +8614,8 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) } /* Honor single stepping. */ - sse = ctx->singlestep_enabled & (CPU_SINGLE_STEP | GDBSTUB_SINGLE_STEP); - if (unlikely(sse)) { + if (unlikely(ctx->singlestep_enabled & CPU_SINGLE_STEP) + && (nip <= 0x100 || nip > 0xf00)) { switch (is_jmp) { case DISAS_TOO_MANY: case DISAS_EXIT_UPDATE: @@ -8644,15 +8629,8 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) g_assert_not_reached(); } - if (sse & GDBSTUB_SINGLE_STEP) { - gen_debug_exception(ctx); - return; - } - /* else CPU_SINGLE_STEP... */ - if (nip <= 0x100 || nip > 0xf00) { - gen_helper_raise_exception(cpu_env, tcg_constant_i32(gen_prep_dbgex(ctx))); - return; - } + gen_debug_exception(ctx); + return; } switch (is_jmp) { From patchwork Wed Jul 21 06:41:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483254 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5911450jao; Tue, 20 Jul 2021 23:57:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOkC1ylxopdA/mEvwxUPe0r3LUcxDJuxNzOb7o+IO8b34zT6LvM0Z2TgWP9RIKw91/hQhJ X-Received: by 2002:a05:6214:a0d:: with SMTP id dw13mr34522413qvb.41.1626850620300; Tue, 20 Jul 2021 23:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850620; cv=none; d=google.com; s=arc-20160816; b=Snh5XgnAvGHGKVjGsmEbvbZYOnwn2Nk2p5U/cDfn5qKf3CfzI0L/EF48tXPN6YPF6L lWMJeNEh/Zcl9MWVgLIvrnVA+vZCT3WqDPzicl5C2ZlOGP3OTnbAp4xT+SbXFcsmJ6Av P25isCSF1uWmmx4LIJBOalFUflhqnN1c2h/kUbEd31ulcW/QIrqKH3WUWkCHAMuW7wKl QmzcjwPAs7QAuxEJ0N2NKIXhjbD1QFBQnqYdKb/EOxyju3AozRAMB7U0JDNqQwKl1wFh NrEDVsuFBnMhsvYhIfW7/wndtrke326Qfa76yes1UkBDIy3XsmwgvOrLOGbDsjA9ieAa K9Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=nxysE0WWmRPDejzkpuSoJZ+4twcSCKioszycI2xwiIwUIbNS0nCIgwHTSvo36DpR4R 8kAh4OyAFXLo16dLw9x5A56+WMFpSH5F/5GACTyPyqwmAzLIG5HyIE1TQ/8R+rA/ZFra X8kE6VzoLTIuKCtRTNmjQM0qqSk/wahqxP3wVQh9+7n80Jzp4U3tTiUbtB2qlP88dhdx CMyZW07+Ru/WO4poxNV0QOcZQeCCs0eFs9R94yDSL3rBql2ZIXUgG23WELtsaaHeouVz Q6VnPYGEln8hmF4Vx7tShm0Gg6g1RJzJljqYpqyaRI++NUvvCGcfffzqCyfFxLgx6ke/ mh3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tdd5AaxE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v12si9610946qkp.361.2021.07.20.23.57.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:57:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tdd5AaxE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66A7-0003sj-NJ for patch@linaro.org; Wed, 21 Jul 2021 02:56:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vv-0005DF-PJ for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:23 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:36441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vt-0005dj-Hf for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:19 -0400 Received: by mail-pl1-x62a.google.com with SMTP id x16so486834plg.3 for ; Tue, 20 Jul 2021 23:42: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=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=tdd5AaxEGZ+CQZo5mjK5HAWpVuzuXgq2WwKfiM/XofK5sqLA529OnQQ/ZKp/4tgLvx hXkAwoqNhv3nG598go24w/CCu0JE/cr25z/Us9enfVPbo+FXAcVaeYkHi2a6JIRAN8yi g0FcgEEu4vB+CFlSr6zcxsUtjT7YfRI+OWzranrnfcAhRtthTm4UN9pI7oW87194i6eO ee0MYsTrKJyPI1Hl2y6Edzina20LFiNS4JOYQmMo4hYwDAJuk91HcQztwdN+hG0zmD/G 717i+l7ImwX1zEpFo8DdUkBzwY64cT8p3trtZGCZ44A7iIc4clZa9natfkLjImWzi9aQ aNJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=MW4oITTxvspTZ54qDDMoHu7G3tDGnL7lWcooALoTy0mVDux4qoOE83++Vxv1xRHOib QSVBIEzLufnARR56sPZWX6fgxPI0Bti4t4oYgkE/wD7w/RC0xrLNXY86F9d1FO6YS3Ov ARJ0ULapAk5Vtlfd5t3VUBTP72OQUGy9fYHmU3S633NSd7nuDpZ73d3buNhOgGQfyaR3 EAEwjdHlqacuLzXz5SM/ZzUw60hoLnsF8XdrJLH8ZFamkI7aYsXSQ8jz03bFQTbaAD1N aMpUR0pPRHGhwbedCp5qo/eMAacpQ+j2bqeQqLIFtfuloh64msEOeA9SivuY3mCLAmB7 OS1g== X-Gm-Message-State: AOAM532GACq8IKyDKkzVbbn7fOqG/H3mqbERWj8wajiKOkyqtDzYVyY4 gPtV6Xo4eJOCF8meKBWQnv0LUiPM6HyDTg== X-Received: by 2002:a17:902:7c81:b029:12b:6ac2:3ad9 with SMTP id y1-20020a1709027c81b029012b6ac23ad9mr20187364pll.76.1626849735170; Tue, 20 Jul 2021 23:42:15 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 17/23] target/riscv: Remove dead code after exception Date: Tue, 20 Jul 2021 20:41:49 -1000 Message-Id: <20210721064155.645508-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have already set DISAS_NORETURN in generate_exception, which makes the exit_tb unreachable. Signed-off-by: Richard Henderson --- target/riscv/insn_trans/trans_privileged.c.inc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.25.1 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 = DISAS_NORETURN; return true; } @@ -60,13 +58,11 @@ static bool trans_ebreak(DisasContext *ctx, arg_ebreak *a) post = opcode_at(&ctx->base, post_addr); } - if (pre == 0x01f01013 && ebreak == 0x00100073 && post == 0x40705013) { + if (pre == 0x01f01013 && ebreak == 0x00100073 && post == 0x40705013) { generate_exception(ctx, RISCV_EXCP_SEMIHOST); } else { generate_exception(ctx, RISCV_EXCP_BREAKPOINT); } - exit_tb(ctx); /* no chaining */ - ctx->base.is_jmp = DISAS_NORETURN; return true; } From patchwork Wed Jul 21 06:41:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483250 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5909323jao; Tue, 20 Jul 2021 23:53:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcPCPq/t27mt5g6vdZeevMSoS5mjK7ela8Hw4xULq8QvlebD1NPIlLef6HKt45MVLmy/DZ X-Received: by 2002:a25:374b:: with SMTP id e72mr38387765yba.360.1626850406804; Tue, 20 Jul 2021 23:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850406; cv=none; d=google.com; s=arc-20160816; b=oM/3IWUmTBJrACwX18Mg0rO5yMlnDakO5YGXVkTEmj8jb3bBg0+cMuj5n4ptYfNb9n RCXeh/F4tJ+7nfUmixyNGiCzneJ6xv7KyqtkWGRaskgMX3WNlgAyZslu2l220zyoQv4D bfRdb0bOZwFJvxDmvG74W/J9nTLoO/vfZW9cbeKwkhxmNHijpm/ogfzjmRBFN3+WG7Kw 8W6n+yNKasDlxn7IF48b5flPYkEfb9HOMXc6NhO6M5UR63P55zx7XVun9RxmSC64BDSB knodwXPRvwrPus/k45ZrjzO3b3YhjchxRui36yraY5MJF14tPvCBGk5pxm1+VO9P7ubZ jZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=19+eBha8Su7fvWuryK0pEBtOSE7+NFntpYhh8TaiKnw=; b=b3l8F8pvGNMGbIvO2ib+6a44u5o6iDvA2rw0B3Etg2e75oDvibVcjZcXGZY22Tz3wo Z96XXY4JiMNAduah4U7OT+Tsv05oNNcDamV4Pn939qRVwK0nK38um7oSWpYoYKEpr5Yt Zo7Nonyop/8SNA52oRKhms+IG2CF1EY48DwDaZ11JwZXjLGbdftrL4a/J3Kcc0VYTovj LWCYeJCDdDjnQV0dGAZF0np//TvpzHRE2OpVnWLFKzOXed8SlYQ2CaoZxNltF6D+5kZK CDxh/vNdbtKYQPlzyV3Uy4Tc2N99zRKrnVerDM26giGpWg4W1fHAB+KDm6AxEH2jIiiv qsMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jCys5QIj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m130si27509455ybm.363.2021.07.20.23.53.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:53:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jCys5QIj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m666g-0004hh-5a for patch@linaro.org; Wed, 21 Jul 2021 02:53:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vv-0005Cx-7q for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:19 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:41815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vt-0005ez-Hi for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:19 -0400 Received: by mail-pj1-x1030.google.com with SMTP id jx7-20020a17090b46c7b02901757deaf2c8so465298pjb.0 for ; Tue, 20 Jul 2021 23:42: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=19+eBha8Su7fvWuryK0pEBtOSE7+NFntpYhh8TaiKnw=; b=jCys5QIjCTAAqzmcwZgaW3CXNnR2Du8jratp/Np7q6X9t3Frw34HkbDDr6VDgoQ4Xy 8qiCJU3SuI7RusSM1ntsHWp6N0VHt1RrHGleeYb1cogxZEHZ4uRSEkviE00YCp/qgxFS bvgLo3TDPiEctyNVkCRF4r7rBQkcdj5gRF0MBRKD/e+hnNi6gxeQbzt/P7DrhBtLGvvI H5HgIz5SXc+fvMJf8th5VJNiyYERqB+Zr3qNjNfO8t2n9fpSYXyNRUxgKTLJM8YsHCwX 2XDcoLEA7EoMasj9G3rTphGbgNYcFu/iS/gt4kQ/me995FIcrX8sKHFcrib+8uStgvRv UlWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=19+eBha8Su7fvWuryK0pEBtOSE7+NFntpYhh8TaiKnw=; b=Eyydeop56AIWUWteGNkj08xHoJt1VRmUE2/zGkdtjmdOrs4WR/OLeueir0syDF7SqS gZ4PkRudWM+QK0FCnNi7nJjIjLpRtXiUjmtZnIWAoIcouMP1R44GfHsEjfGt3lUp4iS+ pG2Chh7DMGlkJrRSWJWd5Ee866u7hiXcGIIBnH0MhfkvxHaVPvmWQv7iCfW3WZyOopGv L03GShF+s/a28iHXRv9nMGLMCyT0cbbfFCtGGY11B6zrDxRV7ARH1DCUxz2ttpY9Bk0x Lk+QHJz5Y7zB+OtIoNYym9tz4FZJEMXGINRoRBy1BmWuPRUoqWlUGo944m3YqXvbm6xH j0Fw== X-Gm-Message-State: AOAM530jTgrKA9uYMVIQkPHfMkXmykh/wsKo/YE+yclO5lhDIYm0URUr 0doesz7QYxZvcVBKAZ7uLYKufyThuyPGJg== X-Received: by 2002:a17:902:ea09:b029:12b:1dc0:ac74 with SMTP id s9-20020a170902ea09b029012b1dc0ac74mr26538689plg.82.1626849736106; Tue, 20 Jul 2021 23:42:16 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 18/23] target/riscv: Remove exit_tb and lookup_and_goto_ptr Date: Tue, 20 Jul 2021 20:41:50 -1000 Message-Id: <20210721064155.645508-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically, which means we don't need to do anything in the wrappers. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 29 +------------------ .../riscv/insn_trans/trans_privileged.c.inc | 4 +-- target/riscv/insn_trans/trans_rvi.c.inc | 6 ++-- target/riscv/insn_trans/trans_rvv.c.inc | 2 +- 4 files changed, 7 insertions(+), 34 deletions(-) -- 2.25.1 diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 6983be5723..b4cc79a494 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -131,33 +131,6 @@ static void generate_exception_mtval(DisasContext *ctx, int excp) ctx->base.is_jmp = DISAS_NORETURN; } -static void gen_exception_debug(void) -{ - TCGv_i32 helper_tmp = tcg_const_i32(EXCP_DEBUG); - gen_helper_raise_exception(cpu_env, helper_tmp); - tcg_temp_free_i32(helper_tmp); -} - -/* 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); @@ -176,7 +149,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) tcg_gen_exit_tb(ctx->base.tb, n); } else { tcg_gen_movi_tl(cpu_pc, dest); - lookup_and_goto_ptr(ctx); + tcg_gen_lookup_and_goto_ptr(); } } 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) 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 = 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 = DISAS_NORETURN; return true; #else diff --git a/target/riscv/insn_trans/trans_rvi.c.inc b/target/riscv/insn_trans/trans_rvi.c.inc index 6e736c9d0d..aef3e84ca8 100644 --- a/target/riscv/insn_trans/trans_rvi.c.inc +++ b/target/riscv/insn_trans/trans_rvi.c.inc @@ -72,7 +72,7 @@ static bool trans_jalr(DisasContext *ctx, arg_jalr *a) if (a->rd != 0) { tcg_gen_movi_tl(cpu_gpr[a->rd], ctx->pc_succ_insn); } - lookup_and_goto_ptr(ctx); + tcg_gen_lookup_and_goto_ptr(); if (misaligned) { gen_set_label(misaligned); @@ -461,7 +461,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 = DISAS_NORETURN; return true; } @@ -481,7 +481,7 @@ static bool trans_fence_i(DisasContext *ctx, arg_fence_i *a) #define RISCV_OP_CSR_POST do {\ gen_set_gpr(a->rd, dest); \ tcg_gen_movi_tl(cpu_pc, ctx->pc_succ_insn); \ - exit_tb(ctx); \ + tcg_gen_exit_tb(NULL, 0); \ ctx->base.is_jmp = DISAS_NORETURN; \ tcg_temp_free(source1); \ tcg_temp_free(csr_store); \ diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc index 83d9a285ba..56eb775cef 100644 --- a/target/riscv/insn_trans/trans_rvv.c.inc +++ b/target/riscv/insn_trans/trans_rvv.c.inc @@ -42,7 +42,7 @@ static bool trans_vsetvl(DisasContext *ctx, arg_vsetvl *a) gen_helper_vsetvl(dst, cpu_env, s1, s2); gen_set_gpr(a->rd, dst); 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 = DISAS_NORETURN; tcg_temp_free(s1); From patchwork Wed Jul 21 06:41:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483248 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5909138jao; Tue, 20 Jul 2021 23:53:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmldzcFPGQ+EkqOUTAKBMiz440LJ/J6+u/rxjlozeJ2zLe1eP+Li7Iak44iHayEOxxekcH X-Received: by 2002:a25:324d:: with SMTP id y74mr42269840yby.198.1626850384693; Tue, 20 Jul 2021 23:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850384; cv=none; d=google.com; s=arc-20160816; b=YYztANjgCwIkDVO0bDrhtPNK6ramHElIEzZlIgZV1i2kicdkBeiCaxnH5J8wKCk6TJ hdWXfy42BiFjEtPI2nQ0ffH/fNr6ByrTQ29vgklUW2dbwPTqCSc5oC4xqlQZvOhU1Fxx BZ4Sk/MO+uIWmRjo4h40RWl94AL5ptF3a/jNhq4Y0Gq2lONaLqHWzeleXE66M1ENpUKY dv6TgXpsdx0ytGTjHBkPSkUmgL9H4ePyRYoNCIYc7k+LA+gWqvagK15/IJeel9xYqcT6 sT1uUEM1/X/fPzRyeSd1U51Y/9h+6DVYC/eQ6GksM9vTpb9ahrI6viIV6g1hZT3PqE80 ehyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=e1o+LTNCDTCEYnibXAgW5W5UXTzPq2g9X5wgbhLcsnA=; b=vVNg+rFaKpdaWqQRtKxg7fK+oMXr5Y/69zV8fvM0irVVQSu+9JOJorXtR/zO84z0+Z +vaBYNn6YPQZ4meOL+Mw87kPq0/Du9BrFDxuHzo6N2FgLZfWz7M/iRxTEahedW9HmXu8 P6SPo2gP+lVVLRgiy2kMlPsM2xvKUg0oeOHqkeyG7CprKE2H7XqwO7XVTnnPOKmPGFbQ NJMYq7ROs9gMNWnnVuOc20LvXt3I6RHa4albPnmX7wDfTsjT6iqwgNX8OQRXiECX/bST o1tvShlyFmH7FHWJEd9dPfXnuIGoB9fvweWAtoNEfIOK3Iu84MNT78b/GUVgqqk5Pj0X 72aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=psWLD83X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v10si966579ybq.382.2021.07.20.23.53.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=psWLD83X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m666K-0004yb-4d for patch@linaro.org; Wed, 21 Jul 2021 02:53:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vx-0005DL-7V for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:23 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:45921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vu-0005fd-AS for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:21 -0400 Received: by mail-pl1-x62b.google.com with SMTP id p17so468279plf.12 for ; Tue, 20 Jul 2021 23:42: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=e1o+LTNCDTCEYnibXAgW5W5UXTzPq2g9X5wgbhLcsnA=; b=psWLD83XfCnv/48oXiTpKcnHLDdKbNCntNwLw1FYVCdo5BQixW0Rn+8pnBnQVeWb74 0FxoMniLPZMUIYdLEkFxOH+07bBdlm3TxbeHwXfNzMMOjqYQk4jDhloyrFPtfOA3FiGt K7vnSPsIYLHO4VokhzvUMb6XBGd40Tyjp1nuNOUNiYFE/N4R1n0dFlCgzs6s6i4aSV+L HQGnZV/wm80yUlE5b14plMwMYFfTG4tiXp5h5vTzl6jxafk/Xv24Fw0G3Q7Ih+1jYsc6 zvSURAPg86u9WaCgVjm3D8QIgYAMykkvKfIqNGT2SWCXkXLw1psuDkVUSYIlTJrU5x+L p2yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e1o+LTNCDTCEYnibXAgW5W5UXTzPq2g9X5wgbhLcsnA=; b=E6h9JIdWPQdqapCDdJAVPx9DP5JyCJAX32CPZgkUcMYMAYj4cdTvf+8vnBWXtOaLal XjrUtI4XU0aHiTB8F85o2me1rIqFtbGKLE8tao5O1UtUQqJQKjGb0GXqRDecz7LUFtuS UmTN8YhwWWCHrBGCo0y3E9IwbPC+28iOzAT8cdzFIRDNXbz0HUyJBe/K8yz7MCMf3R7H VgfVjHGDgWCxnpMnhDGK/0yTY496GJbv5x4TAufhEimYh+oU8QHuWdMnyqdZTgHu90fX eNgeoP057gDs5/RWlh7mFxADlIlTDnL0C53SzdXsAjFZoOh6niGCKUA5nBMqQb077e4+ yx2g== X-Gm-Message-State: AOAM533awoT0Yb7O+rrbC+UdJ/AIquo9fYUYT8DVFKGpcO74OTEVh8CI /jUuAl/f7mSbXZnkVqXynBTdK+uOchwssQ== X-Received: by 2002:a17:902:8347:b029:12b:95e3:3181 with SMTP id z7-20020a1709028347b029012b95e33181mr7453613pln.23.1626849737096; Tue, 20 Jul 2021 23:42:17 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 19/23] target/rx: Drop checks for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:51 -1000 Message-Id: <20210721064155.645508-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/rx/helper.h | 1 - target/rx/op_helper.c | 8 -------- target/rx/translate.c | 12 ++---------- 3 files changed, 2 insertions(+), 19 deletions(-) -- 2.25.1 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); } -void QEMU_NORETURN helper_debug(CPURXState *env) -{ - CPUState *cs = env_cpu(env); - - cs->exception_index = 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, target_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 = 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); From patchwork Wed Jul 21 06:41:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483257 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5912406jao; Tue, 20 Jul 2021 23:58:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY42x+/5RAALiL8m50RnumcE/B7KSEH8NsC15Q9RIcYiRVIcNAIvQdEeNG/tlohd0Mtkpo X-Received: by 2002:a05:622a:183:: with SMTP id s3mr17067201qtw.169.1626850717871; Tue, 20 Jul 2021 23:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850717; cv=none; d=google.com; s=arc-20160816; b=MzcgvYH24xY+Ek5+YLh9J4xB4dM5Lj+wADq8yTcxCQFkeka86XffUZHjqpQWf1kquW 3n/EeJU7sfgR4t0QyPRPZTcldXAg3VhqBpAl9hwQV5y8NL1UIHmijTW5T1cn8JvskClx b1gvNpOqZ9TUfMao/1nC6eyGzJ4eRkP3QT0+LvT4VqkIWNxOsULljPw5U3PWeztjJ376 bZWyAgbgQjFkpxRPYt/QKYxcKv3Oq3cYDvFvOpsbjLdbJzBwl1ixcV8/04vNGqmNhedF 7G5VaR66ZXLDdxQyMUFC15+7j77lN5g6vI4baMLVWVR2tY6LYl4PT5lrkb9NOZ0ItqTZ tslw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=busu5UKD/aLT5lG+3mLQc6ZgBAZSFxZi1JDubmEFxEw=; b=ymEST0bm09hfyJikrlJ3RhtwUZbSchnEfGDbJyGkEWJvTBEn8/iX9eCYe+QeU1my4B auuzeVtTpsax0MOw5b00pevXwiXYKJx3byr0jPIR/sg6hP8oJWx7ZE1eDq/1IrI8R2G3 5k2ptv7gadek2NXJe1QdYlK721lRH/4FEjmZE5rNu5IkNkwNI5yXQJBNhpEqWSxOFf9J uS/PCCbvmA8+Zs3CtA6rFfxaewPGW4RoIIRnOYrzrrJzRzG2+L4hdOVNsm1gtG4XACL3 poXqgl/0jCcz+2DH+63nf+7zL1RH+8V68CWqSXdSveIPzd5BRHbl7hJfvKfYOlGB0WzS xyTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZKV0YGB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s8si17093476qkj.327.2021.07.20.23.58.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:58:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZKV0YGB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66Bh-0008JR-64 for patch@linaro.org; Wed, 21 Jul 2021 02:58:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vw-0005DK-PP for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:23 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:45770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vv-0005gO-Bs for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:20 -0400 Received: by mail-pj1-x102c.google.com with SMTP id h6-20020a17090a6486b029017613554465so445597pjj.4 for ; Tue, 20 Jul 2021 23:42: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=busu5UKD/aLT5lG+3mLQc6ZgBAZSFxZi1JDubmEFxEw=; b=MZKV0YGB0ov5YHY822tWA9OTZqW5CbQfmx4qY7jYguUj9D2k0Y7x9smvxrBZdTx24k T4g2FW9KjxfFlRmSCfhYhwBOXSsoDaK/ehnoXsrEqsH0QMtodCtz4tVbgQUc1V1gO2yz pb3igkv5R8+3UhZG9plQrzMYxtxjen9w7pc/xPqg8znnBRLwpCws8/1VJGlFb2ATQxYg eyeswEfr0q0acsPhXPW0f5OFFBKOWxrCgoiVFUwkkrmIb56h9Kl/gXXsTc1cLqMATPAu 23d+tED7uuARthyeFAiN3rYHZUs/kfke3LBjCm6zXamUc2qYbAU2xbE5ZvvENrPEl6mB 2h5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=busu5UKD/aLT5lG+3mLQc6ZgBAZSFxZi1JDubmEFxEw=; b=sT9zXCQk2IQSwriPGgl7TWZ40HgJRaOtir34zQ7ckSvxYDXvlQN6Xcxh6xngGtDbAg YRi4KWQFT6p3gqPQqCIoQKJobg9uMnC0CIPlu9B8n3e0wi2cq/D2U97PxUysIOoE+l9Q oX61/w/Rozbsd241H7fDGKG/My+9M0SGX0RyKPq+dyWVWfZsgf4fIxLbdmpoMxIM8tGu cXapsLO7hE7nSEh5I+ZiAtliFSnlqwauicn8yIiREUkR8xHwKj40sHZNmoWiZPVBMBxp RHAxKRlHL61Sow0ezP8ViZ3XDRv66GMBX9FbDcLXAL7q5xFLQHCZoF+8Ni28xlNHudyB SPFw== X-Gm-Message-State: AOAM53305w+k4AJVrUyVQZKhimUjO4kJI58JkqsaybAm0u+WirRzAGo2 djw+3CpdZB307J64riLsZTazwy8UtJOwJg== X-Received: by 2002:a17:902:c246:b029:129:b2e0:be90 with SMTP id 6-20020a170902c246b0290129b2e0be90mr26835416plg.84.1626849738125; Tue, 20 Jul 2021 23:42:18 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 20/23] target/s390x: Drop check for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:52 -1000 Message-Id: <20210721064155.645508-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.25.1 diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 0632b0374b..1894ed7a66 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; }; /* Information carried about a condition to be evaluated. */ @@ -6541,7 +6540,6 @@ static void s390x_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) dc->cc_op = CC_OP_DYNAMIC; dc->ex_value = dc->base.tb->cs_base; - dc->do_debug = dc->base.singlestep_enabled; } static void s390x_tr_tb_start(DisasContextBase *db, CPUState *cs) @@ -6588,10 +6586,8 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, 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 == DISAS_PC_STALE_NOCHAIN) { + if ((dc->base.tb->flags & FLAG_MASK_PER) || + dc->base.is_jmp == DISAS_PC_STALE_NOCHAIN) { tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); From patchwork Wed Jul 21 06:41:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483256 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5912339jao; Tue, 20 Jul 2021 23:58:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza7vgz/OqA1Bwipc9tHTXVUFTrZ5dGtqxS0PjOiQuzavHhVvkLkPsmzR2e10iV9QL/x6WB X-Received: by 2002:ae9:e8ce:: with SMTP id a197mr32808258qkg.175.1626850710493; Tue, 20 Jul 2021 23:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850710; cv=none; d=google.com; s=arc-20160816; b=nrXuYzF2l4nUteccFRrw86mWZmmMRLEPKwizLultoedzofI8k7MtkcIYzIUxA10U+2 QnhhIO0nqQGOgaJGZSbiz2kioYh9siIiMgMLyXs/kJAXNZuz/AiTtevOlSVoQqhb7nwN CjBn/3Ro9NoRUwT3O+UoSLJWrkO6CVpXt1lM6WGXp5zO5KQCwKLl2D71tYZp+qGXL/qR vzk4Y+SxCEtOIvPAaUWmvPXS8/jemhx8VwqVr0m0cXMkAoM6k7KGuq8KHP44vTfjEWxL /RwaDrL0KjuDH8oefNAYS2Ib7vqPxivt5XTG7HJwuusIiXE+qUYMcoNElCeS9YR3aJ0U Le9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZjR+I5E2mfbwjMd9wQ1dGRQB0TRr29G+cbMBcP2brug=; b=hyY5kKtOA3JlJkCH0umIOGcWS4/UXI3HFK8/S02xsTAD7X6AyyJUXPUBHIo2UubhK8 3+59xdddDqfCfdPXjLUyS0+L8H4Oc3PzbrMrqVXagPydPkyo+MGTrjS03M1XRc2TqS8d V+R9KRLI9krzQuvInfaeUBOeM5/eJ9ih1R0+l/xCRYUFmPvzPkeUX+p5prGMJaO+L8OV Idglh/OryIaln9nJ7Qd2PVf5UxWQraQV/6vJdprCxZYaxUjXel2xl8U6iSYpAccG99W6 oEhlfvx72QNk7hAdXcKhCSCaQgS2SsO28nUiASNzfscaJsfNpd94/FUOPEV+IXXBvopV HSmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YaRsGTyl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z13si7209798qtv.34.2021.07.20.23.58.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:58:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YaRsGTyl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66BZ-0006nR-Ug for patch@linaro.org; Wed, 21 Jul 2021 02:58:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vz-0005DX-70 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:23 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:35832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vw-0005hP-8L for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:22 -0400 Received: by mail-pj1-x1032.google.com with SMTP id gp5-20020a17090adf05b0290175c085e7a5so3452127pjb.0 for ; Tue, 20 Jul 2021 23:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZjR+I5E2mfbwjMd9wQ1dGRQB0TRr29G+cbMBcP2brug=; b=YaRsGTylcyAtcJL8SFLipifeGMKUCxhNmRL3+TeLDl4RlZdNunUida6vM4qZ6OCITG 5hxV5vgStfkvlKnZPG1wtqvtuUkhEdOsG7KHjitCruDxpV/7o5xudehEC6aOqw2fwBud PvjmD3D6vfYtmNCPHOXm93M+Zq6uPuugTPppuasEkvSvOy2gm0Us8D5DrLf3sRY/Ecr3 pSgPpWXSlIYLUX8l7CHMblW3O/raLQHm8ALpSasMy0qoONpWJk7C6qbFsJTJpSn4H8zW sNUDLyM29VMY8zefG6IA274XH4fRyk28mafL6E3xDahrt8sYAlk5sk1aTYs+zK78ccKH UKig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZjR+I5E2mfbwjMd9wQ1dGRQB0TRr29G+cbMBcP2brug=; b=C1Xw4/KmtZxOTMhEAAy8JRVb4imfYByS45u9cFAX1vK4RBh2j9VSGn3PReLVvbap15 pGs12cGA0mi2nKs0Y7ORWO/MQErGIsdYQEdn2F7o2y1w6H4556zFs3PNIDBCGtfA2tb0 34b7bfMc8Uub6wMTjM9uy3GPhmlhpJPO50+j3QBIQ87cToxxvmOUVVawBexIpe3kTYx2 HMSbXb5mqAIZcPey9RxOg1/Yu4NCeUTjOO3L2UMMGYrPPt48fyP9DHSS3BBo1bDbDUI0 w/HldCVUqSLIRAG57lhzygX3h2JyEvy3G8OPKnINKhmWOWWWUdOqXm+sXjUCc5IfpO9g c/cQ== X-Gm-Message-State: AOAM5335xHIKLC56W4LEVanp4Wz+3jLJfBkg5ee+O7Pacy1Y1ybnhebb KA++ljNylBiWrBnlW0M/4bV4QT7USAkf7Q== X-Received: by 2002:a17:90a:fb93:: with SMTP id cp19mr33210543pjb.30.1626849739042; Tue, 20 Jul 2021 23:42:19 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 21/23] target/sh4: Drop check for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:53 -1000 Message-Id: <20210721064155.645508-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/sh4/helper.h | 1 - target/sh4/op_helper.c | 5 ----- target/sh4/translate.c | 14 +++----------- 3 files changed, 3 insertions(+), 17 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/sh4/helper.h b/target/sh4/helper.h index 1e768fcbc7..8d792f6b55 100644 --- a/target/sh4/helper.h +++ b/target/sh4/helper.h @@ -3,7 +3,6 @@ DEF_HELPER_1(raise_illegal_instruction, noreturn, env) DEF_HELPER_1(raise_slot_illegal_instruction, noreturn, env) DEF_HELPER_1(raise_fpu_disable, noreturn, env) DEF_HELPER_1(raise_slot_fpu_disable, noreturn, env) -DEF_HELPER_1(debug, noreturn, env) DEF_HELPER_1(sleep, noreturn, env) DEF_HELPER_2(trapa, noreturn, env, i32) DEF_HELPER_1(exclusive, noreturn, env) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index c0cbb95382..c996dce7df 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -81,11 +81,6 @@ void helper_raise_slot_fpu_disable(CPUSH4State *env) raise_exception(env, 0x820, 0); } -void helper_debug(CPUSH4State *env) -{ - raise_exception(env, EXCP_DEBUG, 0); -} - void helper_sleep(CPUSH4State *env) { CPUState *cs = env_cpu(env); diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 8704fea1ca..3ce35b9e4c 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -240,9 +240,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) tcg_gen_exit_tb(ctx->base.tb, n); } else { tcg_gen_movi_i32(cpu_pc, dest); - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else if (use_exit_tb(ctx)) { + if (use_exit_tb(ctx)) { tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); @@ -258,9 +256,7 @@ static void gen_jump(DisasContext * ctx) delayed jump as immediate jump are conditinal jumps */ tcg_gen_mov_i32(cpu_pc, cpu_delayed_pc); tcg_gen_discard_i32(cpu_delayed_pc); - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else if (use_exit_tb(ctx)) { + if (use_exit_tb(ctx)) { tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); @@ -2324,11 +2320,7 @@ static void sh4_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) switch (ctx->base.is_jmp) { case DISAS_STOP: gen_save_cpu_state(ctx, true); - if (ctx->base.singlestep_enabled) { - gen_helper_debug(cpu_env); - } else { - tcg_gen_exit_tb(NULL, 0); - } + tcg_gen_exit_tb(NULL, 0); break; case DISAS_NEXT: case DISAS_TOO_MANY: From patchwork Wed Jul 21 06:41:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483261 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5916289jao; Wed, 21 Jul 2021 00:04:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU2616pgVE870JpdMxcye5OhmWVT20y7wzhipsaPJO5qjk9HwesIDOY+TvjmAvNpT0rsXZ X-Received: by 2002:ac8:ece:: with SMTP id w14mr30292734qti.5.1626851063614; Wed, 21 Jul 2021 00:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626851063; cv=none; d=google.com; s=arc-20160816; b=pfI/53n7hsyadgtFpDdLwZr+237X8ouTqTQLXBFsUnbCkHLzjg1jkg1QJxq7CRxDvW HmTVCwyQftcFwqb6rbXcctHXRcPiWoh1VBdGtg4Bfdu3bAW5bNmOf2ig6zXS/TdrHyH4 qc3BDh6zRpYzzCw/PeEl4J0+6IxzWQg1BKBrf7dp3u4fN9Xw0qUsRfyhutVARhkfXpJQ Vol3a2Xnt9Orwlt5WafLESbapZk8VnRCYWS2mdGlDeju8s815l1/wUubmCofwU3KWEAu 4CevDQgqcrWriTAMezfJkg8okPjCcUQxfg6t03TBHDDpyHnmHq+8b1Y5yPou4Vd/+Osd xvxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=lWWxg8MR6KKJ1tBQpQnAGh32uFzHWDCE77XSSdScV5I=; b=zbrzWRLk6IvYe/AYdGya+5CWzQ7GhGbVr1iE0U46H0Uyv3fwuKcXc91LMykoGkUMXa ty/pZHiUgYaIB/JrEWKF0rvQkcoDF+CWV76vhv3Q50plS0PJcdY0tE8tNCi6DAFXAYP4 B1UKbd4I9laSXOI0prkensO0D7LFxb6+P6WuJ3JBCXHKjvLoRIwhUf9b41xafpgt1ebq IBI4mk16LKcj3y8Vy4TxPM0LOqD7D38nJBFrxSmQeHNZs/Q3HemL3du4jvfmAc2PYfYO xOM0wDyaEuVir4rnrl1x2lw3BQSMoQSw3/kNtHnlPuowiBfJWpwTDzGbSgzlrwECAAEg ViWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ku3qfA/5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fo14si19192183qvb.183.2021.07.21.00.04.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jul 2021 00:04:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ku3qfA/5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66HG-0001Fq-UX for patch@linaro.org; Wed, 21 Jul 2021 03:04:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vz-0005DW-5b for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:23 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:38629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vx-0005iR-Kn for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:22 -0400 Received: by mail-pl1-x62d.google.com with SMTP id u3so482238plf.5 for ; Tue, 20 Jul 2021 23:42:21 -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=ku3qfA/5bxKlMBqFkkKnVZMLEi+qiILhIlbk4twfDj+R28IOJB+y+WDSQ9HAhw4EH1 Oo1KHPn/VJanUm8nonUZ2VlKh0jqYgi/65rk7yIbj4695VLWb34juKDD8L1bzt8nUg8P mQ1Mg+n094a4VjGYNXsvdqj9uj+uuLr5CeXWgPpRaIro6s9+O8JtsI29+TOKpqxoY4/O /slEBjI+nMhBPhxDqzc2d9auDJDYsh75qzce/Xt9uD7Gs7YIKm/eHRDXJDizkF+Di2YD oFMEtjNYcxL1nJDhNxCRxDhIik62W3lct+hSZvV2fnWydRi8WUkaW4vewA7xlMUaKC9r fpZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lWWxg8MR6KKJ1tBQpQnAGh32uFzHWDCE77XSSdScV5I=; b=pv3rorwPDZWLurBrzvgFRnQilKzw4rKeqvbL4+zKl4xUrvpVHsz0Ok+kzXf3H14cuQ O6c+jKsQ3jOtmbTFO7OBXGpKFwVwyzKXVuGa96KtLjcTbhnauytrhj1b4Kw8wD0WclKJ Y42oaXkm0P8MxOCQBv9PUy/eX71IgXy300m+O8wO3z4RpV2wDgGcpoMQLEXrAuJbGDEq LUuPcLQbGUdZ00Z0b9eGC71Pxea5bm8j4yIRbVUC9bYTF/+HkCi9MFqlGIjCx7Wz1s9N a0bLXU30eY4j4M39i/6MYgL557FaVnav19N7AjQhjg6CQScTR7XTVQ3YD7mubskRM7W5 SIcg== X-Gm-Message-State: AOAM530yx+TVvd1KIUm/FZkUCgGrU8TXsk59QlvJMIuq+LNTF1ftX2RE yLBnySACTOBgsvms6ycJDDLqSM9yL1/KEg== X-Received: by 2002:a17:90b:4c92:: with SMTP id my18mr33134150pjb.167.1626849740328; Tue, 20 Jul 2021 23:42:20 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 22/23] target/tricore: Drop check for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:54 -1000 Message-Id: <20210721064155.645508-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/tricore/helper.h | 1 - target/tricore/op_helper.c | 7 ------- target/tricore/translate.c | 14 +------------- 3 files changed, 1 insertion(+), 21 deletions(-) -- 2.25.1 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(CPUTriCoreState *env, uint32_t class, raise_exception_sync_internal(env, class, tin, pc, 0); } -void helper_qemu_excp(CPUTriCoreState *env, uint32_t excp) -{ - CPUState *cs = env_cpu(env); - cs->exception_index = excp; - cpu_loop_exit(cs); -} - /* Addressing mode helper */ 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); } -static void generate_qemu_excp(DisasContext *ctx, int excp) -{ - TCGv_i32 tmp = tcg_const_i32(excp); - gen_helper_qemu_excp(cpu_env, tmp); - ctx->base.is_jmp = 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, target_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(); } } From patchwork Wed Jul 21 06:41:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483258 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5913122jao; Tue, 20 Jul 2021 23:59:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZbcn/Dm0Q1SLD540wWT0Fno3FdK0Qf1DsphvRGZlTWdpW/pZBSRcHSFZjhZ51HtlYffeg X-Received: by 2002:a25:a489:: with SMTP id g9mr41938198ybi.266.1626850799325; Tue, 20 Jul 2021 23:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850799; cv=none; d=google.com; s=arc-20160816; b=azSujRC9FLELsEZkQ4DmOAP/Js52JL7ioBn0PK+aQBOsew/kAdkS5HVzD+LKelqP+s 3ktBCeUGmlUYQ7jOTRgHwp2Ba3jldMNFxxurqC4czUSx4fPCWnK88ZLn+1ImQ7kyWGus E+GHB0pj4b8U31C7Yo1OLFgeNfeoTJ2DQngY9vIlG0Yb9h3pgCaOJQ1IMlNFvBuUUK54 CUy+AfMscqrwDVzMN4T2X7Ppv3x8GMvxaq78GEvLIGUT9PW+9I0K5g0dWfcexOzPsn9V RWX+7DdbqQgVDBjzFd2IianMc4NVY8Q1s87iJ5dDwhAIg0l1lzPuj2R1RxQm9tzF/fAI wbDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CzixB+E3HvHFDcaZAYJPFRD8OKsUYwozrqwpEEKECyQ=; b=ugT7fKnVHsIc2HZgHC5e3Xqg9E++9QS2PRylFp26q4LORl7Nt9LQMiz1O8eHulDHIl t4uJB0nf7yFEgD+IfhcQPVjYtWJqstAgMoZlv1v7Pg2FZ5unKM61xph0R323BPwtOCjY Vr30jUqBYwYs9NzQCxfhpTXE6MTR+eKrT3Bqmzl7tcNiPwC4ZKWNiHQGupOVlGsqIwNm MJ/Sg0ydWRvct2hWkCo0s9XwXoQB9c+3J13Xud2dgWuwNQXbMm2jag5liv1t5H+yk/9x Xl+N15bQaN9qmCLZzOSaU1Vd5ohsIkVWlz6rPXlc9pxObvgX1iZZe2GP/4HpgZh/rjeh OIFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GmkqcrUt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k4si14916710ybh.120.2021.07.20.23.59.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:59:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GmkqcrUt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66D0-0002ng-Pl for patch@linaro.org; Wed, 21 Jul 2021 02:59:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65w0-0005EI-7k for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:25 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:43877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vy-0005jA-Mo for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:24 -0400 Received: by mail-pf1-x42d.google.com with SMTP id a127so1472128pfa.10 for ; Tue, 20 Jul 2021 23:42:22 -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=CzixB+E3HvHFDcaZAYJPFRD8OKsUYwozrqwpEEKECyQ=; b=GmkqcrUtU38YAtSNGA1iNcS1GCx4koVU3gUH9HgaJhH0A9xDfzoX6k8sKXLaNSE0X1 nsirOcb5sW8Vnua3AVMAkR4viPEayvQqJAS6weRHUL5nW1dtMO7e49gtcN5eAzhtNvAk 5Ki/LSpSlmjGvy2kJweAA2DHhEB0BQrvcDSDnET7cmHz0nAOwwBSE26SHJqLKZkhbPb/ ttUs29upGQDszpnBZLOS9tUSZOW/YgCAFP+If5J3SYXk+PUhysBl/ORXoYPM1aAuPuoF fYZ5viehPVDRhYIryf6pSM//lioT/Ev2+Y6BADdWDyJxwvMtm502OSafMqz4Zt5Mq0W2 1TSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CzixB+E3HvHFDcaZAYJPFRD8OKsUYwozrqwpEEKECyQ=; b=QH7YjIM/PLT46Arzepl/RoVB6wUoqWxvv1L3bPW0MvzJvzy6XihxX5/EnEOGXJjo+o 3FHLG2cTnqrwYq5k36b3pwye6CMgdME4NjTF09qXWAeIRRkkxoQ3qZFw/XyAdcGfxr91 aJ3Nniu8ExjtRQdyLQbAO16Pypj+E5nqW1yIK46Jj/yXktqhIp4M2wqOy0JG+QaCXRPq W5DWj+aX8NL+9h+DrNP+hDsfQwYB23bDMBjtl2mKg4swtHk1W9nBWGOP9daN46Ev+3lO cjqntgjYcPsgmKKUVF2Jy0FaZ2VZkNOQG/7oZuciqnBocWw+g6LqsWLD44WB8Q39ZnzY NUrw== X-Gm-Message-State: AOAM532gAdfn9uOZXIAQ9gVoFfIwK9+RR8WJiWgzE0pDPDj91zxvRqqA 96u6cQ6FUrKhVcIE1yd5jpVxKJMPE3c33A== X-Received: by 2002:a65:610c:: with SMTP id z12mr35074816pgu.453.1626849741319; Tue, 20 Jul 2021 23:42:21 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 23/23] target/xtensa: Drop check for singlestep_enabled Date: Tue, 20 Jul 2021 20:41:55 -1000 Message-Id: <20210721064155.645508-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) -- 2.25.1 diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 20399d6a04..3fbf76f4dd 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 = gen_postprocess(dc, slot); + } + if (slot >= 0) { + tcg_gen_goto_tb(slot); + tcg_gen_exit_tb(dc->base.tb, slot); } else { - if (dc->op_flags & XTENSA_OP_POSTPROCESS) { - slot = gen_postprocess(dc, slot); - } - if (slot >= 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 = DISAS_NORETURN; } @@ -1292,12 +1288,7 @@ static void xtensa_tr_tb_stop(DisasContextBase *dcbase, 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();