From patchwork Tue Dec 18 06:39:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 154114 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3367564ljp; Mon, 17 Dec 2018 23:10:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xjc/lQ7QGcpYfK/oNdM6fqXBdlgZxPhGDdl2m1p/91jjZ6PaAaqcJB9xaz02y0gUqDIZ2G X-Received: by 2002:a0c:9549:: with SMTP id m9mr16295755qvm.214.1545117033303; Mon, 17 Dec 2018 23:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545117033; cv=none; d=google.com; s=arc-20160816; b=Drua8fIaeBGq8paq9PhmU74hvI4fKrbfhwKrp0we4yBz2IZ8SFF2tv7HwyzvfrWXzF BxpZhLW2LEfcDuZhYDDUB+gMn+zrvYZUkIxKR21fXzyERCnHatuEjR76CaerJAIyrZdP DvsXFewc8dB5GzbpXYYApmmNPV96jH0xufsJ0Ea3wMg2C++UgmBK00F5T/32K6Fp17Pf VfDWSVpWvb6ocP/7xMtqeYqNJKzDpPRX7IWHsPmwK0W5YjG/hIBTe0qkh2hcvP7L+Yfe IxXvI5E5AQv8yptxCqqS4sh3tcziUIlmK9wI+TMeWIpdefzQhz0art7A5WQPAxsERtV+ 28Ow== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=G/n0AtjzKeXwi2DOVDVEH8AoSvsXLdyE81u7l7jdtpE=; b=DsSZy2kfkeWZFKLWNumxbjRbzWTXkWYx8SeejGLWOv7x6ACIZozWC+AH8KveSestKK 2j3mAQYS2OAIApSd3MJX10HO6YdjtWwUS1UijzjgdG7+Jf4FOty/tjujqB7j4/MENRO+ ufmYFJLbjw1iVR1vUw9AiUsxXW23oYYZhMMVxyywKvp9QjccmMozUUvIkIbKb6q+dQMf W56gBNE7AP3ieY1DPp+AN8k1k93UA6mXDOznVASp2r9h9KRz741BFRW3myFWtElAP14W U1SdqC6Jd9ML3de5zf71VfUjvV/dK6nQhWKpQt9cTuoPo7XpaWuIFG8P8zALyNEzG2t4 KcqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Rkv6RHSB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g5si2553635qto.196.2018.12.17.23.10.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 17 Dec 2018 23:10:33 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Rkv6RHSB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ9WS-0001b4-RI for patch@linaro.org; Tue, 18 Dec 2018 02:10:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ934-0001s8-IK for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:40:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZ92v-0002xp-Bm for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:40:10 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:35930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZ92u-0002a2-VS for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:40:01 -0500 Received: by mail-pg1-x543.google.com with SMTP id n2so7350519pgm.3 for ; Mon, 17 Dec 2018 22:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G/n0AtjzKeXwi2DOVDVEH8AoSvsXLdyE81u7l7jdtpE=; b=Rkv6RHSBDhKp459NEvsMaKECfjPUg/3B+5kOnsKeh+BihrAYM9np05xImHR1r1rqx9 w7cn2pZqCeLqBiS6spONNXDiXpz6KC06LtGkH0wBzScgGe+4WsLalJD9fn6DFGhIF4EB WzS04crtdOY6qVrAks/6PmY2eo8fKWV+UH4Jc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G/n0AtjzKeXwi2DOVDVEH8AoSvsXLdyE81u7l7jdtpE=; b=Rm5qhz3K7dgZJuYK7F2xDvFqy5WjQdeSszMIvma+Gp8lqVgP4b+7bshtE/4wHcwJGD NiYYQFvFI9MVkOpy5owgHIF4pJOkyWGBEzsKL59dsYjGyOP3JbQaOAPmW4FWeOSCIsvX jtsWjrp8HYLliA41OgJuVmYWUTXYg6eggem4Mw/YvuGoRtxKO7ziPSRwWkzdwv4O7NKl zu84xW/yDvnBzLe9CfvTNshjyGWK50/28QQ0LvNjDyWh88Jz8qb4FTZGJ3Uj7Z8juypA zB0H3qZxw7HuiUh7y0jqplT3eYzOmi3nXl1dM9jqj0EoPU5qV0MjOSPVpdPEVW07Hi69 pxOw== X-Gm-Message-State: AA+aEWa2wOSGprbmbHTVzNyNlzMR7RuaO9yLbQOu8J79X1GxCcisyGpS ZQKHPbjYYjRoF+hjz3/Cv1zJjVupEgE= X-Received: by 2002:a65:520a:: with SMTP id o10mr1909877pgp.276.1545115185643; Mon, 17 Dec 2018 22:39:45 -0800 (PST) Received: from cloudburst.twiddle.net (97-126-115-157.tukw.qwest.net. [97.126.115.157]) by smtp.gmail.com with ESMTPSA id c7sm27072509pfh.18.2018.12.17.22.39.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Dec 2018 22:39:44 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 17 Dec 2018 22:39:01 -0800 Message-Id: <20181218063911.2112-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181218063911.2112-1-richard.henderson@linaro.org> References: <20181218063911.2112-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 Subject: [Qemu-devel] [PATCH 24/34] 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: qemu-ppc@nongnu.org, mark.cave-ayland@ilande.co.uk, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/ppc/translate/vsx-impl.inc.c | 36 +++++++++-------------------- 1 file changed, 11 insertions(+), 25 deletions(-) -- 2.17.2 Acked-by: David Gibson diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c index d88d6bbd74..a040038ed4 100644 --- a/target/ppc/translate/vsx-impl.inc.c +++ b/target/ppc/translate/vsx-impl.inc.c @@ -1318,38 +1318,24 @@ static void gen_xxsel(DisasContext * ctx) static void gen_xxspltw(DisasContext *ctx) { - TCGv_i64 b, b2; - TCGv_i64 vsr; - - 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)); - } + 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; } - b = tcg_temp_new_i64(); - b2 = tcg_temp_new_i64(); + tofs = vsr_full_offset(rt); + bofs = vsr_full_offset(rb); + bofs += uim << MO_32; +#ifndef HOST_WORDS_BIG_ENDIAN + bofs ^= 8 | 4; +#endif - 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); - - 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))