From patchwork Wed Jun 12 05:49:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 166510 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3258651ilk; Tue, 11 Jun 2019 22:53:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6vclG9P0f5/C4OVq9d1YoMkmCDH7Eqj8d1/cZvw0T/yza7cLGeWP8za1HZ2OcbY+nRdbH X-Received: by 2002:ac8:32e9:: with SMTP id a38mr69936966qtb.245.1560318795646; Tue, 11 Jun 2019 22:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560318795; cv=none; d=google.com; s=arc-20160816; b=vzczQlMN1rddjzDhhRnp7gsSy11ztZcJ63tOMlDdTFbCVxiJAoQv/tAp9Ko79GLwxI ulZgU4cOTCp5NsbVDaI4nxHLRkVU8wrILcv4T9KhznVeL+RhGKtrgXOGhH0SO8dOrdlC 3qTJ5hroJoz9C7SvNEWIhP2tc10LIoqteHdnA0bnawjjcNVL1I4DOy//8eUCeKviYsnm nNYk03/sdsLy/liB8se2lpXmN8ad3bMaiG1G3Rwvpx9p8yzxWO0eia9tv5w4dtt8TUgX 4m0LMrd94/ywKBn4K0AfuXNTN+A6LvKGiiA2300n3zJwAXW/QD1XMEOCJ1lnZcwPcFke vhJQ== 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=JAKf1TpVtZ3OSjK0YLQUzBxV/UFK+dxjO+Dd7ysae/M=; b=FbRwXbl1yvSSt4TmRqPGEKNGz+cphiohVOCcV+VySZVAZCJ+ENtCphx7qNoGtadFEn xYdJNyFWIZHYzXq8PtSiChE6u71lsRFGCrvD8wzdQ9xFo+LeV9Jm4bnnFaw82DkOZey5 or5+7+ZFPAJJgAAW5I+cqGOYmbzIjtQ4KAKMmSEcUW/q42LXOqIpj178OpYJk69vb6w9 bKAgoiVF/5cEkZTD5+pXEE0MfEfqmLoN0jQpGoaXDm3kUtMejwIdgJLfY4ZnFI1STgdW ncFxMFar57/UhPE7C4evFEBQntxgN0B3qz2JNPav5DyGCQOdhv6WzX4cGN/AUtHisaJl D28g== 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="ezP/FgFM"; 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 m16si6496327qkg.3.2019.06.11.22.53.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jun 2019 22:53:15 -0700 (PDT) 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="ezP/FgFM"; 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 ([::1]:56826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hawCB-0000Jm-7J for patch@linaro.org; Wed, 12 Jun 2019 01:53:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58473) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1haw8m-0004Ur-8f for qemu-devel@nongnu.org; Wed, 12 Jun 2019 01:49:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1haw8k-00072W-En for qemu-devel@nongnu.org; Wed, 12 Jun 2019 01:49:44 -0400 Received: from ozlabs.org ([203.11.71.1]:33539) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1haw8k-00070u-26; Wed, 12 Jun 2019 01:49:42 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 45NwtR1Hlnz9sNT; Wed, 12 Jun 2019 15:49:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1560318575; bh=KS3YuiEIOq/GZnRXvIWmLklhlLsIdYGPylfsoDmpdvo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ezP/FgFM07clANxNp9kcWY167jth5oTPP+Qu+oyqCDhoE520KweugtXUgMFp05lRv 1P9BYCayylNXCxwgev9gFFbak8Lzn57ZT6NUtUy5n662Sdy+eUdY2GKhgUYqSFwC2e 6HehvV/SM68lFBU1dia0HzWV9EBYgdmqnDQUjoeg= From: David Gibson To: peter.maydell@linaro.org Date: Wed, 12 Jun 2019 15:49:27 +1000 Message-Id: <20190612054929.21136-12-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190612054929.21136-1-david@gibson.dropbear.id.au> References: <20190612054929.21136-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 11/13] target/ppc: Use tcg_gen_gvec_bitsel 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: lvivier@redhat.com, aik@ozlabs.ru, Richard Henderson , qemu-devel@nongnu.org, groug@kaod.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 Replace the target-specific implementation of XXSEL. Signed-off-by: Richard Henderson Message-Id: <20190603164927.8336-1-richard.henderson@linaro.org> Signed-off-by: David Gibson --- target/ppc/translate/vsx-impl.inc.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) -- 2.21.0 diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c index cdb44b8b70..e9b7562f84 100644 --- a/target/ppc/translate/vsx-impl.inc.c +++ b/target/ppc/translate/vsx-impl.inc.c @@ -1339,28 +1339,8 @@ static void glue(gen_, name)(DisasContext *ctx) \ VSX_XXMRG(xxmrghw, 1) VSX_XXMRG(xxmrglw, 0) -static void xxsel_i64(TCGv_i64 t, TCGv_i64 a, TCGv_i64 b, TCGv_i64 c) -{ - tcg_gen_and_i64(b, b, c); - tcg_gen_andc_i64(a, a, c); - tcg_gen_or_i64(t, a, b); -} - -static void xxsel_vec(unsigned vece, TCGv_vec t, TCGv_vec a, - TCGv_vec b, TCGv_vec c) -{ - tcg_gen_and_vec(vece, b, b, c); - tcg_gen_andc_vec(vece, a, a, c); - tcg_gen_or_vec(vece, t, a, b); -} - static void gen_xxsel(DisasContext *ctx) { - static const GVecGen4 g = { - .fni8 = xxsel_i64, - .fniv = xxsel_vec, - .vece = MO_64, - }; int rt = xT(ctx->opcode); int ra = xA(ctx->opcode); int rb = xB(ctx->opcode); @@ -1370,8 +1350,8 @@ static void gen_xxsel(DisasContext *ctx) gen_exception(ctx, POWERPC_EXCP_VSXU); return; } - tcg_gen_gvec_4(vsr_full_offset(rt), vsr_full_offset(ra), - vsr_full_offset(rb), vsr_full_offset(rc), 16, 16, &g); + tcg_gen_gvec_bitsel(MO_64, vsr_full_offset(rt), vsr_full_offset(rc), + vsr_full_offset(rb), vsr_full_offset(ra), 16, 16); } static void gen_xxspltw(DisasContext *ctx)