From patchwork Thu Jun 18 04:26:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191030 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1074428ilo; Wed, 17 Jun 2020 21:57:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzzSKbcmkZ3gwhR0MpAxDxf7JmclHXdaMWnH3UUEFW3EW2sto8kvOjY4xC7Zfhp9gtksDO X-Received: by 2002:a25:ce84:: with SMTP id x126mr3633323ybe.15.1592456258529; Wed, 17 Jun 2020 21:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592456258; cv=none; d=google.com; s=arc-20160816; b=zUjy+T4TPrfaVjHop0LQvafI+CHd8o9QnhKRqVQD+Jz0Qg46cYU8YKXWMJ6Y1M6ZY7 /rP7X13zreiWPCq+Fdag7HstPIPCCitvBPrdzUqLGODKZbAvbJ9hf8D3zlBgLH1zWRNA 5MFk38frT1q6KluF9iETw287XjFMJ+E3wvA/iS9X40rmzRbrJkad2DAGOoSsfyAAesqH COKG/86/V4jSDN4SG4PRO9Kr7Yy8WTxBps7Q1q4QCjdJNmiUa9aEZe8/KrDjQGadQr5V iCw2X7e4er9Ha6Pca+/QNQyzjOjQhpxFsZjPzqyp0PGvPKT83T0fYM5UMQRMG1Dq3RQt 88HQ== 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=wVuoJXJWITnHAtP39+83jdlpwTgBqSqRmsHoBoDMk4Y=; b=sLbeTCAa9y2xlrGhHez6u9gd3Dcktnnn+g3ZMutTSyGgwd4gARjxnptoYUbS0e+/Jp Cn/pWj86aEJEfx2JFqMpcw2oyBQTsM1ubTIBE9UNhXU+ixoN+vqDB8W212LKLpMBDRf6 rPx/L6EmwtiHzzsXkar1NRbSwAX/0Fq4rreFmjrj4Z4o3JkYlSxT1KBh/ya/FsBaKO+R oaj6b0hmQr6MLilkR12MfNez9idX7DyuHO5T4tgrpzOTcodTYah3veSLfXgTOh+FWK7O T/aCKqj+H+3cHXMl7uBmex8/ntqnnGB4q2evbZVM1EGvEU5ebL8JKDYLIVnRlXle4p8d iv8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="j/dpTu+A"; 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 g18si1486246ybh.69.2020.06.17.21.57.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 21:57:38 -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="j/dpTu+A"; 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]:53512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlmcL-0005Uw-Uo for patch@linaro.org; Thu, 18 Jun 2020 00:57:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlmCF-00024O-1k for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:30:39 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:43594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlmCD-00039b-AO for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:30:38 -0400 Received: by mail-pl1-x633.google.com with SMTP id g12so1901676pll.10 for ; Wed, 17 Jun 2020 21:30:35 -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=wVuoJXJWITnHAtP39+83jdlpwTgBqSqRmsHoBoDMk4Y=; b=j/dpTu+AX8ekcaTBx9hpIozG4qYyAw7HdlQoxkIZcvPJ2r2tAjNVl/haRYF6+gGuJo VABuI6KJFtcCT0I9gpJEWZQK81p2NoCUOeurz/tKuOjZxa9UnDwaZ51BkPNstUyKZzy1 qYJpWywVBjOB0/YcgmaX08SKnb1cu1mdBa7CLkPHv8c6dxhs5np0wOaW9lGW+5V+GcqC 9bixC3EzY/HggD92BF6+rl5cmTGPoH0vQJnekDGclwhlnN3pxs9a1AFGv8WQ9NVJRhZ5 E/s77stE7heT0UEswDoeGnf9+4MyGAM4CouixPGGsyToggrkgD2sM7uhJ2Q/tw8mMPsJ AvEg== 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=wVuoJXJWITnHAtP39+83jdlpwTgBqSqRmsHoBoDMk4Y=; b=OBYmq4fTcdrdW3jQCv3A+YZ2ZIM8qUkOiFql3WtAnNm9K5g8GYh/HWKV8R0qCEuklQ ofSEYrPQOzWhsGCKD7fSZz8umwzIXlL6GvA8s5AGSo5gUTPTO52Y7FX3YKFbwRyNdMnG D5k2b7KM49YyVK4jLsMCpUEHkmPHW6brce4iq7eaBz35Al9k8yzxTv5Dv0D+N0UJnY8Z 4ZG1pMRIkAOZE2W2p0ClDOs+Tbu3LFDZeXDgiHYFtLN4fWdNJOfE7lZtrsprDjE4yWbl lfyhN6+M26lpO2tvpYb7/pwGTyCDtATqgeOZjZ/kpgtK/eUFH67w/oqBaVPtnt3ApR/k ha8w== X-Gm-Message-State: AOAM531xsUmEBSGqb8kdC0pvWhCJaoPp4WcVgbcynJhcYZtF7H8srCvl bURrsnd2H7eSL5W38uvxXecw+x1Nrbk= X-Received: by 2002:a17:902:bc82:: with SMTP id bb2mr2065410plb.225.1592454634481; Wed, 17 Jun 2020 21:30:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 21:30:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 056/100] target/arm: Implement SVE2 SUBHNB, SUBHNT Date: Wed, 17 Jun 2020 21:26:00 -0700 Message-Id: <20200618042644.1685561-57-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::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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-4-steplong@quicinc.com> Signed-off-by: Richard Henderson --- target/arm/helper-sve.h | 8 ++++++++ target/arm/sve.decode | 2 ++ target/arm/sve_helper.c | 10 ++++++++++ target/arm/translate-sve.c | 3 +++ 4 files changed, 23 insertions(+) -- 2.25.1 diff --git a/target/arm/helper-sve.h b/target/arm/helper-sve.h index 7627e0cd5f..82e23d6470 100644 --- a/target/arm/helper-sve.h +++ b/target/arm/helper-sve.h @@ -2037,6 +2037,14 @@ 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_4(sve2_subhnb_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_subhnb_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_subhnb_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) + +DEF_HELPER_FLAGS_4(sve2_subhnt_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_subhnt_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_subhnt_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 a33825066c..8ad2698bcf 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1326,6 +1326,8 @@ 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 +SUBHNB 01000101 .. 1 ..... 011 100 ..... ..... @rd_rn_rm +SUBHNT 01000101 .. 1 ..... 011 101 ..... ..... @rd_rn_rm ### SVE2 Character Match diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 281a680134..0b490e8de6 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -2115,6 +2115,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) +#define DO_SUBHN(N, M, SH) ((N - M) >> 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) @@ -2132,6 +2133,15 @@ 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) +DO_BINOPNB(sve2_subhnb_h, uint16_t, uint8_t, 8, DO_SUBHN) +DO_BINOPNB(sve2_subhnb_s, uint32_t, uint16_t, 16, DO_SUBHN) +DO_BINOPNB(sve2_subhnb_d, uint64_t, uint32_t, 32, DO_SUBHN) + +DO_BINOPNT(sve2_subhnt_h, uint16_t, uint8_t, 8, H1_2, H1, DO_SUBHN) +DO_BINOPNT(sve2_subhnt_s, uint32_t, uint16_t, 16, H1_4, H1_2, DO_SUBHN) +DO_BINOPNT(sve2_subhnt_d, uint64_t, uint32_t, 32, , H1_4, DO_SUBHN) + +#undef DO_SUBHN #undef DO_RADDHN #undef DO_ADDHN diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 7e3ba2e4f7..f584e06d87 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7038,6 +7038,9 @@ DO_SVE2_ZZZ_NARROW(ADDHNT, addhnt) DO_SVE2_ZZZ_NARROW(RADDHNB, raddhnb) DO_SVE2_ZZZ_NARROW(RADDHNT, raddhnt) +DO_SVE2_ZZZ_NARROW(SUBHNB, subhnb) +DO_SVE2_ZZZ_NARROW(SUBHNT, subhnt) + static bool do_sve2_ppzz_flags(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_flags_4 *fn) {