From patchwork Fri Feb 15 10:00:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 158485 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp513767jaa; Fri, 15 Feb 2019 02:02:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IbS0XG3Ge4ro+OfG6wuzC0yulCSAQQFI+P2CLbKI3bwCK93yfGauQ+4E37GjkgCj++At1Ob X-Received: by 2002:a0d:c6c6:: with SMTP id i189mr7164691ywd.12.1550224955370; Fri, 15 Feb 2019 02:02:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550224955; cv=none; d=google.com; s=arc-20160816; b=F1176VecAbXIaWcotYLVowp09d9Xm3RMzPBoOnLgcFTGfHCYeUFDkikQgqVMKac7dR nnxGSCbHOykD/ADq0dLPkFgaqRQN3ebmw/P+hMgWvwAbOZK/PBYW5cBZF6LTZF+C5RNh R7CsYl0RbUh7bNyUNW9w+nO+PUw1NS0VLj8OZtGlBACkmPhl6LTwjkeCC+TnvywKzvzp wVQjZAzfgb2KtjoUQp3c0DymEEXYVnYb5vWWUMpJikA6VUtDFJGK8CoFbfIU0vpwNueM mqrm9MI3RxNhbz0s1/mNysLim1P6ejQjDyOTIzdTyQl/mC0SXZKPihnnG0RpDvJS8aBs kVUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=C4EaAhYnb6O2pBMgWPBuR8/YyuMozL/8T0q6q3qhaEg=; b=dkkAY3iZIfgQrVWaEXD/nVDogm/GSwsl6EwzJSEPprGYS7MBlDJnI+crvX4zSniqg4 Xey5/Ls1I1Vw63SevDmmdW4fE6bKpdSqUicFaL9sKBiLX1S0+aD47xJ5R9/Tt48JEwkj nwblz+ct4+n7m/iGPz8gIUE+ye1p5XXdncFouArR+MbYqc1RPWmytUUQqEfvm05Ea6PT 06GCS3IGzFW3xk0fZFBhHpT1Xn5roHlobkhoMTiDtj0f1tiriQEXp8695Pu1ETIhoV5d d53fg4kf66AMaAcp7LGmN9HAIb+GLYlHfl/uW2o7WXrVoqUvhEWxFcBJVJlVxP9Ct7cl 847g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p3si3064929ywh.408.2019.02.15.02.02.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 15 Feb 2019 02:02:35 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([127.0.0.1]:35733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guaKI-0006n6-Tv for patch@linaro.org; Fri, 15 Feb 2019 05:02:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guaJq-0006mr-5t for qemu-devel@nongnu.org; Fri, 15 Feb 2019 05:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guaJm-0000PU-Bo for qemu-devel@nongnu.org; Fri, 15 Feb 2019 05:02:06 -0500 Received: from chuckie.co.uk ([82.165.15.123]:38787 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guaJg-0008OR-JT; Fri, 15 Feb 2019 05:01:58 -0500 Received: from host86-133-194-245.range86-133.btcentralplus.com ([86.133.194.245] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1guaJW-00027S-FC; Fri, 15 Feb 2019 10:01:47 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au, richard.henderson@linaro.org Date: Fri, 15 Feb 2019 10:00:48 +0000 Message-Id: <20190215100058.20015-8-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190215100058.20015-1-mark.cave-ayland@ilande.co.uk> References: <20190215100058.20015-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.133.194.245 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 07/17] 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate/vsx-impl.inc.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) -- 2.11.0 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) static void gen_xxspltw(DisasContext *ctx) { - TCGv_i64 b, b2; - TCGv_i64 vsr; + int rt = xT(ctx->opcode); + int rb = xB(ctx->opcode); + int uim = UIM(ctx->opcode); + int tofs, bofs; if (unlikely(!ctx->vsx_enabled)) { gen_exception(ctx, POWERPC_EXCP_VSXU); return; } - vsr = 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 = tcg_temp_new_i64(); - b2 = 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 = vsr_full_offset(rt); + bofs = vsr_full_offset(rb); + bofs += uim << MO_32; +#ifndef HOST_WORDS_BIG_ENDIAN + bofs ^= 8 | 4; +#endif - 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); } #define pattern(x) (((x) & 0xff) * (~(uint64_t)0 / 0xff))