From nobody Tue Feb 10 08:31:27 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=1560690532; cv=none; d=zoho.com; s=zohoarc; b=Ca/RK9nr6fWe6nJA3lGAbAqkVAYfrLq1CsvZ/ts/ZHmQ7Ei+psLWnLGjKWcZypHDCs3XhmrfVGHNWpwf8101iSyLOfb3+3/uGxRoSn66PLtwXqcKe4aPbWUnPj7o/Ze8gsOfyz5CU6ExBemeLz13u154H2WxDxH6sh6wNSNr19U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560690532; 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=kt/BkglFdldFQeIjpsp3bsIRINY+k7Nw4t5rAXUrod4=; b=MfE6QmIwrFbG1kGcScdq/pCb8/QZP6slM1NjDn+XkKfeh5kfwhrP2iBIRTImflnqICBb3C0ISTefMz5hxvPPp+i+6gFc0bPR4EpjU4TAnRQ7fQ5q0kDGuecQ3QJBO73FQOOfUljrnnJ2dWBGras2mbMB32QpKCUtTMN4r5AiGso= 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 1560690532793573.0979941586019; Sun, 16 Jun 2019 06:08:52 -0700 (PDT) Received: from localhost ([::1]:39668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcUtv-0006Qq-Q6 for importer@patchew.org; Sun, 16 Jun 2019 09:08:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48108) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcUqH-0004CX-9B for qemu-devel@nongnu.org; Sun, 16 Jun 2019 09:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcUqG-0005QY-0L for qemu-devel@nongnu.org; Sun, 16 Jun 2019 09:05:05 -0400 Received: from mail.ilande.co.uk ([46.43.2.167]:46554 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 1hcUqA-0005Fb-6l; Sun, 16 Jun 2019 09:05:00 -0400 Received: from host86-173-229-95.range86-173.btcentralplus.com ([86.173.229.95] 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 1hcUQ6-0001jp-DE; Sun, 16 Jun 2019 13:38:02 +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, 16 Jun 2019 13:37:50 +0100 Message-Id: <20190616123751.781-15-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190616123751.781-1-mark.cave-ayland@ilande.co.uk> References: <20190616123751.781-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.173.229.95 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 v3 14/15] target/ppc: decode target register in VSX_EXTRACT_INSERT at translation time 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: , 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" Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- target/ppc/helper.h | 4 ++-- target/ppc/int_helper.c | 12 ++++-------- target/ppc/translate/vsx-impl.inc.c | 10 +++++----- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/target/ppc/helper.h b/target/ppc/helper.h index 7ed9effff2..3d5150a524 100644 --- a/target/ppc/helper.h +++ b/target/ppc/helper.h @@ -534,8 +534,8 @@ DEF_HELPER_3(xvrspip, void, env, vsr, vsr) DEF_HELPER_3(xvrspiz, void, env, vsr, vsr) DEF_HELPER_4(xxperm, void, env, vsr, vsr, vsr) DEF_HELPER_4(xxpermr, void, env, vsr, vsr, vsr) -DEF_HELPER_4(xxextractuw, void, env, tl, tl, i32) -DEF_HELPER_4(xxinsertw, void, env, tl, tl, i32) +DEF_HELPER_4(xxextractuw, void, env, vsr, vsr, i32) +DEF_HELPER_4(xxinsertw, void, env, vsr, vsr, i32) DEF_HELPER_3(xvxsigsp, void, env, vsr, vsr) =20 DEF_HELPER_2(efscfsi, i32, env, i32) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 3b8939edcc..5c07ef3e4d 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -1899,11 +1899,9 @@ VEXTRACT(uw, u32) VEXTRACT(d, u64) #undef VEXTRACT =20 -void helper_xxextractuw(CPUPPCState *env, target_ulong xtn, - target_ulong xbn, uint32_t index) +void helper_xxextractuw(CPUPPCState *env, ppc_vsr_t *xt, + ppc_vsr_t *xb, uint32_t index) { - 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; @@ -1917,11 +1915,9 @@ void helper_xxextractuw(CPUPPCState *env, target_ulo= ng xtn, *xt =3D t; } =20 -void helper_xxinsertw(CPUPPCState *env, target_ulong xtn, - target_ulong xbn, uint32_t index) +void helper_xxinsertw(CPUPPCState *env, ppc_vsr_t *xt, + ppc_vsr_t *xb, uint32_t index) { - 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; diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx= -impl.inc.c index e853ee1386..7a4b7cb8f9 100644 --- a/target/ppc/translate/vsx-impl.inc.c +++ b/target/ppc/translate/vsx-impl.inc.c @@ -1632,7 +1632,7 @@ static void gen_xxsldwi(DisasContext *ctx) #define VSX_EXTRACT_INSERT(name) \ static void gen_##name(DisasContext *ctx) \ { \ - TCGv xt, xb; \ + TCGv_ptr xt, xb; \ TCGv_i32 t0; \ TCGv_i64 t1; \ uint8_t uimm =3D UIMM4(ctx->opcode); \ @@ -1641,8 +1641,8 @@ static void gen_##name(DisasContext *ctx) = \ gen_exception(ctx, POWERPC_EXCP_VSXU); \ return; \ } \ - xt =3D tcg_const_tl(xT(ctx->opcode)); \ - xb =3D tcg_const_tl(xB(ctx->opcode)); \ + xt =3D gen_vsr_ptr(xT(ctx->opcode)); \ + xb =3D gen_vsr_ptr(xB(ctx->opcode)); \ t0 =3D tcg_temp_new_i32(); \ t1 =3D tcg_temp_new_i64(); \ /* \ @@ -1657,8 +1657,8 @@ static void gen_##name(DisasContext *ctx) = \ } \ tcg_gen_movi_i32(t0, uimm); \ gen_helper_##name(cpu_env, xt, xb, t0); \ - tcg_temp_free(xb); \ - tcg_temp_free(xt); \ + tcg_temp_free_ptr(xb); \ + tcg_temp_free_ptr(xt); \ tcg_temp_free_i32(t0); \ tcg_temp_free_i64(t1); \ } --=20 2.11.0