From patchwork Thu Jun 18 04:26:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191034 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1075135ilo; Wed, 17 Jun 2020 21:59:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzigoHOT+9tkydoqNRND+1VMpNUdkhjjtZo9QaKHnER/vaJjXcT7p/8DOLf7Z23DZTnOUg7 X-Received: by 2002:a5b:18d:: with SMTP id r13mr3394546ybl.235.1592456341827; Wed, 17 Jun 2020 21:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592456341; cv=none; d=google.com; s=arc-20160816; b=EsGX7XIHyaLEss36pHtzXBx8HBs4Hx/aTPiEP/yIOzQRuQWXIz4SP9Wq5yrUMYi3aZ jbhny2O/IBEuhrgsfJY4v90AS7gLN2yT7xaU6EJlvrrtByYtcHCjBbxyZcWGNMNxnwp2 mti5yGjHULnzJdTsnFDNd3kusARaZuNtnOHQpF//Zi7wckxG4ywzWfNembKvfBa2c7H1 ysBWiciiiOfqJi+qrVfG1AO5EUerIJhrRx4IvHcHCp/n8iQu6tLhWTASU+fSEwkTCE3C X7wCTe1jcj0B5noFBusPO8bsIKz+UMJtHe8Nsi8lCVhH68YfY3wpABqnBs/96Bv3vF36 bIlw== 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=P+kkin3xeBMcaEbQDnJQqDnSvZBy61C8Rb6KEh2sOL4=; b=yLXWak/aj+PnK8+qsJ/kVsP1V7AF2ojt84OYd0PVf2Y4t93fIcGQqiKhHXuX3L4VOH VR9fkItFZxB4MDJHPcIXkOycwFmC4HjWZ7xAKImFjY4PJWhuBrREa8QqE7VUZhrHHEcA 21v86pcSW54b3p36N05Jg/I06Zv6jVpFeyL9UunrZ9HkAMXQQCBb0vnHdLTHmKkXIMo+ SHyOxwyz2z2894BWNBo1ot4b13ZwD0sIZF7IaZzLLqCDOOu5aZ02CMvONPi3J6vzYYMg KF80N6ftkMPjjiOSF81QLAo2k54VDRsoDl5mdRtn3PkPE6JX2D7SalOylm4tbV7WWdZP NrxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JtamSaVK; 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 x11si1385461ybs.218.2020.06.17.21.59.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 21:59:01 -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=JtamSaVK; 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]:32954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlmdh-0000Oc-8V for patch@linaro.org; Thu, 18 Jun 2020 00:59:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlmCG-00029C-Lc for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:30:40 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:44044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlmCF-0003A7-1K for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:30:40 -0400 Received: by mail-pl1-x641.google.com with SMTP id bh7so1900370plb.11 for ; Wed, 17 Jun 2020 21:30:38 -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=P+kkin3xeBMcaEbQDnJQqDnSvZBy61C8Rb6KEh2sOL4=; b=JtamSaVKsohGHRxqZBPZaNFJgCTb8o4pUGKmiORn8KPevMW7eKfS6LJzgiXMg1NwX6 4SCOMUtqSHTAG1UA5Ylj5oMmdxuG5u4ek2r/ztnM5sQrlNVnlHhBdf2W/tcETckdEjVa xX2t3eCy6C+G0IYMcjekl0crpwYLKlWMxmLDg9U6M6gT1bhqOWtP6wZkrrTqL6l2V0E3 az4lfR7L62U3W7zN9+Wgam72KYxbQXCN4XeblUCTXBfydnHkhZd3dbeX3BC10X3RTeqt Mctmrhw/0/HbaJAedHU287Z4cq39EDXBy/PIdnjOgE1WAHfaOO3/VQ4Xb/LeH7nq/Ax5 901Q== 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=P+kkin3xeBMcaEbQDnJQqDnSvZBy61C8Rb6KEh2sOL4=; b=qaZq1IWhZjEXda2JP2TNLAV9hUzZj1Fl6KYOHidLiWVR++JkvbjnQy0xpJnTK+9uaS y8Afd3LwODPpp9waAZtHjXJtYrrpyY38S/RpMMvNu9QHnPxQ1TA1Bmnwn5UbCfXjHjYJ zwi6YN+vyropb8o8r7rOS2h6tjl1HMI4CGmtcIeRBEFWbUYpn/XujB4fAvkeBIHxDot2 JAmpVQY+3s905yVIOipe5GVKOBXCPU6Gc3X0dc77Na3K9vuEIkPgmeG3lwLUqKCrHAXV 12gZ5YZBVD4aZoSdCxkhEO7zgDfUVQXUTRgXGlnsEk/wrrB0GVOsMOnvElvhXvT9AEM0 4uBw== X-Gm-Message-State: AOAM533rTyEn1UnLAabx9recHz16OVxupM2XxnHqU06pn1PRzZ+1jvRa e/LHRvfdP8jF4IMejxRfn+4oRbENdis= X-Received: by 2002:a17:90a:7785:: with SMTP id v5mr2455353pjk.31.1592454636256; Wed, 17 Jun 2020 21:30:36 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 21:30:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 057/100] target/arm: Implement SVE2 RSUBHNB, RSUBHNT Date: Wed, 17 Jun 2020 21:26:01 -0700 Message-Id: <20200618042644.1685561-58-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::641; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x641.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 This completes the section 'SVE2 integer add/subtract narrow high part' Signed-off-by: Stephen Long Message-Id: <20200417162231.10374-5-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 82e23d6470..c47dea5920 100644 --- a/target/arm/helper-sve.h +++ b/target/arm/helper-sve.h @@ -2045,6 +2045,14 @@ 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_4(sve2_rsubhnb_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_rsubhnb_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_rsubhnb_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) + +DEF_HELPER_FLAGS_4(sve2_rsubhnt_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_rsubhnt_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_4(sve2_rsubhnt_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 8ad2698bcf..3121eabbf8 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1328,6 +1328,8 @@ 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 +RSUBHNB 01000101 .. 1 ..... 011 110 ..... ..... @rd_rn_rm +RSUBHNT 01000101 .. 1 ..... 011 111 ..... ..... @rd_rn_rm ### SVE2 Character Match diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 0b490e8de6..4464c9af52 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -2116,6 +2116,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) +#define DO_RSUBHN(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) @@ -2141,6 +2142,15 @@ 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) +DO_BINOPNB(sve2_rsubhnb_h, uint16_t, uint8_t, 8, DO_RSUBHN) +DO_BINOPNB(sve2_rsubhnb_s, uint32_t, uint16_t, 16, DO_RSUBHN) +DO_BINOPNB(sve2_rsubhnb_d, uint64_t, uint32_t, 32, DO_RSUBHN) + +DO_BINOPNT(sve2_rsubhnt_h, uint16_t, uint8_t, 8, H1_2, H1, DO_RSUBHN) +DO_BINOPNT(sve2_rsubhnt_s, uint32_t, uint16_t, 16, H1_4, H1_2, DO_RSUBHN) +DO_BINOPNT(sve2_rsubhnt_d, uint64_t, uint32_t, 32, , H1_4, DO_RSUBHN) + +#undef DO_RSUBHN #undef DO_SUBHN #undef DO_RADDHN #undef DO_ADDHN diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f584e06d87..c8c4822d9e 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7040,6 +7040,8 @@ DO_SVE2_ZZZ_NARROW(RADDHNT, raddhnt) DO_SVE2_ZZZ_NARROW(SUBHNB, subhnb) DO_SVE2_ZZZ_NARROW(SUBHNT, subhnt) +DO_SVE2_ZZZ_NARROW(RSUBHNB, rsubhnb) +DO_SVE2_ZZZ_NARROW(RSUBHNT, rsubhnt) static bool do_sve2_ppzz_flags(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_flags_4 *fn)