From patchwork Thu Jun 18 04:25:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191032 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1074776ilo; Wed, 17 Jun 2020 21:58:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHAgWCUrbHs3YYb0lVbbhhr7bqsjdFvyiYote/FoZZe4t+HynJTSPY1vZgTfvTH8le0zTZ X-Received: by 2002:a05:6902:52b:: with SMTP id y11mr3734766ybs.465.1592456294518; Wed, 17 Jun 2020 21:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592456294; cv=none; d=google.com; s=arc-20160816; b=BY09iLvOWoZTQOFHL3YNJvWnBXrfnGcgLNM/wYx9Mex4nEo4TcT713Swh4MLf607Ke mnYFjwcibabkL3/8NszS0vdNwX3rGQZP6fEnhq/IwRlVa9IZc2ZIm/ct0gb1ilxoXum+ QlDibXNi+2L9B0y8ejm+Tg/dyh5NXcsHQMUWGxiO/zQ2ry0QLKWWjPjMuGUtDhI7W7dy Sc2RGDaePfhfXVQ5Tiq203iElAGuEnQ0XokjxLLnTbkLAVNfvRjegXstmv84WISSq5fE zbB2E3IG8/q5ZimhwwtSyLXqvUf+vmAF3a4qdn8M00dYAuWlcuftjgumS8b4WofJLSuH V4dg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Cw8PC7ojj7h0r+iSkQynSb+Rabvgq1P4FgsvZJDiChw=; b=DugWz2H5MeZgwOP21IvFon3/DJqgceSNgihjNJTeOndeVtxm5p1ECvLeF8knOz2lB/ Pfc+iB9T3njkdJd26Ev6IPz5sX+P9MXmjw6C/jzH377U8mo+kF3Zis6iz/aVFEel4U5v T5EgZLqlPThlo3S28qi0WB67E5F9xSm0S/vzMf+Armi93qRD84Gcza/J5MWJX/zhVQMF gdOdHfjzJv1DyAnDtJJ6oHEV1qPh3jSjBGhTGVqvLAz1bPhYjPs+p+R8n/VVsZSgjUnF HcUUuR7ejPgl5B7S1eSpdLiDp+fAatrkPAT4j3ecL1y7GZGgHn/I3A9iyInWuOn5+JGM VVsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M4cHVKRr; 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 c11si1573754ybb.279.2020.06.17.21.58.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 21:58:14 -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=M4cHVKRr; 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 ([::1]:57264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlmcw-00071Z-0J for patch@linaro.org; Thu, 18 Jun 2020 00:58:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlmCE-00022l-Bn for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:30:38 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:44838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlmCB-00038J-90 for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:30:38 -0400 Received: by mail-pg1-x529.google.com with SMTP id r18so2322757pgk.11 for ; Wed, 17 Jun 2020 21:30:34 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Cw8PC7ojj7h0r+iSkQynSb+Rabvgq1P4FgsvZJDiChw=; b=M4cHVKRrLkkjcswZtYHaJ/t/hyGkIhC0QD0EPAHV04thhIs+cA4s2QYR/CJIe0axo9 hOQMZs+mGZ+1ADrygiDEoXEIfu4IC/GiUIKOz/cx5PXlD2gPKHlJ6OM37G7lXGglFg9R GyQSQPKU8uLU2Xa6h8RFi4PyG9udBoWAjANAOduGjuPN4aLs+jq9ERDdy4Ze6OwFoNWc 9gRmirRg2KXUbOMlBcujCJqEoWtF1kKHZDRy2Y/MK+opfphNoGkj8wdYYtDkT3QsLwXT IpUEDKn+HTAxTHNMgB9GKczwvtaHwXF3+ONP9SrTnl5o6VubTjxMpyZXMhFeXyFHzjkl 81kQ== 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:mime-version:content-transfer-encoding; bh=Cw8PC7ojj7h0r+iSkQynSb+Rabvgq1P4FgsvZJDiChw=; b=jH5b9Wg+eAQg23U1rrB6I79njGeFv0SSqeVQC4PrM+lsiful9gG0ZoaMT9yl7tVkbx sN7SIK5G6nZ7OZX4h/plpioKhOsNDnyqrjIUJqEFiJLpLO5fxIhEdjC7JRrYZ5rdpqQC q2mWNIx/+CSqTpP8pj9h6KKMv/OIOuyAstVN7LK10UTKXqyqG1nCfFc2rA4206kJkdWN +8yy3qdWpUytPdSK0qLnX9WdY+VjY4hAMgkUHtIFOgrXq4RQEHjzqXgsqn2rDbJhqJkn cUPCrOTYesnOEBvPdGS+n1SSYU/57WQa+z/uyb7U4RURIDFGes81gBDQX5ByzSh1BMiP IJHw== X-Gm-Message-State: AOAM530wSS53B+WgZcqqA+G41DgPlNvPd/HCNqeOssUjXmcDkgGdfFw6 VqrdqX4RQnYZnT/em1b2dj7hQ4v242I= X-Received: by 2002:aa7:96d7:: with SMTP id h23mr2021315pfq.320.1592454633015; Wed, 17 Jun 2020 21:30:33 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id i191sm1298861pfe.99.2020.06.17.21.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 21:30:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 055/100] target/arm: Implement SVE2 RADDHNB, RADDHNT Date: Wed, 17 Jun 2020 21:25:59 -0700 Message-Id: <20200618042644.1685561-56-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200618042644.1685561-1-richard.henderson@linaro.org> References: <20200618042644.1685561-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: qemu-arm@nongnu.org, steplong@quicinc.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Stephen Long Signed-off-by: Stephen Long Message-Id: <20200417162231.10374-3-steplong@quicinc.com> Signed-off-by: Richard Henderson --- v2: Fix round bit type (laurent desnogues) --- target/arm/helper-sve.h | 8 ++++++++ target/arm/sve.decode | 2 ++ target/arm/sve_helper.c | 10 ++++++++++ target/arm/translate-sve.c | 2 ++ 4 files changed, 22 insertions(+) -- 2.25.1 diff --git a/target/arm/helper-sve.h b/target/arm/helper-sve.h index 84281e3f9d..7627e0cd5f 100644 --- a/target/arm/helper-sve.h +++ b/target/arm/helper-sve.h @@ -2029,6 +2029,14 @@ DEF_HELPER_FLAGS_4(sve2_addhnt_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(sve2_addhnt_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(sve2_addhnt_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_raddhnb_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_raddhnb_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_raddhnb_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) + +DEF_HELPER_FLAGS_4(sve2_raddhnt_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_raddhnt_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_raddhnt_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) + DEF_HELPER_FLAGS_5(sve2_match_ppzz_b, TCG_CALL_NO_RWG, i32, ptr, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_5(sve2_match_ppzz_h, TCG_CALL_NO_RWG, diff --git a/target/arm/sve.decode b/target/arm/sve.decode index af9e87e88d..a33825066c 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1324,6 +1324,8 @@ UQRSHRNT 01000101 .. 1 ..... 00 1111 ..... ..... @rd_rn_tszimm_shr ADDHNB 01000101 .. 1 ..... 011 000 ..... ..... @rd_rn_rm ADDHNT 01000101 .. 1 ..... 011 001 ..... ..... @rd_rn_rm +RADDHNB 01000101 .. 1 ..... 011 010 ..... ..... @rd_rn_rm +RADDHNT 01000101 .. 1 ..... 011 011 ..... ..... @rd_rn_rm ### SVE2 Character Match diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 7f3dd2dfdb..281a680134 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -2114,6 +2114,7 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \ } #define DO_ADDHN(N, M, SH) ((N + M) >> SH) +#define DO_RADDHN(N, M, SH) ((N + M + ((__typeof(N))1 << (SH - 1))) >> SH) DO_BINOPNB(sve2_addhnb_h, uint16_t, uint8_t, 8, DO_ADDHN) DO_BINOPNB(sve2_addhnb_s, uint32_t, uint16_t, 16, DO_ADDHN) @@ -2123,6 +2124,15 @@ DO_BINOPNT(sve2_addhnt_h, uint16_t, uint8_t, 8, H1_2, H1, DO_ADDHN) DO_BINOPNT(sve2_addhnt_s, uint32_t, uint16_t, 16, H1_4, H1_2, DO_ADDHN) DO_BINOPNT(sve2_addhnt_d, uint64_t, uint32_t, 32, , H1_4, DO_ADDHN) +DO_BINOPNB(sve2_raddhnb_h, uint16_t, uint8_t, 8, DO_RADDHN) +DO_BINOPNB(sve2_raddhnb_s, uint32_t, uint16_t, 16, DO_RADDHN) +DO_BINOPNB(sve2_raddhnb_d, uint64_t, uint32_t, 32, DO_RADDHN) + +DO_BINOPNT(sve2_raddhnt_h, uint16_t, uint8_t, 8, H1_2, H1, DO_RADDHN) +DO_BINOPNT(sve2_raddhnt_s, uint32_t, uint16_t, 16, H1_4, H1_2, DO_RADDHN) +DO_BINOPNT(sve2_raddhnt_d, uint64_t, uint32_t, 32, , H1_4, DO_RADDHN) + +#undef DO_RADDHN #undef DO_ADDHN #undef DO_BINOPNB diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 7dc30ed1bd..7e3ba2e4f7 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7035,6 +7035,8 @@ static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \ DO_SVE2_ZZZ_NARROW(ADDHNB, addhnb) DO_SVE2_ZZZ_NARROW(ADDHNT, addhnt) +DO_SVE2_ZZZ_NARROW(RADDHNB, raddhnb) +DO_SVE2_ZZZ_NARROW(RADDHNT, raddhnt) static bool do_sve2_ppzz_flags(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_flags_4 *fn)