From patchwork Fri Apr 16 21:02:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 422631 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp737086jaf; Fri, 16 Apr 2021 14:37:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTFM/mEqANl5zQN+aF6uoV6yyjrfA5Nh27yV1jB4FJbNrMb983ejPoDer3G3JCF4KEJDOl X-Received: by 2002:a92:de4e:: with SMTP id e14mr2774160ilr.129.1618609044349; Fri, 16 Apr 2021 14:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618609044; cv=none; d=google.com; s=arc-20160816; b=i53LJv22zwepDUj/JbTf9oGF7ajaZjuiSjkuZgg5tOHUv1UuwwNpyhYK9qybyTKDCz VlqialAO0yXlxTlLejMbH1gMJ1f5HHVsV3iJn24R/itspsZ+2+jYxO2CYNd08rGtnRS0 9NOQfX0hghzpQ80voKRYaHZ4S8FX/z4tOoCiNhVKdD6knWHaaj6CrEAK7r4psbqArkOZ 3fNguSyyWMgj/+P30qAmKMdjwZ12v4F/j35+8JbAQz9pm5D9Y3/hcL6ik9EusI6gGkqy ox4sbLYiHSn17gTs5A2Oa9j5JBDYUzTZbYyD+pD29xQ5lO2UY1YWfvA5k1iBloNj2/23 Bnmw== 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=mJ6X3+A6T4zH0IAmYnnf1DVj8KtUnubpSuPtkLtMp7I=; b=IGrVUtKsKYl2AkWqRcaFQcZuF6jJgS8s9Ev/lzK9c+hSQIbsPq/J3ueBwU5yyKCrIX 8O+KNyaoWkgXeO60mtm3f4O9+sYTrwlI1+1bUZI+1V3S3QQJB3R4jxHIw0vzw2shGIOV y0TofX6LKibjKIZY2tu+RjGZhQk45Y9qA7hAi6UvlFReA7MWDeVysOaMtW8hw9k9f11E +IbeaKvmQeWXEM0fSUGBjpU3zhkyOYCr8E6cCQQKuMzPWjyluxNLfppMMXkj8oUYWCWo wxEekK+DD5yrJWSO8zVfHOmQRpr2kT/2kiLkrL+LOaQfqO9i9raNcMfxugyVvvf4oOf+ XzQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tVyo3NjO; 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 h15si4652642ili.57.2021.04.16.14.37.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Apr 2021 14:37:24 -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=pass header.i=@linaro.org header.s=google header.b=tVyo3NjO; 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]:57262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXW9T-0004eA-RG for patch@linaro.org; Fri, 16 Apr 2021 17:37:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXVdZ-0005so-RA for qemu-devel@nongnu.org; Fri, 16 Apr 2021 17:04:25 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:33327) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXVdF-0001hv-A4 for qemu-devel@nongnu.org; Fri, 16 Apr 2021 17:04:25 -0400 Received: by mail-pf1-x42f.google.com with SMTP id h11so1491825pfn.0 for ; Fri, 16 Apr 2021 14:04:04 -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=mJ6X3+A6T4zH0IAmYnnf1DVj8KtUnubpSuPtkLtMp7I=; b=tVyo3NjOiKE8IS9oP/C9Cq66AmOGvskS6gtIic9iLnLxwb9gObsZ08fzDs4dh15h6m Lk2jL8UTK4n1cTlQ7dSoLdMLWaeIugKis91nqWSSDcBFwzXjMbZ9w/uePioP+JnNMuoz cRbczMs41Aq0RV4GXvph0R22Fn7EzrxMQC1nJWLJLv1zpXRHEiX94g+Ab3Nn6+SDC4G5 7fDs+AqQrErNpqS2xPS9hQSKIqRnPPXPOlms8W5+jrSjM5UJ0DPaI/TMonkEuAnjEP6c 9lABorKCkWFQCkdJGc7Tw4MrUHDfZcvqQv4KkODp5j4gyIXIlumrLHL7sPKg8rK3JSdg Hl0g== 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=mJ6X3+A6T4zH0IAmYnnf1DVj8KtUnubpSuPtkLtMp7I=; b=eq26Z0mawdJXgbLrv/9d0pYSVHsq3u2P+MMZLhEvt+J740vjPJi3P2XA4p7FgBParg 8xiorMknctFV7IBZ3s9Fd9K4pR+W9FPAPvKEPqHnhCXTZC2LcS641E2Hs2xG8LdK/2hB /10qCbTgfiYyL6VPOR4KNNrPdmqPObiZhAm/LkJTraOwbWkCoysAt8tsF8s3Qw3vkIMc EiAoIRJQNY1sbgzaMWt8mtWmUsFRU8pIXgL/xQnso3bQtcTPctjOrBT4RGuEasfytnfW KeCWVqTzLxqtJTArSsDSTYM3oEbD6oIIFaxW4T7BHaIp7xhJC7sm6xUalUKtECHSZ3LS x06A== X-Gm-Message-State: AOAM530k6Pj1jdPutHFGSPoByEt6HiQSdKUekjh1HtRzbgQNdhDo3hzN RTCFNn0dsdLyYwHMdCMXhus0eeXk3GFoeQ== X-Received: by 2002:a05:6a00:15c6:b029:24e:9dd1:8813 with SMTP id o6-20020a056a0015c6b029024e9dd18813mr9342198pfu.80.1618607043668; Fri, 16 Apr 2021 14:04:03 -0700 (PDT) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id m9sm5766734pgt.65.2021.04.16.14.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 14:04:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 52/81] target/arm: Implement SVE2 integer multiply (indexed) Date: Fri, 16 Apr 2021 14:02:11 -0700 Message-Id: <20210416210240.1591291-53-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210416210240.1591291-1-richard.henderson@linaro.org> References: <20210416210240.1591291-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/sve.decode | 7 +++++++ target/arm/translate-sve.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) -- 2.25.1 diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 74ac72bdbd..65cb0a2206 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -775,12 +775,19 @@ MUL_zzi 00100101 .. 110 000 110 ........ ..... @rdn_i8s DOT_zzzz 01000100 1 sz:1 0 rm:5 00000 u:1 rn:5 rd:5 \ ra=%reg_movprfx +#### SVE Multiply - Indexed + # SVE integer dot product (indexed) SDOT_zzxw_s 01000100 10 1 ..... 000000 ..... ..... @rrxr_2 esz=2 SDOT_zzxw_d 01000100 11 1 ..... 000000 ..... ..... @rrxr_1 esz=3 UDOT_zzxw_s 01000100 10 1 ..... 000001 ..... ..... @rrxr_2 esz=2 UDOT_zzxw_d 01000100 11 1 ..... 000001 ..... ..... @rrxr_1 esz=3 +# SVE2 integer multiply (indexed) +MUL_zzx_h 01000100 0. 1 ..... 111110 ..... ..... @rrx_3 esz=1 +MUL_zzx_s 01000100 10 1 ..... 111110 ..... ..... @rrx_2 esz=2 +MUL_zzx_d 01000100 11 1 ..... 111110 ..... ..... @rrx_1 esz=3 + # SVE floating-point complex add (predicated) FCADD 01100100 esz:2 00000 rot:1 100 pg:3 rm:5 rd:5 \ rn=%reg_movprfx diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 2eb21b28e1..0de8445fb4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3813,6 +3813,10 @@ static bool trans_DOT_zzzz(DisasContext *s, arg_DOT_zzzz *a) return true; } +/* + * SVE Multiply - Indexed + */ + static bool do_zzxz_ool(DisasContext *s, arg_rrxr_esz *a, gen_helper_gvec_4 *fn) { @@ -3836,6 +3840,32 @@ DO_RRXR(trans_UDOT_zzxw_d, gen_helper_gvec_udot_idx_h) #undef DO_RRXR +static bool do_sve2_zzx_ool(DisasContext *s, arg_rrx_esz *a, + gen_helper_gvec_3 *fn) +{ + if (fn == NULL || !dc_isar_feature(aa64_sve2, s)) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), + vec_full_reg_offset(s, a->rn), + vec_full_reg_offset(s, a->rm), + vsz, vsz, a->index, fn); + } + return true; +} + +#define DO_SVE2_RRX(NAME, FUNC) \ + static bool NAME(DisasContext *s, arg_rrx_esz *a) \ + { return do_sve2_zzx_ool(s, a, FUNC); } + +DO_SVE2_RRX(trans_MUL_zzx_h, gen_helper_gvec_mul_idx_h) +DO_SVE2_RRX(trans_MUL_zzx_s, gen_helper_gvec_mul_idx_s) +DO_SVE2_RRX(trans_MUL_zzx_d, gen_helper_gvec_mul_idx_d) + +#undef DO_SVE2_RRX + /* *** SVE Floating Point Multiply-Add Indexed Group */