From patchwork Fri Apr 30 20:25:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 429872 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp788577jao; Fri, 30 Apr 2021 13:58:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3ENNeAnQ9qpLtpAVoqLt2Ar8rTkmcHYacx3vAa/zGLqV51bhRnyDZxbKD6k64Ednlu8sm X-Received: by 2002:a05:6602:22c9:: with SMTP id e9mr5383567ioe.73.1619816293719; Fri, 30 Apr 2021 13:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619816293; cv=none; d=google.com; s=arc-20160816; b=KWLCb83Qt+l8isY7zylVSauy4Ny6EdRmp0H9JEiVdZKxzy01qywjh3nYTTXEoS6VE0 Ptn+ZlO3cTf56KXxARjL59wsprzP/IHaeU/gWD5QeBxzGDHdYH3ASHbR7tmn3/vTnXt+ DkFYY8JrBjiStN//NORBeNgmRVXcjJFzCITztE6qqB6gUkaY4xAtSSAThNT9F/2+ZiwP STa7Gh+V5f0lbMWW5wviL2Q5AatXiXFH0huYSqAKyx8DR1lxRbogKMD/1wArpx/tuq+P orA6YMbdfWY5n3ZRhEfYvYDEyvUmRWy+lahxu7fZveHSEQC5FXo9QmNj4q0BSfykdEpT aumw== 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=E5JoMyVcVDEYFTAKWLhzjLu8b1RSgcPEa5JNeY4Iwkw=; b=b55kr3q23BuKN6uEZBSKfwrar8it4z0BnF802C+wLjP+/1ughjP13LHbIrhLLg8ZJF EpkvaxAqc8ByV4lQeaJM4gZ3ckUWjxLXp2K8XDqKYPsa6O7LpxCQ/otmxVWI6ngeVRQ7 FKubcYCQqWCUZeeCzBzFBkG6cxv6kuTOH2GNfNHgm+usfddCOhfZwVjbGN4M8N/F5SRa cXhv08KWwXJrDaTATHxFeFWtyaKK7iOLiNEg26OKCZgVevvgYGZnLbZ7nSYyRRiG1Ka4 9qZ1l3ZAEAM9MnGNjNygWmHoqvp4XAG0/EvAvDtvzPrrXkehXrnpwqQzXcUg0eXNGdRw HjSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kfyBX1uO; 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 w26si3329167jao.65.2021.04.30.13.58.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Apr 2021 13:58:13 -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=kfyBX1uO; 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]:34336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcaDF-0005dq-56 for patch@linaro.org; Fri, 30 Apr 2021 16:58:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcZmE-0004JT-Th for qemu-devel@nongnu.org; Fri, 30 Apr 2021 16:30:18 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:45009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcZlm-0007iW-33 for qemu-devel@nongnu.org; Fri, 30 Apr 2021 16:30:18 -0400 Received: by mail-pf1-x42f.google.com with SMTP id m11so6099163pfc.11 for ; Fri, 30 Apr 2021 13:29:44 -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=E5JoMyVcVDEYFTAKWLhzjLu8b1RSgcPEa5JNeY4Iwkw=; b=kfyBX1uOWwVOdyVtgsgJwX+p8x/BZLEK83wSYkt5spuNmJo1HuA4L6umlglGGrjWnD HaNQS70zZCtw/04LDunI/3LM9ncGGwS69O3ScfDEC5e5JE17NaOD2QlXi90tAEFgZKTd hYk8sNyuVZF/WDMi+zf7x5cl94E6Ys/ULrGpcIi35Ah1SJm0y9ZmzEPqDM80bmvE2WRi lkwavPGYdxo+2WHk08r/lukMxdN8ePw7kdVITGV7wqMKF+Yon+9gddI70HLboVmO9Cx8 BrlM3Gxd8vHSODS5ce2xXVGEBiY2LMxmUXmkb3AOjh1p3+kNtE42MMPaRbQF8T5B2kUe X81w== 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=E5JoMyVcVDEYFTAKWLhzjLu8b1RSgcPEa5JNeY4Iwkw=; b=jyvXHvfvz5eRTj5YJ734cvJxeQmxWFJPXfZZ40OCgC03jjF3RovkjMnGjYHhLDetnH yXpIeRpLkRTDUeYCVhYm5fms11XjOVLG8d+dK2FKVvggwuvJesiq9woZr7e4pJEGcINO 2uChQwHCDsBEUmPXr/RXF0kDkfoTV1jO7IcajpLMcvx6IPD/GGmal9LIp9cBUe6P7xft zadagTlrta0bvf77aQ1zYTNrsOjK8WOkNpNQn6a27ykwH6/mVQ2FomGgXT2yEF7dWFBw U6hCVAiCfAGTJkCas2Pu13evwmWaL3keEK9j6O6XmHnMqbPCGF0RANAgwAS8USyKywiY gpoA== X-Gm-Message-State: AOAM530CoOxb4kju2WokvWefDTQxddQHImQ1MBz+KmQxkZWFdzJkG6lm IIxP+FDKsZYXH3VetTeHH48huE+kYM3jFw== X-Received: by 2002:a65:4986:: with SMTP id r6mr6398649pgs.392.1619814583762; Fri, 30 Apr 2021 13:29:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id q23sm3788781pgt.42.2021.04.30.13.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Apr 2021 13:29:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 52/82] target/arm: Implement SVE2 integer multiply (indexed) Date: Fri, 30 Apr 2021 13:25:40 -0700 Message-Id: <20210430202610.1136687-53-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210430202610.1136687-1-richard.henderson@linaro.org> References: <20210430202610.1136687-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 Reviewed-by: Peter Maydell 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 bb0cffa3d9..3f54636e11 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 */