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: 13799381 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6008A1AE865 for ; Tue, 10 Sep 2024 22:16:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726006598; cv=none; b=aq98Si+PFZInrW6YApcV3FqAFXtuLTqZQHqWKwUhXd8BnEmp6RA2tkPX2ZIr/Q0Saj85H1CNVoscA9PNM9Zh9eio4p8EU38200TJwXUaKVP5xOSXaOKFYFH9hzG2s/vL+TbfitetakZMQFf5Glq4T9V/JPoQiCExcFHXi6AzKUM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726006598; c=relaxed/simple; bh=OTXvuxRxic13QAFdym8Vi9DC9LBg1CiJHj/XKfZdLcA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R9XM0VXEZuh8vkS8LEq408SwtfRzc7Rpl/b+XWaTfkmN3Tbij4tK/nGndo/R+xfI1JbNmSSzG7yErrBgpdA4qdVaJhbzuD0UnaZhjR2TbAKhUxRNCguWrniEl6RdwnFt9hDeJ9Fbd0YiUEPsWcnDrps+92d8pJffHa3hterBzyU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GugwfLe7; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GugwfLe7" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7178df70f28so1002162b3a.2 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=vger.kernel.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=GugwfLe7XqcT1eUrUm5kLZvJESbgR/Di8lXvt+X0TsIXg5lquVbX6j6CD7JQADWRGY wJADpoKoRUcAbJRijKGPoqilZFSV10BgXCv3LtzbS8OHJVJOUetadE6vKKNMn0SGkXBL VoX00heeEIe5RgSdsiHFvmtNYrJicDUnI7Pnz4HDVtcjYl849kPPFJR/oNZPru+3Ocd6 wTv6dyHPvAyiSqgun3i7+wXmdyybjFJjY0001HSL4/knusBcE7lC0wSQz5wF0olZB/3F DPVrLTs417pql0O0vBhhk4km1rHP6GWlJiycLI0m8E2Gy/fqCCYjjjWrgVLshWSIF2qh F13Q== 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=efFmIx+1iFuNmAgwmQahgyKvKJNsP0nazJIRx2Y6xQcnIdNWiaL5Mx4rZLYKAgSFbm RB4r8LPtDJ1AwFBnIyoxsyjsOv7N0cLDvELW4xs0lzdn8Nxwk6/yMGNvJQeKGPSnjZkd eI0Z6HgCog7oqjhaqtLuWdFM40Og/ah/v7DQ0q7kvyygw3Cc+VTy0NjgzhPrhSwu1LBW s/z7Vf1vHB4LE/ppbyaEarSblMPH0+33saWxzqyEmyRoDgHLAec+MSkUTdqe9wkHymnJ EsWWYFcjEwGvuIgjlrP2a0brWwkHHO66+tU/IRoP5CENvWeJadZaU2MyABU8xnC+1al5 e73Q== X-Forwarded-Encrypted: i=1; AJvYcCVFUqekSsG+t/Gk+rhhsSh7TCVguWTcsPPb9PbgjGHZ+wgCfZqOtMGlIrJqcIGG/DKlLqg=@vger.kernel.org X-Gm-Message-State: AOJu0YzofvY/EuZ7vtYoZj+NZj7Pf8CEu3U8a35HdNutrUi+0z4LfGAR R7Vm4Y8m21dl0UqO7sLakzT3MXRirStlbO2SOGkyxx9/V12Hy2pkBPewxfqYreE= X-Google-Smtp-Source: AGHT+IFDzIZM3DP/M5OgAw1eZ3RYHrodZQmKcteQvXWpEmdrDFT50vvYruksRMQadCg93cKWdz6IHg== 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> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Signed-off-by: Pierrick Bouvier 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);