From nobody Tue Apr 30 18:46:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=1606197212; cv=none; d=zohomail.com; s=zohoarc; b=EOMj9wKCEReotIT/egVe3dqJYMEg86v47kSfz97McOfOe4HFfwUBI3s7kuVdZGTxBJcM5L+mIAsqTml4yvtKx3+lrl5j3k2V8czYSv16WjPLq2H2As1xOHa0bREtfeKjbs6TE3VSJD6xlV1A0LcdSJRIJr100LrFpKCtJO9sU38= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606197212; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ftoJFlL0CG2DkO2TATF64J52NGPVhnaVZZ/rrNvSUKc=; b=FnftkcdD2oRzwAUNt1bJNEl7o5q+2tqOENW2RJp+leDcEff6Ziv4r+2ErdbGdKmBzcyTcYG/cJ2De9g+nic24wjAYvH8zy93tB8gFoDeXedXtByw5XBwOFzkgTKJ3AiXDG8bXLMsij6VWw3/agny/qX95EauPmvB6Qp8Hqe2fH0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1606197212880274.3904496086468; Mon, 23 Nov 2020 21:53:32 -0800 (PST) Received: from localhost ([::1]:59460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khRGd-0002m9-F2 for importer@patchew.org; Tue, 24 Nov 2020 00:53:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khREh-0001cf-D1; Tue, 24 Nov 2020 00:51:31 -0500 Received: from ozlabs.org ([203.11.71.1]:53987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khREe-0005WE-Ml; Tue, 24 Nov 2020 00:51:30 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4CgCnK2XY2z9sSf; Tue, 24 Nov 2020 16:51:17 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1606197077; bh=hJW71fux8M2sRdpesf6mBNsDFmX/bwnsaKy+Z1FcRYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EGLRcd2RLGDCE8f9QulsDNlIygcVLl8tpq4/rgGPul6QJmqMw/9KDJRHU2FsCWoCS N6BsyQ3NgDACAdlO5+EiukFb9H5ikqukwASn8EcLpI3oCEFoTm9qca7PiTYYQ5SOAX HZA5NAB9W9QQN56ch+VD6V3vyVQjOSyU41/qcNAc= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 1/1] ppc/translate: Implement lxvwsx opcode Date: Tue, 24 Nov 2020 16:51:14 +1100 Message-Id: <20201124055114.1017066-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201124055114.1017066-1-david@gibson.dropbear.id.au> References: <20201124055114.1017066-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-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: LemonBoy , Richard Henderson , groug@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.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: LemonBoy Implement the "Load VSX Vector Word & Splat Indexed" opcode, introduced in Power ISA v3.0. Buglink: https://bugs.launchpad.net/qemu/+bug/1793608 Signed-off-by: Giuseppe Musacchio Message-Id: Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate/vsx-impl.c.inc | 30 +++++++++++++++++++++++++++++ target/ppc/translate/vsx-ops.c.inc | 1 + 2 files changed, 31 insertions(+) diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx= -impl.c.inc index b518de46db..075f063e98 100644 --- a/target/ppc/translate/vsx-impl.c.inc +++ b/target/ppc/translate/vsx-impl.c.inc @@ -139,6 +139,36 @@ static void gen_lxvw4x(DisasContext *ctx) tcg_temp_free_i64(xtl); } =20 +static void gen_lxvwsx(DisasContext *ctx) +{ + TCGv EA; + TCGv_i32 data; + + if (xT(ctx->opcode) < 32) { + if (unlikely(!ctx->vsx_enabled)) { + gen_exception(ctx, POWERPC_EXCP_VSXU); + return; + } + } else { + if (unlikely(!ctx->altivec_enabled)) { + gen_exception(ctx, POWERPC_EXCP_VPU); + return; + } + } + + gen_set_access_type(ctx, ACCESS_INT); + EA =3D tcg_temp_new(); + + gen_addr_reg_index(ctx, EA); + + data =3D tcg_temp_new_i32(); + tcg_gen_qemu_ld_i32(data, EA, ctx->mem_idx, MO_TEUL); + tcg_gen_gvec_dup_i32(MO_UL, vsr_full_offset(xT(ctx->opcode)), 16, 16, = data); + + tcg_temp_free(EA); + tcg_temp_free_i32(data); +} + static void gen_bswap16x8(TCGv_i64 outh, TCGv_i64 outl, TCGv_i64 inh, TCGv_i64 inl) { diff --git a/target/ppc/translate/vsx-ops.c.inc b/target/ppc/translate/vsx-= ops.c.inc index 7fd3942b84..1d41beef26 100644 --- a/target/ppc/translate/vsx-ops.c.inc +++ b/target/ppc/translate/vsx-ops.c.inc @@ -5,6 +5,7 @@ GEN_HANDLER_E(lxsibzx, 0x1F, 0x0D, 0x18, 0, PPC_NONE, PPC2_= ISA300), GEN_HANDLER_E(lxsihzx, 0x1F, 0x0D, 0x19, 0, PPC_NONE, PPC2_ISA300), GEN_HANDLER_E(lxsspx, 0x1F, 0x0C, 0x10, 0, PPC_NONE, PPC2_VSX207), GEN_HANDLER_E(lxvd2x, 0x1F, 0x0C, 0x1A, 0, PPC_NONE, PPC2_VSX), +GEN_HANDLER_E(lxvwsx, 0x1F, 0x0C, 0x0B, 0, PPC_NONE, PPC2_ISA300), GEN_HANDLER_E(lxvdsx, 0x1F, 0x0C, 0x0A, 0, PPC_NONE, PPC2_VSX), GEN_HANDLER_E(lxvw4x, 0x1F, 0x0C, 0x18, 0, PPC_NONE, PPC2_VSX), GEN_HANDLER_E(lxvh8x, 0x1F, 0x0C, 0x19, 0, PPC_NONE, PPC2_ISA300), --=20 2.28.0