From nobody Tue Feb 10 23:54:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1559474542; cv=none; d=zoho.com; s=zohoarc; b=Xk/CZCSjba4WOLUjpO7Wju6UHLUGC64f5n4RAfBeb665u+0k15X2BiiJ9vJR767fF1C4Cjy/EAScab6GqQAW1HSXgJm5p3CsbsDIQ61HWnrVwQPMcN8nZv7zpmVOTFzdlhAx7OzOh5VpF5SlV13Xv2xkrbPY0NONFfbN5UOybO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559474542; h=Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=z5uz5MK4FPp2WSiOhjH0XPnM6py5nxOhW0L/trt/m7Q=; b=NgUSNTTUgsP/GFMCfopUNrrS0OXNqtegyejFvU0p6RNz/LacwyMWQKom0eMZyNuiuOFgK0nlJ3SkwKXAJ2ajb8RzQzjpo1vJkjGkM/Gi8ny9/26blUrhQ01i0imd+nqkPMgFoSBbMG3qLchK6LG5FMms20EElZolsdnemAniLwk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1559474542562418.0922648642006; Sun, 2 Jun 2019 04:22:22 -0700 (PDT) Received: from localhost ([127.0.0.1]:47803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXOZ2-00025M-Fj for importer@patchew.org; Sun, 02 Jun 2019 07:22:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXOPf-0003Ld-Gz for qemu-devel@nongnu.org; Sun, 02 Jun 2019 07:12:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXOPe-0003ZS-2K for qemu-devel@nongnu.org; Sun, 02 Jun 2019 07:12:31 -0400 Received: from mail.ilande.co.uk ([46.43.2.167]:51406 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXOPd-0002kX-RA; Sun, 02 Jun 2019 07:12:29 -0400 Received: from host81-158-188-206.range81-158.btcentralplus.com ([81.158.188.206] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hXOLd-0008A4-0L; Sun, 02 Jun 2019 12:08:21 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au, rth@twiddle.net, gkurz@kaod.org Date: Sun, 2 Jun 2019 12:08:51 +0100 Message-Id: <20190602110903.3431-4-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190602110903.3431-1-mark.cave-ayland@ilande.co.uk> References: <20190602110903.3431-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 81.158.188.206 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.43.2.167 Subject: [Qemu-devel] [PATCH v2 03/15] target/ppc: remove getVSR()/putVSR() from int_helper.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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" Since commit 8a14d31b00 "target/ppc: switch fpr/vsrl registers so all VSX registers are in host endian order" functions getVSR() and putVSR() which u= sed to convert the VSR registers into host endian order are no longer required. Now that there are now no more users of getVSR()/putVSR() these functions c= an be completely removed. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- target/ppc/int_helper.c | 22 ++++++++++------------ target/ppc/internal.h | 12 ------------ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 8ce89f2ad9..3b8939edcc 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -1902,38 +1902,36 @@ VEXTRACT(d, u64) void helper_xxextractuw(CPUPPCState *env, target_ulong xtn, target_ulong xbn, uint32_t index) { - ppc_vsr_t xt, xb; + ppc_vsr_t *xt =3D &env->vsr[xtn]; + ppc_vsr_t *xb =3D &env->vsr[xbn]; + ppc_vsr_t t =3D { }; size_t es =3D sizeof(uint32_t); uint32_t ext_index; int i; =20 - getVSR(xbn, &xb, env); - memset(&xt, 0, sizeof(xt)); - ext_index =3D index; for (i =3D 0; i < es; i++, ext_index++) { - xt.VsrB(8 - es + i) =3D xb.VsrB(ext_index % 16); + t.VsrB(8 - es + i) =3D xb->VsrB(ext_index % 16); } =20 - putVSR(xtn, &xt, env); + *xt =3D t; } =20 void helper_xxinsertw(CPUPPCState *env, target_ulong xtn, target_ulong xbn, uint32_t index) { - ppc_vsr_t xt, xb; + ppc_vsr_t *xt =3D &env->vsr[xtn]; + ppc_vsr_t *xb =3D &env->vsr[xbn]; + ppc_vsr_t t =3D *xt; size_t es =3D sizeof(uint32_t); int ins_index, i =3D 0; =20 - getVSR(xbn, &xb, env); - getVSR(xtn, &xt, env); - ins_index =3D index; for (i =3D 0; i < es && ins_index < 16; i++, ins_index++) { - xt.VsrB(ins_index) =3D xb.VsrB(8 - es + i); + t.VsrB(ins_index) =3D xb->VsrB(8 - es + i); } =20 - putVSR(xtn, &xt, env); + *xt =3D t; } =20 #define VEXT_SIGNED(name, element, cast) \ diff --git a/target/ppc/internal.h b/target/ppc/internal.h index fb6f64ed1e..d3d327e548 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -204,18 +204,6 @@ EXTRACT_HELPER(IMM8, 11, 8); EXTRACT_HELPER(DCMX, 16, 7); EXTRACT_HELPER_SPLIT_3(DCMX_XV, 5, 16, 0, 1, 2, 5, 1, 6, 6); =20 -static inline void getVSR(int n, ppc_vsr_t *vsr, CPUPPCState *env) -{ - vsr->VsrD(0) =3D env->vsr[n].VsrD(0); - vsr->VsrD(1) =3D env->vsr[n].VsrD(1); -} - -static inline void putVSR(int n, ppc_vsr_t *vsr, CPUPPCState *env) -{ - env->vsr[n].VsrD(0) =3D vsr->VsrD(0); - env->vsr[n].VsrD(1) =3D vsr->VsrD(1); -} - void helper_compute_fprf_float16(CPUPPCState *env, float16 arg); void helper_compute_fprf_float32(CPUPPCState *env, float32 arg); void helper_compute_fprf_float128(CPUPPCState *env, float128 arg); --=20 2.11.0