From nobody Tue Feb 10 13:37:13 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=1619205865; cv=none; d=zohomail.com; s=zohoarc; b=kOhaRsatEnZL8lhiCKlqa//boN0SouavnEKxDd7SkPk2rbjHw5dX0GnmJyjtoPLUIoKB5nxBPmfSiOa98kUBzBlL8AOwdcBanCGx3iR72rjJ1TagS4VEgvE7+tUpFrEmeZhOLG1onQbcx8xPtQpylKgNLBqDl/QznmJqs82DFu8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619205865; 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=7/JEgc6iI7ABIlMZPNA7UOvGDCy5fjoapZ/ixknaFbI=; b=MQNmg/wNlAjuhKlN3ZzsuUM/Q29FZotbyyNHnZWRLwKEhsHy0RRCNpf2MBJXxU/P58/n1oJAzWADcVwWgwCc1j3nRTO2xW+qPp87hX21sKfgY/0dQFYr8EFE4fsAwh20y/WLz7PaQiBkgY4CuoqhGkWsbI6asYYLgY1Jgh/rtM4= 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 1619205865922363.9455086596348; Fri, 23 Apr 2021 12:24:25 -0700 (PDT) Received: from localhost ([::1]:43304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la1Pc-0005h5-Mn for importer@patchew.org; Fri, 23 Apr 2021 15:24:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la1LP-0003K5-QX; Fri, 23 Apr 2021 15:20:03 -0400 Received: from [201.28.113.2] (port=41032 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la1LO-0000eq-1c; Fri, 23 Apr 2021 15:20:03 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Fri, 23 Apr 2021 16:18:33 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 2471480139F; Fri, 23 Apr 2021 16:18:33 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [RFC PATCH 4/4] target/ppc: isolated cpu init from translation logic Date: Fri, 23 Apr 2021 16:18:07 -0300 Message-Id: <20210423191807.77963-5-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210423191807.77963-1-bruno.larsen@eldorado.org.br> References: <20210423191807.77963-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 23 Apr 2021 19:18:33.0264 (UTC) FILETIME=[739BD300:01D73875] 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, 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" finished isolation of CPU initialization logic from translation logic. CPU initialization now only has common code and may or may not call accelerator-specific code, as the build options require. Signed-off-by: Bruno Larsen (billionai) --- target/ppc/{translate_init.c.inc =3D> cpu_init.c} | 11 ++++++++++- target/ppc/meson.build | 1 + target/ppc/translate.c | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) rename target/ppc/{translate_init.c.inc =3D> cpu_init.c} (99%) diff --git a/target/ppc/translate_init.c.inc b/target/ppc/cpu_init.c similarity index 99% rename from target/ppc/translate_init.c.inc rename to target/ppc/cpu_init.c index 33e44f1363..38e4c87aa5 100644 --- a/target/ppc/translate_init.c.inc +++ b/target/ppc/cpu_init.c @@ -18,6 +18,7 @@ * License along with this library; if not, see . */ =20 +#include "qemu/osdep.h" #include "disas/dis-asm.h" #include "exec/gdbstub.h" #include "kvm_ppc.h" @@ -42,6 +43,9 @@ #include "fpu/softfloat.h" #include "qapi/qapi-commands-machine-target.h" =20 +#include "helper_regs.h" +#include "internal.h" + /* #define PPC_DUMP_CPU */ /* #define PPC_DEBUG_SPR */ /* #define PPC_DUMP_SPR_ACCESSES */ @@ -51,7 +55,12 @@ static inline void vscr_init(CPUPPCState *env, uint32_t = val) { /* Altivec always uses round-to-nearest */ set_float_rounding_mode(float_round_nearest_even, &env->vec_status); - helper_mtvscr(env, val); + /* + * This comment is here just so the project will build. + * The current solution is in another patch and will be + * added when we figure out an internal fork of qemu + */ + /* helper_mtvscr(env, val); */ } =20 /* diff --git a/target/ppc/meson.build b/target/ppc/meson.build index aaee5e7c0c..14f0ba5d48 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -2,6 +2,7 @@ ppc_ss =3D ss.source_set() ppc_ss.add(files( 'cpu-models.c', 'cpu.c', + 'cpu_init.c', 'dfp_helper.c', 'excp_helper.c', 'fpu_helper.c', diff --git a/target/ppc/translate.c b/target/ppc/translate.c index bb893be928..a4d9fb8d54 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -37,6 +37,9 @@ #include "exec/log.h" #include "qemu/atomic128.h" =20 +#include "qemu/qemu-print.h" +#include "qapi/error.h" +#include "internal.h" =20 #define CPU_SINGLE_STEP 0x1 #define CPU_BRANCH_STEP 0x2 @@ -7593,7 +7596,6 @@ GEN_HANDLER2_E(trechkpt, "trechkpt", 0x1F, 0x0E, 0x1F= , 0x03FFF800, \ }; =20 #include "helper_regs.h" -#include "translate_init.c.inc" =20 /*************************************************************************= ****/ /* Misc PowerPC helpers */ --=20 2.17.1