From nobody Fri Apr 26 00:15:56 2024 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; dkim=fail; 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 1550502827820482.2154848440251; Mon, 18 Feb 2019 07:13:47 -0800 (PST) Received: from localhost ([127.0.0.1]:60248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvkc2-0006mQ-OB for importer@patchew.org; Mon, 18 Feb 2019 10:13:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvjyD-0006oM-E6 for qemu-devel@nongnu.org; Mon, 18 Feb 2019 09:32:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvjxv-0003Ff-RV for qemu-devel@nongnu.org; Mon, 18 Feb 2019 09:32:23 -0500 Received: from ozlabs.org ([203.11.71.1]:52887) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gvjxv-0003BL-CU; Mon, 18 Feb 2019 09:32:15 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4435s12hWRz9sPc; Tue, 19 Feb 2019 01:31:17 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1550500277; bh=9CbsTN7zMnIBmdU3wrzDYYYfH6VFlUgeu8hBq9gZFik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bCoqZ9uFDfknpDANdlxaSzs3o5/+X9SGgrpWH/P0z3i9EseX4Z8o2HuzemXB1XpbY q+LsivLuLzHNYlj1FTMEFbWSF5BpidWvZrLo5wTRlve3uBhin+tObaQLOGBEApYMg1 LkZ7ijBUvsZlaTzBlzySQZNoepcwh6VQOwHvWsAQ= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 19 Feb 2019 01:30:39 +1100 Message-Id: <20190218143049.17142-34-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218143049.17142-1-david@gibson.dropbear.id.au> References: <20190218143049.17142-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 33/43] target/ppc: convert xxspltw to vector operations 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: , Cc: Richard Henderson , groug@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson Message-Id: <20190215100058.20015-8-mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson --- target/ppc/translate/vsx-impl.inc.c | 36 +++++++++-------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx= -impl.inc.c index 944fc0608a..0e8cecb00a 100644 --- a/target/ppc/translate/vsx-impl.inc.c +++ b/target/ppc/translate/vsx-impl.inc.c @@ -1359,38 +1359,24 @@ static void gen_xxsel(DisasContext * ctx) =20 static void gen_xxspltw(DisasContext *ctx) { - TCGv_i64 b, b2; - TCGv_i64 vsr; + int rt =3D xT(ctx->opcode); + int rb =3D xB(ctx->opcode); + int uim =3D UIM(ctx->opcode); + int tofs, bofs; =20 if (unlikely(!ctx->vsx_enabled)) { gen_exception(ctx, POWERPC_EXCP_VSXU); return; } =20 - vsr =3D tcg_temp_new_i64(); - if (UIM(ctx->opcode) & 2) { - get_cpu_vsrl(vsr, xB(ctx->opcode)); - } else { - get_cpu_vsrh(vsr, xB(ctx->opcode)); - } - - b =3D tcg_temp_new_i64(); - b2 =3D tcg_temp_new_i64(); - - if (UIM(ctx->opcode) & 1) { - tcg_gen_ext32u_i64(b, vsr); - } else { - tcg_gen_shri_i64(b, vsr, 32); - } - - tcg_gen_shli_i64(b2, b, 32); - tcg_gen_or_i64(vsr, b, b2); - set_cpu_vsrh(xT(ctx->opcode), vsr); - set_cpu_vsrl(xT(ctx->opcode), vsr); + tofs =3D vsr_full_offset(rt); + bofs =3D vsr_full_offset(rb); + bofs +=3D uim << MO_32; +#ifndef HOST_WORDS_BIG_ENDIAN + bofs ^=3D 8 | 4; +#endif =20 - tcg_temp_free_i64(vsr); - tcg_temp_free_i64(b); - tcg_temp_free_i64(b2); + tcg_gen_gvec_dup_mem(MO_32, tofs, bofs, 16, 16); } =20 #define pattern(x) (((x) & 0xff) * (~(uint64_t)0 / 0xff)) --=20 2.20.1