From patchwork Tue Mar 9 16:20:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 396076 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2822698jai; Tue, 9 Mar 2021 10:33:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxtNkZBRlxfuPy0ldX5I7uq6e9suTgvId+PNISfGd9q4ALEW6nr2fpcx4UEZSNCB1hWfQ7 X-Received: by 2002:a05:6638:1653:: with SMTP id a19mr29601336jat.113.1615314791577; Tue, 09 Mar 2021 10:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615314791; cv=none; d=google.com; s=arc-20160816; b=AvOShV+2GtOQN6s1HbTLHO/OEpRu9t6itLX9exHK+9WpAoaKeT3GfpHq1TyW8g2NAx DRXKA8qLqI0MsWhoB06Zn+Rtq+fip/H3xj2RhVx73S/bpnmXCoYb356K5wIkHQ1Qd3V8 E9/zF0W41lH8xYxngTUivtdD8ecDPfU63VaZCaQ+hJGrPGkfZKPywbDEO9gZnkG8dlNM ITxR2TUUFk/23n6VRSh1izK2Y1Qj31LVHAFPeh0gzacgxXo80YrZwVEz2fRqQk65WYcC it3HfmeZrJWTunNqHV7Kr1Bg4hNqAJbqh9ggxYqYGFDLF0oW2JjJdqkzm6uBVP9wTGy3 nR8A== 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=XJukSUnh/ZapdqYElhaMrdNjfVgk9LJj1DVZruN+l2s=; b=Vt/MMG4ZxZMDKt0Elhb1FajLSH+ljBq1J7Xh7/HAfjEuZ+nVhsG8PAGyoKi0Vpz82R fYfDH5Qn5Zx1KZ9NjLF7MYEri3KjuKyYwrJL7rCDxbSKnM/GqXVBfJcKFF02BgJisM1j 22Jpf1cVfIQAq91jQKSODdagyBv5c8LREia8tr/yCxfop8I10OVFRowu4ju+0SeF7Zbh XePZAFneUHo+3vaql2g5lx9SLuM/nKTvHBqHLWHF0czF5Ypc0ZodzyWqbIwtxFMJ2Hsh dOAhPbnDgEVUnkH233WleroglOuhmHX6q+IuB/OUL7LAlR5inPRWm6I59iD6/Qg7X9oz oHgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NEvaxp3J; 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 d6si5921952ioy.98.2021.03.09.10.33.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Mar 2021 10:33:11 -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=NEvaxp3J; 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]:42592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJhAM-0003r2-VI for patch@linaro.org; Tue, 09 Mar 2021 13:33:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJf7p-0000PZ-Qf for qemu-devel@nongnu.org; Tue, 09 Mar 2021 11:22:29 -0500 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:37042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJf7e-0002nb-C1 for qemu-devel@nongnu.org; Tue, 09 Mar 2021 11:22:24 -0500 Received: by mail-ot1-x332.google.com with SMTP id 75so10096268otn.4 for ; Tue, 09 Mar 2021 08:22:13 -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=XJukSUnh/ZapdqYElhaMrdNjfVgk9LJj1DVZruN+l2s=; b=NEvaxp3JgyvtJgZ8a914jHnXXBs9ScOzLYAnhMiVjNu0LrXN6LUUZkxy8EZXnVdeCB YPXBzHuGmdDoRe0v0B1Apqv76LYm2chAz8sg/Nvsnu7RCY+IKaHVaY4j+XGjLdIOuBhC c/BTrJaeUyLcwhbtw1nr2g1M7RiU8owhZEvNrjAoZbxOk5UpzpOLRvMJiAXMp1nHNuGM s2BzSj7E9y5TB7285FVOMQXRnxcMmPRg0PiNsFREfs8YTl2/qs6iN7VOohrPT0SyMSGw X0qoTARqMb0Fhwa4sTkF5DIHXliCjQeup7pLOoCZt41D4hrZ4aTSvecBu1NlmQwFv0mB D9/w== 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=XJukSUnh/ZapdqYElhaMrdNjfVgk9LJj1DVZruN+l2s=; b=BFn51HDSbv+HGVZ3y6iC+9Q04et+KqCpY97T70riegBS2/c1lj1zhl2hTVVD1PIVem 3XmCiVWYvFfvZSSn82gxr3Xres7dm28bpD0Xk1Y9cg3rWu6pVc60riUs/94oraBoW3rT 4DX1NXA0/DIesXymOuQXirwCNNP8CbKZhsgPfsI7eryATYserBRnwzedubYJXoTYsh0B 6u40V9UF5VJbDQuUz58OYzDMicCfBzCYLkxGtgjyyPRxUa9alJwEmAQx8yFsKIU+6vFH vQ2iuxGkOTKcLtoJTNnGmpLlHbIfxeQQ56WIN6lUfROdH+iDdtZ2IBqVU9Wk/7xVZOVW UodA== X-Gm-Message-State: AOAM530vaPoXDBKvNNbQANqwRevo6hgictWVWh/o8H5G2nYhDNvPFfpr 70B3NwW2D9gWTcrI6JCrI1if3nvgeEfY4EE6 X-Received: by 2002:a05:6830:1404:: with SMTP id v4mr15878259otp.2.1615306933276; Tue, 09 Mar 2021 08:22:13 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id u19sm3470898ote.15.2021.03.09.08.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 08:22:12 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 52/78] target/arm: Implement SVE2 integer multiply (indexed) Date: Tue, 9 Mar 2021 08:20:15 -0800 Message-Id: <20210309162041.23124-53-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::332; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x332.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=unavailable 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 | 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 87ee5b8629..5d20392887 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -777,12 +777,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 .. 1 ..... 000000 ..... ..... @rrxr_s SDOT_zzxw_d 01000100 .. 1 ..... 000000 ..... ..... @rrxr_d UDOT_zzxw_s 01000100 .. 1 ..... 000001 ..... ..... @rrxr_s UDOT_zzxw_d 01000100 .. 1 ..... 000001 ..... ..... @rrxr_d +# SVE2 integer multiply (indexed) +MUL_zzx_h 01000100 .. 1 ..... 111110 ..... ..... @rrx_h +MUL_zzx_s 01000100 .. 1 ..... 111110 ..... ..... @rrx_s +MUL_zzx_d 01000100 .. 1 ..... 111110 ..... ..... @rrx_d + # 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 35d02df493..ee2ef91355 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 */