From patchwork Mon Feb 18 14:30:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 158624 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2602931jaa; Mon, 18 Feb 2019 07:12:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IYF06vVYujxOZXSSPiIFYAME8FXShnAC+PczNhPwqjV0+7OhK5/MxrLhaMN4GNjDtZW7AXt X-Received: by 2002:a25:a286:: with SMTP id c6mr19010376ybi.295.1550502731551; Mon, 18 Feb 2019 07:12:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550502731; cv=none; d=google.com; s=arc-20160816; b=ZVS8/YWlQqb/nYpc8z9Zdq1FJUP4K7ZBJn55bJpQSxu6GaDJdpWRQjB3XEaFjv7PoS TesDeJNAk5fahjLx8ifBhj0ET7JIvujTumFEfFKnwWbPvyPBU8nVT5293ZgYwiJUgI6T 1zC+yIhD6lOOFj+xd4TP/fQpDXUvdHVMWxnd/Vt0C3JU3ThF7yrXb0PQ8xYnN8HmyOV8 iONwbo8DmiIABemuCaqFn12qyvsD4ZqrtOJJzmR22Ytcsn4t5wUvrogBRYl24D4jsE/e wJvsB9FsIraYmSSGZy/ooPpuSVnvhtZlL2G2UPS8qNaI6AXB+OMsMZC4fWBwI2NSqwW4 cVbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=7KFMvbBEBeCoo8nZw0Hg1Ct31GQZ3B+DFIPYiUL/gek=; b=U743jCJ6ZNIGIxpp2usBKLNjr8IkBbDhA5FOlLeAXoLF9p5AmTbYR5w3hSmMqHOq5h 7I9EmE8jXtyA547XP+wFbSzEJzmKHAIy/kzgyl9biGEU4vey4rwVH81F62ER8vUMD1m8 g/2ApCTRitP3s8dpWpcVGOwYOrm/M6t9biFbjBp+fMUZZVjoROJvgLHs67po63aV5Dg1 Sb5G/R0VXyLSkFTNUZGdMYARmoebm6CLTZoBhH4Pfs5H7L3VPz0eEOAwl8K5yivLhfbN mltsaqLzmpiDVze/JQhgTjTAlYcu4SM0Gpy3fn2UzoYkZjHnqOqnpjcpr7yDDc1myFLA NRUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gibson.dropbear.id.au header.s=201602 header.b=bCoqZ9uF; 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 k188si2892137ywe.126.2019.02.18.07.12.11 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 18 Feb 2019 07:12:11 -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; dkim=neutral (body hash did not verify) header.i=@gibson.dropbear.id.au header.s=201602 header.b=bCoqZ9uF; 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]:60228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvkaZ-0005ZG-1e for patch@linaro.org; Mon, 18 Feb 2019 10:12:11 -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 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.20.1 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))