From patchwork Tue Dec 18 06:38:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 154102 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3357215ljp; Mon, 17 Dec 2018 22:58:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/WfSSS4tDk//YQcBRh2ICSqyOgk/eOybLrwOV7qNTa1DvdGn/Zz1eM6cYXGeirk5Si+gB2z X-Received: by 2002:aed:3511:: with SMTP id a17mr16539702qte.153.1545116305912; Mon, 17 Dec 2018 22:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545116305; cv=none; d=google.com; s=arc-20160816; b=R8/IJnnctVlz+OnMxhDtpF0xvdviU80WEZa9qjmFGPbg02IJtqNnN4Ct6TMLoToIGH 16xPKxwugQVAhXBfVO3yyV/iJdVD53sqv5Q5Z9B5Gs+C01Gggg9Lq/5U/vaWl5qCafos 3GYxXV5laSjFxwFsNRE1L5HOd3/WQjr4VjEWdRQOPS05BsHU5H2Wu6sA33Alg2ynt0Wo e2VYcy596adRfvk60jA7o0qPJispcslY8URu+t6ypxuxnPlkTuIDm8GCvNnLZG2udZXR 4Swxu1WqOQJn/2t7QxE6gV71YQl3M/vlNfEALao9AGBAfxu2J7/iFPQVYPG22XsKbUYC 2CFg== 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=DfEDAOBAUOVsP11aCnwKVwokisF0su/yccCWcjyBBKI=; b=tpXy+tYhwaWHPy6G/CmiNi/9eEceeMkIQp7tnnkbDtDFEkdwgl24Z0CfgGuYLP8Gba 1Y3ST7rZDs8naPYsCzq03idCk3PnFVdBzV5sWTGqGeEhGuYTc/jPA8IURDNgjuji49bZ QmpCAnKNwMc7P7ghLCaCbDDg3kLQTWNpoNSJzkPXsGObUl6e0OH/Dy1ZhnKXT3yuadGH PHV+8PtXuZj8C/ss1WMdDhaa7JrQEy/nehydu/1z+dntx7idf0Zd5kF7htM+F1F3y3l8 aVGnmLAbw1c7d3kqojHhYXRxGo0OukM7/U+xMUijYNjSDCIIF66fxdlOfxDQgp54A4Lt iNQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Px/c15PI"; 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 j13si10072342qti.103.2018.12.17.22.58.25 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 17 Dec 2018 22:58:25 -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="Px/c15PI"; 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]:52126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ9Kj-00008F-BY for patch@linaro.org; Tue, 18 Dec 2018 01:58:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ92y-0001jE-V7 for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:40:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZ92s-0002ty-Sx for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:40:04 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:35929) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZ92s-0002IO-Ic for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:39:58 -0500 Received: by mail-pg1-x543.google.com with SMTP id n2so7350364pgm.3 for ; Mon, 17 Dec 2018 22:39:39 -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=DfEDAOBAUOVsP11aCnwKVwokisF0su/yccCWcjyBBKI=; b=Px/c15PIrd0d24Su/5y6db5UoaFfY1ZCGoIgD5D6wQdXgg700JbVIe88mSsrMT9f17 fLlBexL4zPNYcdfhoKZLXJESOaSvJN2F7vavHsBGAKskh9MLEadHLhRhSZhNAd91a075 Hx1Cu3m3oqTVe7eC5Jg1Z+qCvKMA28QnFs3Ao= 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=DfEDAOBAUOVsP11aCnwKVwokisF0su/yccCWcjyBBKI=; b=T9LOVOAT8Na/jp+ueMsX9ssiRxbLE0lnya2lxYzclCNPtGJn0QpwCyhlD4joCAqaT6 byAVQ5CpyEByLTXyHp393sbSHkCsztraDdL9yadUAf/Nix1CkmrhlKsDUtzmwp8i4WBw ZV3kRs5Qb8mUci3F039nQgOfGYkGsCDZOdeI3htH+XC/1rRDL9gakpnQ0MWOjLruIXI/ yXGzxiKCIOsGF4f6vIiO5+B74xyoJeKKr4yUALSlhLkzXqQy7BQL1/GNnMlxbxjgjR6r E+rt8KkMZJkY800M+v2IYZSMCGSazTamZeFhwMfbXiipewn5KMsW+ZiaTH05iT3ddcZh GDLw== X-Gm-Message-State: AA+aEWYUwkx+A4a5XxKNDcAw0OMwtSYwZLAyqx2ChpnBZNVuBtISB58b hUcs3Sy2iUn8CzoN7GrTtAdF2CY/W0I= X-Received: by 2002:a65:6645:: with SMTP id z5mr14880357pgv.351.1545115178247; Mon, 17 Dec 2018 22:39:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Dec 2018 22:39:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 17 Dec 2018 22:38:55 -0800 Message-Id: <20181218063911.2112-19-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 18/34] target/ppc: convert vaddu[b, h, w, d] and vsubu[b, h, w, d] over to use 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" From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Message-Id: <20181217122405.18732-10-mark.cave-ayland@ilande.co.uk> --- target/ppc/helper.h | 8 -------- target/ppc/int_helper.c | 7 ------- target/ppc/translate/vmx-impl.inc.c | 16 ++++++++-------- 3 files changed, 8 insertions(+), 23 deletions(-) -- 2.17.2 Acked-by: David Gibson diff --git a/target/ppc/helper.h b/target/ppc/helper.h index c7de04e068..553ff500c8 100644 --- a/target/ppc/helper.h +++ b/target/ppc/helper.h @@ -108,14 +108,6 @@ DEF_HELPER_FLAGS_1(ftsqrt, TCG_CALL_NO_RWG_SE, i32, i64) #define dh_ctype_avr ppc_avr_t * #define dh_is_signed_avr dh_is_signed_ptr -DEF_HELPER_3(vaddubm, void, avr, avr, avr) -DEF_HELPER_3(vadduhm, void, avr, avr, avr) -DEF_HELPER_3(vadduwm, void, avr, avr, avr) -DEF_HELPER_3(vaddudm, void, avr, avr, avr) -DEF_HELPER_3(vsububm, void, avr, avr, avr) -DEF_HELPER_3(vsubuhm, void, avr, avr, avr) -DEF_HELPER_3(vsubuwm, void, avr, avr, avr) -DEF_HELPER_3(vsubudm, void, avr, avr, avr) DEF_HELPER_3(vavgub, void, avr, avr, avr) DEF_HELPER_3(vavguh, void, avr, avr, avr) DEF_HELPER_3(vavguw, void, avr, avr, avr) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 9d715be25c..4547453ef1 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -531,13 +531,6 @@ void helper_vprtybq(ppc_avr_t *r, ppc_avr_t *b) r->element[i] = a->element[i] op b->element[i]; \ } \ } -#define VARITH(suffix, element) \ - VARITH_DO(add##suffix, +, element) \ - VARITH_DO(sub##suffix, -, element) -VARITH(ubm, u8) -VARITH(uhm, u16) -VARITH(uwm, u32) -VARITH(udm, u64) VARITH_DO(muluwm, *, u32) #undef VARITH_DO #undef VARITH diff --git a/target/ppc/translate/vmx-impl.inc.c b/target/ppc/translate/vmx-impl.inc.c index c13828a09d..e353d3f174 100644 --- a/target/ppc/translate/vmx-impl.inc.c +++ b/target/ppc/translate/vmx-impl.inc.c @@ -411,18 +411,18 @@ static void glue(gen_, name)(DisasContext *ctx) \ tcg_temp_free_ptr(rb); \ } -GEN_VXFORM(vaddubm, 0, 0); +GEN_VXFORM_V(vaddubm, MO_8, tcg_gen_gvec_add, 0, 0); GEN_VXFORM_DUAL_EXT(vaddubm, PPC_ALTIVEC, PPC_NONE, 0, \ vmul10cuq, PPC_NONE, PPC2_ISA300, 0x0000F800) -GEN_VXFORM(vadduhm, 0, 1); +GEN_VXFORM_V(vadduhm, MO_16, tcg_gen_gvec_add, 0, 1); GEN_VXFORM_DUAL(vadduhm, PPC_ALTIVEC, PPC_NONE, \ vmul10ecuq, PPC_NONE, PPC2_ISA300) -GEN_VXFORM(vadduwm, 0, 2); -GEN_VXFORM(vaddudm, 0, 3); -GEN_VXFORM(vsububm, 0, 16); -GEN_VXFORM(vsubuhm, 0, 17); -GEN_VXFORM(vsubuwm, 0, 18); -GEN_VXFORM(vsubudm, 0, 19); +GEN_VXFORM_V(vadduwm, MO_32, tcg_gen_gvec_add, 0, 2); +GEN_VXFORM_V(vaddudm, MO_64, tcg_gen_gvec_add, 0, 3); +GEN_VXFORM_V(vsububm, MO_8, tcg_gen_gvec_sub, 0, 16); +GEN_VXFORM_V(vsubuhm, MO_16, tcg_gen_gvec_sub, 0, 17); +GEN_VXFORM_V(vsubuwm, MO_32, tcg_gen_gvec_sub, 0, 18); +GEN_VXFORM_V(vsubudm, MO_64, tcg_gen_gvec_sub, 0, 19); GEN_VXFORM(vmaxub, 1, 0); GEN_VXFORM(vmaxuh, 1, 1); GEN_VXFORM(vmaxuw, 1, 2);