From nobody Tue Feb 10 02:00:51 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622710512; cv=none; d=zohomail.com; s=zohoarc; b=HTuRFvKSWhcGfmwTMbihtuP39GgCwTbHesj355k/OPQZQ4HKARZeRxORg6AiEuFjt2eed8zf3Dqn8WqdUPJDzIamz/9QQrxT6Q32DFCOcEIcQlKnkgYnimMdUtwxNNnnoI3/hfjiCVrU2Yp1U5OnLLHC9g2rpugiHyD/NvXp3ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622710512; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Q+fdyQfYwkZ+YCl9PnHfI/FmPA840ofFUL9FRfi4d58=; b=nrh3wj8c3lTw6laGm/yT6YL1pnx5UI8hW2QjaGwtfwlnkKrjaXE9vJ1W9XgMwYvewIWKoaXL9TyoAPOU23nRrywDHpnDlrqdPVZx2Vvxje91Sm6h9IVxOXfHREs56NfAWQ3LSkDCFj8xeug0+XwADmrXt8KyGcDUPhJZGzWdL6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162271051268790.60939648576982; Thu, 3 Jun 2021 01:55:12 -0700 (PDT) Received: from localhost ([::1]:44772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loj8B-0008VC-IZ for importer@patchew.org; Thu, 03 Jun 2021 04:55:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loieB-00009Q-Ia; Thu, 03 Jun 2021 04:24:11 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:53203 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loie9-0000jJ-RS; Thu, 03 Jun 2021 04:24:11 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4Fwf5s72zvz9t5m; Thu, 3 Jun 2021 18:22:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1622708561; bh=7vWR8zZvrNOrqImaR0WsJsiIz7OipXljRRHJ26P6Et4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YXYqQSa3eWC7vrWK1JurUyjPlgoKmH8AtJKgpN1oK42WTS4dxMbs0tjvfjHtBlyQH LxRmSaVlXpnYOkGP9HAxAdUg9uPyHz80PDWDB/N8rk/2zqq9ThbFrtNpwb4uIMl4MC /3Fcxcy9Dl0Bs4wwRPl1JRO9QY4PrMcT5SiOtGj4= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 42/42] target/ppc: fix single-step exception regression Date: Thu, 3 Jun 2021 18:22:31 +1000 Message-Id: <20210603082231.601214-43-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210603082231.601214-1-david@gibson.dropbear.id.au> References: <20210603082231.601214-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , qemu-devel@nongnu.org, Luis Pires , qemu-ppc@nongnu.org, Matheus Ferst , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Luis Pires Commit 6086c75 (target/ppc: Replace POWERPC_EXCP_BRANCH with DISAS_NORETURN) broke the generation of exceptions when CPU_SINGLE_STEP or CPU_BRANCH_STEP were set, due to nip always being reset to the address of the current instruction. This fix leaves nip untouched when generating the exception. Signed-off-by: Luis Pires Reported-by: Matheus Ferst Message-Id: <20210602125103.332793-1-luis.pires@eldorado.org.br> Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 95e4d9b815..f65d1e81ea 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4320,8 +4320,7 @@ static void gen_lookup_and_goto_ptr(DisasContext *ctx) if (sse & GDBSTUB_SINGLE_STEP) { gen_debug_exception(ctx); } else if (sse & (CPU_SINGLE_STEP | CPU_BRANCH_STEP)) { - uint32_t excp =3D gen_prep_dbgex(ctx); - gen_exception(ctx, excp); + gen_helper_raise_exception(cpu_env, tcg_constant_i32(gen_prep_= dbgex(ctx))); } else { tcg_gen_exit_tb(NULL, 0); } @@ -8672,7 +8671,7 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, = CPUState *cs) } /* else CPU_SINGLE_STEP... */ if (nip <=3D 0x100 || nip > 0xf00) { - gen_exception(ctx, gen_prep_dbgex(ctx)); + gen_helper_raise_exception(cpu_env, tcg_constant_i32(gen_prep_= dbgex(ctx))); return; } } --=20 2.31.1