From nobody Tue Feb 10 10:20:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=1620828782; cv=none; d=zohomail.com; s=zohoarc; b=RTkQfZWkaeqdTJNvPeAvEOCz2zbA5ZBj98+La2Np+5LDyYGNJOWaALufeHeKLK5eV0afh7LT6EVYTQ6JZZhL4a02euFRqXAXfGO8FUZrixHAKv3hfMI0/rjC5b8hBYjNh9dLiTpcoRbor/pzinx1hn8TnTVpJSRGnL42ED1gMzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620828782; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=qCBzrIdAzjy13SaTB07Q5MaxIyJlxFvDlrJ4tiLwI5c=; b=jPYrTTXD6e/TfCWLt2zmbsevFbqMqC6Ow8XjCIRvzeTxHXy//JERxBAFiF/rpRYVoV8EURUFXGdfPMDeG0RVy0UspzUPVPkg1JmazdfoyUExU3DYEhYcfoRrWYVQlu1XUZqgJPIRwv/fw5s0pyykV3stTHoe6oTnO6j02Q32C3o= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1620828782619769.9027927748158; Wed, 12 May 2021 07:13:02 -0700 (PDT) Received: from localhost ([::1]:46798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgpbh-0000L3-JQ for importer@patchew.org; Wed, 12 May 2021 10:13:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgpXq-0004ZZ-HI; Wed, 12 May 2021 10:09:05 -0400 Received: from [201.28.113.2] (port=48830 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgpXp-00081F-02; Wed, 12 May 2021 10:09:02 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Wed, 12 May 2021 11:08:39 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 138F08000C2; Wed, 12 May 2021 11:08:39 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH 05/11] target/ppc: moved ppc_store_lpcr to cpu.c Date: Wed, 12 May 2021 11:08:07 -0300 Message-Id: <20210512140813.112884-6-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210512140813.112884-1-bruno.larsen@eldorado.org.br> References: <20210512140813.112884-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 12 May 2021 14:08:39.0228 (UTC) FILETIME=[4E8C57C0:01D74738] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) 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=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=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: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, "Bruno Larsen \(billionai\)" , matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This function is used in !TCG cases, so it has been moved into a file that is compiled when --disable-tcg is selected. Signed-off-by: Bruno Larsen (billionai) Reviewed-by: David Gibson Reviewed-by: Richard Henderson --- target/ppc/cpu.c | 11 +++++++++++ target/ppc/misc_helper.c | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c index 0ab7ac1af1..8a82e2ffa8 100644 --- a/target/ppc/cpu.c +++ b/target/ppc/cpu.c @@ -24,6 +24,7 @@ #include "exec/log.h" #include "fpu/softfloat-helpers.h" #include "mmu-hash64.h" +#include "helper_regs.h" =20 target_ulong cpu_read_xer(CPUPPCState *env) { @@ -90,3 +91,13 @@ void ppc_store_sdr1(CPUPPCState *env, target_ulong value) /* FIXME: Should check for valid HTABMASK values in 32-bit case */ env->spr[SPR_SDR1] =3D value; } + +void ppc_store_lpcr(PowerPCCPU *cpu, target_ulong val) +{ + PowerPCCPUClass *pcc =3D POWERPC_CPU_GET_CLASS(cpu); + CPUPPCState *env =3D &cpu->env; + + env->spr[SPR_LPCR] =3D val & pcc->lpcr_mask; + /* The gtse bit affects hflags */ + hreg_compute_hflags(env); +} diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c index b910ac6479..442b12652c 100644 --- a/target/ppc/misc_helper.c +++ b/target/ppc/misc_helper.c @@ -255,16 +255,6 @@ target_ulong helper_clcs(CPUPPCState *env, uint32_t ar= g) /*************************************************************************= ****/ /* Special registers manipulation */ =20 -void ppc_store_lpcr(PowerPCCPU *cpu, target_ulong val) -{ - PowerPCCPUClass *pcc =3D POWERPC_CPU_GET_CLASS(cpu); - CPUPPCState *env =3D &cpu->env; - - env->spr[SPR_LPCR] =3D val & pcc->lpcr_mask; - /* The gtse bit affects hflags */ - hreg_compute_hflags(env); -} - /* * This code is lifted from MacOnLinux. It is called whenever THRM1,2 * or 3 is read an fixes up the values in such a way that will make --=20 2.17.1