From patchwork Mon Jun 3 16:49:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 165678 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4715377ili; Mon, 3 Jun 2019 09:51:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0IhDVDWUMtAwTlPWBCM3gfEZ6xWb0VVgpr/KGg2KpUjGCxOUZ04QCU7eEs4gLKQf/Ss0x X-Received: by 2002:a0c:d7cd:: with SMTP id g13mr15214495qvj.101.1559580690952; Mon, 03 Jun 2019 09:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559580690; cv=none; d=google.com; s=arc-20160816; b=cGLq62NwOvpRUPsE6UGycP1wOKmJg0Z7DKcVLrIy/YtwjzJCNCtQUrDKSX0VGUxeTt 0BGT9J82t3IbpCcBd1lLw/nXmHl//7AE3exznArtfVIyOJlu3Lew+xJAsdhZ9zRZ/W5x Erz62rufhbB7VNyDp+YX9aYF3b0dFLxP+TJsd81esgOji37OBeEAHp49uCEJv3yAeVHE 1bNaiRVwf2PSpjTWADJZ/hU3kB/mC9jSNLvQhiOWUViKNKDmVeZNcKOyrM5P5ULO5OR9 sXm/ORmvfzbUGz1JHoAu6R0A5VY8llT82CZ+4cQhnjKuTam8IgHRKhXpi6Yq3plKzt9d IrQw== 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:message-id:date:to:from :dkim-signature; bh=9ZWdKnyaVrx4H/jMG48dGyd2SGruiOzI4OMVe9jItB8=; b=eu5UCxMqL0k5Tm9SAKOeUd5x5DokQUzRA6yofaRQ44fdhhI/IhbToAheAHJYrXw4N8 dir7GWJBcImlDh4QMLuWV9RrIVE9AmNMnoz3gcd2piyL1XYLJZes1/hh9Po9qN387mtq XG1K4jGyAkhudRgVDelzznLhRURaOLZ8zku9NN7FD4FVwDDWBRVLYGBiB6n3+0KZiVn+ 8fVP1WdHbHWvIfN4e+8iyLTg3taxhvWd3P+jfATTRksWROELW5qWvbJpS42nOFgwD6Rg 0TDutDpUHB8q/eynddJcAszZXn4oLxOP58tg2AeWKg7Of6Zzz7LRgH9jIKJPtelDRW9q gIHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CKfUyRPF; 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"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1si5764673qti.174.2019.06.03.09.51.30 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Jun 2019 09:51:30 -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=fail header.i=@linaro.org header.s=google header.b=CKfUyRPF; 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"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:38018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXqBF-0008Bg-Ut for patch@linaro.org; Mon, 03 Jun 2019 12:51:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXq9O-00075y-Ub for qemu-devel@nongnu.org; Mon, 03 Jun 2019 12:49:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXq9O-0007o5-11 for qemu-devel@nongnu.org; Mon, 03 Jun 2019 12:49:34 -0400 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:36682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hXq9N-0007lO-Pl for qemu-devel@nongnu.org; Mon, 03 Jun 2019 12:49:33 -0400 Received: by mail-ot1-x342.google.com with SMTP id c3so16723636otr.3 for ; Mon, 03 Jun 2019 09:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=9ZWdKnyaVrx4H/jMG48dGyd2SGruiOzI4OMVe9jItB8=; b=CKfUyRPFaMvsn83YdJU0SfdwY/IDzdtQ7sKl/TY8i2F+RgHoZrtemBwCIE9ZJrS5sp fuoIyAmTOWX69AUqNKytMD9yKDMCn//0AdaVCp6F6nCi0KQI86YdlbTTRn5vI8tNmErM fMCGqTtbZDLzgfTl4WUSrqkNVvF2j05WUL9w/0wiRDvpV1/ygn7/j1YMYHvKpcPKgHBQ fqYf62ASuN6XKH5WbtQQkI/kJw772LRp3p+5WvafeLBPLk0XN3q9rm705BEPnkciul3g wxVEyIlt3mhdrFScD+1xQWH4HJwzqjnPu39iu72TW7EY35+nZVdGGueolr/hXoPpnuPg Tu2g== 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; bh=9ZWdKnyaVrx4H/jMG48dGyd2SGruiOzI4OMVe9jItB8=; b=Uo3eB8w2i0aKlSr2b6to4sKBBsGAxH/+V7f1jH2+8jKIw54rv+fmaLO0cCg9VBqavP fYb4fYoknuMePXXhy+Cq2PDGqxQmw5FlVmvsWjxx3zaDtrWKdnqxPtWBW+2cO/q1Wqd+ dLsH9vLUS6jP2Kwo9cmcJKQFvYH1xz+Ie1zv3Kv1Te/aACQU6u/6nYjwf7dJkLCskkLG LYkSb4VltsOVxbP+dH1JkX+kgkqkVsH9pCnW7VEVbv9BFdg3FmobOMzsGrFb7iTTtmOo I8HmguHzNr5o+faHMKVnct+ZjrJe5eOh8sEODvfncj/c+k7iYE5TUfS1Ha5jZpWdbhul pEqA== X-Gm-Message-State: APjAAAXw4QID7Pe16/RkWUjOWcFP9gktFyeF6t31MJaZW1T+17d7CF31 POLY7KGT/0h7XAbyHvTvN4zk6MtxmU+lxw== X-Received: by 2002:a9d:69c2:: with SMTP id v2mr2010938oto.22.1559580571728; Mon, 03 Jun 2019 09:49:31 -0700 (PDT) Received: from localhost.localdomain (200-56-192-86-cable.cybercable.net.mx. [200.56.192.86]) by smtp.gmail.com with ESMTPSA id s4sm847781otp.3.2019.06.03.09.49.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2019 09:49:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 3 Jun 2019 11:49:27 -0500 Message-Id: <20190603164927.8336-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::342 Subject: [Qemu-devel] [PATCH] target/ppc: Use tcg_gen_gvec_bitsel 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: david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Replace the target-specific implementation of XXSEL. Signed-off-by: Richard Henderson --- target/ppc/translate/vsx-impl.inc.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) -- 2.17.1 diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c index 199d22da97..a7a0a88975 100644 --- a/target/ppc/translate/vsx-impl.inc.c +++ b/target/ppc/translate/vsx-impl.inc.c @@ -1338,28 +1338,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); @@ -1369,8 +1349,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)