From patchwork Tue Mar 9 16:19:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 396036 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2789516jai; Tue, 9 Mar 2021 09:48:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEsrFmgLSLPqFKWmDnAc8mgWUGpzknzo3DtWBWHl7X3kEELcIjfSsMywq3SWv04AyDmhz0 X-Received: by 2002:a02:4087:: with SMTP id n129mr30117523jaa.143.1615312126912; Tue, 09 Mar 2021 09:48:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615312126; cv=none; d=google.com; s=arc-20160816; b=AnBXYt0BPASgJxJOz5St+y/io5X0Oz/xrtdunC870aEhSOrej9TbAg7/QVIVzePUra hK/rjXkmklIwOrE6eSyTnaDXl0R15GlLl0hcytw1jfrh17u2UF1nWGekjQV3pARqUQA+ i5qWlW8M/O4aTwgPiOJDyNgyARuXRJune7CI6vtF16IBX3M4YGePRMe8a9bnX5/zwpcI j16JGEzaZ/islBW8Os8vjVAWocskmc2FiDoyYNG8r2zCAHYs4Unc9O4roemfTlend6hD QdmPiK4vghh/LJqlgIEP/McTAdhkkQNc+5eSx3aZKKXL9GXOeLXCoYBDknt0mOs6mEOg pgMA== 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=PNu/k9q7y7xSUi1QwShDN3GcUxd7gykmxrek3+gYYGs=; b=IOPZKoBwoeuMDm2gUilRvkQmoFkjHaUeA64LjD/wazNDBXLukmg7VQaTRj6dIHMsdc XNIAe9duT7V15mvXGrMXLYlUD/uY8E9gDE3Gej22g2thybLUmPRjIViO3Dsq4Gm86OLm 3jaGCqbgl8gCEeiVYAHnhKyXLMV+OT2XXFlj8v4AMeSr3P6oMf/mWX9tszXcbNJtMJbZ qABgmbs/VVlT/AtYSMUTFDx/RHCM4/L+GnpioohV8yTssU34NMsGG60rUR+OzrzCt/Wl OUYv2H362I0HPyHKQckdnN76oJAseg9sVowXInOMfnQQBH9WpjUYs4c3I0U5dZrAVdYa lA3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M12jkkYq; 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=pass (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 g3si14490763ild.84.2021.03.09.09.48.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Mar 2021 09:48:46 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=M12jkkYq; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJgTO-0002Zb-8z for patch@linaro.org; Tue, 09 Mar 2021 12:48:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJf6z-0007Pm-7v for qemu-devel@nongnu.org; Tue, 09 Mar 2021 11:21:34 -0500 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]:33801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJf6b-0002To-SG for qemu-devel@nongnu.org; Tue, 09 Mar 2021 11:21:32 -0500 Received: by mail-oo1-xc35.google.com with SMTP id x23so3183290oop.1 for ; Tue, 09 Mar 2021 08:21:09 -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 :mime-version:content-transfer-encoding; bh=PNu/k9q7y7xSUi1QwShDN3GcUxd7gykmxrek3+gYYGs=; b=M12jkkYqw9CF3LWYBlAFIk3eJ/3n8aSy1g7SZFhkOCwDMXyDgf6f/yt87+guBlqB4g fhI0xc+hLV7hAw7jN0W+m1etKTSI1EGrh6d8o7NE5GcxHGJ0Bg9hp0zFxfR+D/TaDRZY mclH4ioIVhORR+xQ9CVxh0oQJ/6nVNfpENH2dmnwFlHJL1ScsqSagdPXoq1gn5alYuWl wDfJNeYH+0q21s2GZyw+GfJ3zvO8UXtxjeaFqyyv7ugcVOl4sFnOmnh+Daj1SHgMD4K1 hj2SPaL8ZLI9b9joJWGEep6c34SZZKsAvUDe1Xtlb7+gMMbToDuWbqdJQ+hQvVnmySGS WrkQ== 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=PNu/k9q7y7xSUi1QwShDN3GcUxd7gykmxrek3+gYYGs=; b=Tr7MIHkdPKIwlyXuAau2YkgdBTVLLyXNTw6ZLbSLS8n7LOR0zhwtmONTFBnMj9WNGb yA2BYZILuGvJWFpOLDPAkI5TTO8idSBQl0A7rqvRdAgFfQyvTLNsktMvkEA/oGxb4vY+ RQjHWo6dJZTcBpkFzi9Mbs1U5srpEm+5uVJeutc0npa+kXQM5ddCl3rpB1PXvPodqD4v e/OTiUZbJ11gojzwiIynH3H13ooEawBIvZNGCiLbcxqwG3EaNdgwS3HzwpAwLXf44JX7 Ey20ePwXykHgXqCyM5/kSOAxDTty2EdYZtoQiPR+gRA5txuSspB+uQfHm0aZwp6c1k2U LcuA== X-Gm-Message-State: AOAM531jKSsVaRW7EUVQFq+RkaTlBhSbXXKQKhKMOE0IJJdaUPdeBXy0 1cj8L7TqHQij6psKSlGROVCBxwhpN/AQoAX+ X-Received: by 2002:a4a:96b3:: with SMTP id s48mr22923006ooi.11.1615306868833; Tue, 09 Mar 2021 08:21:08 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id v23sm2516474ots.63.2021.03.09.08.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 08:21:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 23/78] target/arm: Implement SVE2 integer absolute difference and accumulate Date: Tue, 9 Mar 2021 08:19:46 -0800 Message-Id: <20210309162041.23124-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210309162041.23124-1-richard.henderson@linaro.org> References: <20210309162041.23124-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c35; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc35.google.com 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=ham autolearn_force=no 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: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/sve.decode | 6 ++++++ target/arm/translate-sve.c | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) -- 2.25.1 diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 695a16551e..32b15e4192 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1266,3 +1266,9 @@ URSRA 01000101 .. 0 ..... 1110 11 ..... ..... @rd_rn_tszimm_shr SRI 01000101 .. 0 ..... 11110 0 ..... ..... @rd_rn_tszimm_shr SLI 01000101 .. 0 ..... 11110 1 ..... ..... @rd_rn_tszimm_shl + +## SVE2 integer absolute difference and accumulate + +# TODO: Use @rda and %reg_movprfx here. +SABA 01000101 .. 0 ..... 11111 0 ..... ..... @rd_rn_rm +UABA 01000101 .. 0 ..... 11111 1 ..... ..... @rd_rn_rm diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index d41fbd9697..d27fab2b80 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6439,3 +6439,24 @@ static bool trans_SLI(DisasContext *s, arg_rri_esz *a) { return do_sve2_fn2i(s, a, gen_gvec_sli); } + +static bool do_sve2_fn_zzz(DisasContext *s, arg_rrr_esz *a, GVecGen3Fn *fn) +{ + if (!dc_isar_feature(aa64_sve2, s)) { + return false; + } + if (sve_access_check(s)) { + gen_gvec_fn_zzz(s, fn, a->esz, a->rd, a->rn, a->rm); + } + return true; +} + +static bool trans_SABA(DisasContext *s, arg_rrr_esz *a) +{ + return do_sve2_fn_zzz(s, a, gen_gvec_saba); +} + +static bool trans_UABA(DisasContext *s, arg_rrr_esz *a) +{ + return do_sve2_fn_zzz(s, a, gen_gvec_uaba); +}