From patchwork Tue Sep 10 22:15:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 827076 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp530237wrc; Tue, 10 Sep 2024 15:22:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXo71IFy9cGiMi5MKOHahVim6BOE13dyWE4Q5H7ToL/ilWjvUGJUglfNT+nf86DSCqn9KWMag==@linaro.org X-Google-Smtp-Source: AGHT+IGErvlKjFPvlGnkjLzE4scxDtJA+REpsSnxmZrljIyqmaYXY4QPmMpxiFKBqgSIT3k/d9ez X-Received: by 2002:a05:6214:3102:b0:6c5:566b:c91a with SMTP id 6a1803df08f44-6c55f82499cmr16156286d6.0.1726006936967; Tue, 10 Sep 2024 15:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726006936; cv=none; d=google.com; s=arc-20240605; b=G+TBggeWLgZT7zcSnkBjI7nzMkwl0oBhqeIRO3ZisdKJ8CRlyOfazf0aKlibbgCdCn SFbz8JaW5is2Q//Q9Ues5fGXfUpu/pN0+bK6EUW7NUUAyUaQ3gRQ2IOtJo1l+Qf/U66O O7fOnUCFwFwVgMefJ1Pk0fmlJYwVb3s0Tl+Ujh9lMWaTIDif0+VW/lJrXxwyFODdQoZA pzNcZT2UtsKqJRTpGbtvTJotbcJ3H2BZeTIEQmi8cfSawMu+BHR/HmYLs/qu+4haCSCC tGzz14m83JrEiVOpuegFlyGreEFZwyZ0WYOYBU2Vu/ARM/X/53DQyQLlv6tdbIsCwyVn WbEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:cc:to :from:dkim-signature; bh=YnSUA+ALMkkUgp2nZaPD+gGHE2tL17OL5Bsrx2xXh8A=; fh=ynTlK/oH/ur5RqvPhczOwhj4YatH1hTHyPq9uMdf314=; b=bvhd8SwsQ9HdEeJOOvTnFxYNIBAU8HJ6FJDgKMZpSf69DXfSt5QP3QfsLXexG/m+ns J5INN1PfD5WpHsv8WeWYXkvTY7xdBe07ded4AV8VAiCdUgTYysStRf3wn+bLcRn4LAiU z9ItfcytZgypYch2UJ5kxt39p6HA9NKpnZYIbSoLMZ+7BqMv8/4y2Nncm29PHUBhu1GX 18mfTrsW0E16jA5M1StdjHAHw/AJYJ2SGUjTT0EGpUpOBWeHiwMDlw5p7QyPF5LiqoG7 Qp7brLQCRZEO8+5HiGWAu16tOyT+uyPjE/mhemW1v3lE0QArfh9OjsbdvqUp8/ZZJ04O woJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CS9oIXVR; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6c53476fa6csi88974966d6.301.2024.09.10.15.22.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2024 15:22:16 -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=CS9oIXVR; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so9An-0003DE-9I; Tue, 10 Sep 2024 18:17:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so9AD-0008Kn-Ki for qemu-devel@nongnu.org; Tue, 10 Sep 2024 18:16:45 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so9A6-0006dC-92 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 18:16:44 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-71788bfe60eso980451b3a.1 for ; Tue, 10 Sep 2024 15:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726006596; x=1726611396; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YnSUA+ALMkkUgp2nZaPD+gGHE2tL17OL5Bsrx2xXh8A=; b=CS9oIXVREjeWphf222WuCIasUWB0XlPKhtnkclbnxFNkt2EXGTSmScJ1Jbs9Y8KgX6 gNIBaQk98yiKNCaq7hfgNesp4ZKPAFTO4dFa/wvxjCLaLLqtcKO8G1Vx9SF5QxPi2T4B UAp8DPFYtBOplaG9+GfUDpeF8bHsNI0j017FwLYaXTS3cJ1h1jns1EXQwdsoLZBH1Gf1 +TyW/YToVOjaX6TNtoKBlgxcyW7U3vvvzH/S9zGZx0U2gB6TtkfAiMTPPgN+SBfyvNap qFb66X2CefliqVM9LovivBoo5Afk2f7A55o9OFYUXZJTGyHjd9rYlZa8kOV+dHJDCGNK Pj9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726006596; x=1726611396; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YnSUA+ALMkkUgp2nZaPD+gGHE2tL17OL5Bsrx2xXh8A=; b=F9PRTcfRrG1easIa3TcFkLUcSk7ezplNW8JkrbgQqiLwRPEi9E21IGpOEuZ1FoRybY O4QHJGMZt3gOrUsBQpbl8ik1NRyAOY3lUmqfli4xDyBZkpJNd12+7VgniD0WI6a3wbtb EZzQqoEo51GvGdwd4Ry1/uLC04G214TyQ9qBmB/vG+fzNCad7D6GJyjuY9VPr4VqTZny 3bH2SiEphpBeN+JHAHqBwibbd/ad6+71rxm8A8Y3KyIRr5l0p9dFWvT1uC2p1e1B20NA g6W/J8HpEtISywzYwjfKLIQ2vH6KA1yI7d16+B1VdCYBjcVlw/QiqvjFTLSv4YOOcUIz r2ag== X-Gm-Message-State: AOJu0Ywfq4ZAI4Uen3EDQmdyR8Ra0LFG73bIUVC+I1dC8PGG3DGVpARz Vixr0Cwdvmj8OWpm6e6aHep/CfBPgVBVVlY/W9lMwFSD/FD8K3Ikvh0FCbhrRiJhBf4YF/AJpfB fKgmcfkI8 X-Received: by 2002:a05:6a00:4b46:b0:70d:2725:ebe4 with SMTP id d2e1a72fcca58-71916e7a2a1mr1263422b3a.13.1726006596413; Tue, 10 Sep 2024 15:16:36 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::9633]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71909003d0esm1884055b3a.93.2024.09.10.15.16.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 15:16:35 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Zhao Liu , "Richard W.M. Jones" , Joel Stanley , Kevin Wolf , Paolo Bonzini , qemu-arm@nongnu.org, Corey Minyard , Eric Farman , Thomas Huth , Keith Busch , WANG Xuerui , Hyman Huang , Stefan Berger , Michael Rolnik , Alistair Francis , =?utf-8?q?Marc-Andr=C3=A9_Lure?= =?utf-8?q?au?= , Markus Armbruster , Sriram Yagnaraman , Palmer Dabbelt , qemu-riscv@nongnu.org, Ani Sinha , Halil Pasic , Jesper Devantier , Laurent Vivier , Peter Maydell , Igor Mammedov , kvm@vger.kernel.org, =?utf-8?q?Alex_Be?= =?utf-8?q?nn=C3=A9e?= , Richard Henderson , Fam Zheng , qemu-s390x@nongnu.org, Hanna Reitz , Nicholas Piggin , Eduardo Habkost , Laurent Vivier , Rob Herring , Marcel Apfelbaum , qemu-block@nongnu.org, "Maciej S. Szmigiero" , qemu-ppc@nongnu.org, Daniel Henrique Barboza , Christian Borntraeger , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Nina Schoetterl-Glausch , "Michael S. Tsirkin" , Fabiano Rosas , Helge Deller , Dmitry Fleytman , Daniel Henrique Barboza , Akihiko Odaki , Marcelo Tosatti , David Gibson , Aurelien Jarno , Liu Zhiwei , Yanan Wang , Peter Xu , Bin Meng , Weiwei Li , Klaus Jensen , Jean-Christophe Dubois , Jason Wang , Pierrick Bouvier Subject: [PATCH 11/39] target/ppc: replace assert(0) with g_assert_not_reached() Date: Tue, 10 Sep 2024 15:15:38 -0700 Message-Id: <20240910221606.1817478-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910221606.1817478-1-pierrick.bouvier@linaro.org> References: <20240910221606.1817478-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+patch=linaro.org@nongnu.org Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Daniel Henrique Barboza --- target/ppc/dfp_helper.c | 8 ++++---- target/ppc/mmu_helper.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/ppc/dfp_helper.c b/target/ppc/dfp_helper.c index 5967ea07a92..6ef31a480b7 100644 --- a/target/ppc/dfp_helper.c +++ b/target/ppc/dfp_helper.c @@ -249,7 +249,7 @@ static void dfp_set_FPRF_from_FRT_with_context(struct PPC_DFP *dfp, fprf = 0x05; break; default: - assert(0); /* should never get here */ + g_assert_not_reached(); /* should never get here */ } dfp->env->fpscr &= ~FP_FPRF; dfp->env->fpscr |= (fprf << FPSCR_FPRF); @@ -1243,7 +1243,7 @@ void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) \ } else if (decNumberIsQNaN(&dfp.b)) { \ vt.VsrD(1) = -2; \ } else { \ - assert(0); \ + g_assert_not_reached(); \ } \ set_dfp64(t, &vt); \ } else { \ @@ -1252,7 +1252,7 @@ void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) \ } else if ((size) == 128) { \ vt.VsrD(1) = dfp.b.exponent + 6176; \ } else { \ - assert(0); \ + g_assert_not_reached(); \ } \ set_dfp64(t, &vt); \ } \ @@ -1300,7 +1300,7 @@ void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ raw_inf = 0x1e000; \ bias = 6176; \ } else { \ - assert(0); \ + g_assert_not_reached(); \ } \ \ if (unlikely((exp < 0) || (exp > max_exp))) { \ diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index b0a0676beba..b167b37e0ab 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -316,7 +316,7 @@ void ppc_tlb_invalidate_one(CPUPPCState *env, target_ulong addr) break; default: /* Should never reach here with other MMU models */ - assert(0); + g_assert_not_reached(); } #else ppc_tlb_invalidate_all(env);