From patchwork Mon May 30 16:05:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577216 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp395577mag; Mon, 30 May 2022 09:37:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs0jKemIsVsE9I2FhAr4sXcqHqAwLUN/wZ1W+AF+qzbaDG0Ly5T7EVJ2ym0kx2jw/9c+oG X-Received: by 2002:a37:6804:0:b0:6a6:49ad:79ca with SMTP id d4-20020a376804000000b006a649ad79camr1324168qkc.264.1653928632922; Mon, 30 May 2022 09:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928632; cv=none; d=google.com; s=arc-20160816; b=pOQLYEWCZJJkacARHete50/Q4qBoRVMcpPipOyBadjMceuKGFaFljCezDr20F01yBS Qjkz1cU9TOPilSa9vPNu4g7MwoPD4x6S6O+PpBKewgrctg0bxD0DgUct7M+lHDfyMNLx IqkTg+WUboU8x+jZRPvLRUZqlZQ7rPhLH1dmhTec1trDEZLw7yF2vCmYI7fdKxMpp78j GIn5dCISrUG/+lYb14RPmfm/Zv6ujG+DMU8WLG5fXtNxCnoaHLBl/EMbyta+oyTnKCzj nj7rH9J9FidEs22SWXq37UtdKByvAb/73L1E40yMaForqWsBUOkwmdenczi8xlQf2quA E9XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=Tyo1dX0e4/krx9e2lZTj/NtBJ5C9VYnXtfROtdBV5QY=; b=xcEUIguwrhPRfCP3Gqgmt6nRnO1pQ8eOC9vbe5IamTjWdfZPLLnIuVirjix4P3hHA0 40kF3aWJn0JvZs4ozw5CZvJ3z68TmgLt2WVOO871SFqdbKzHHG6eu2kKS32nR9rdE8km ikR4ay4ufwnZayKyrHNDIGp4jxP2zLmHIEzdoHhIZuzlag5plAdV4Ozta7YSA9BgDsAE +W4T4PzCPY56vfjBageq83YKlvBp/uPkMfPaxPBeoC+APOLlryqQL67AOp1KSvu5rL5S M2Y/azyw7KbBURLYZRAUuPkvLLqdFfsCZAwRYdrUP4ZKcTWef8WAd7EsxgNWbBXpSqeb UPLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ipaf3Gmq; 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 q22-20020a05620a0d9600b006a5faff6614si5357469qkl.341.2022.05.30.09.37.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:37:12 -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=Ipaf3Gmq; 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]:43950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviOG-0002tP-GE for patch@linaro.org; Mon, 30 May 2022 12:37:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvR-0002nx-Mg for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:25 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvQ-0007Dj-0s for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:25 -0400 Received: by mail-wr1-x42e.google.com with SMTP id u3so15268882wrg.3 for ; Mon, 30 May 2022 09:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Tyo1dX0e4/krx9e2lZTj/NtBJ5C9VYnXtfROtdBV5QY=; b=Ipaf3GmqmaiQzngcm+e12oElQxrbPtFWA8y5+I1gD7CK+HlmUh+ArKE/SSHgI3IxHZ 4jqOwMgYulWRqsTiwnpEVNe79kAkWzaqLGgsjexEj1zXrnCWhBL17YVggGHKoEwjXV1g dOBVG/5U/RK9kWWioaMAf+5ZAMa4RJdV7YYgfx4ELzK1NwZ02Bs/3l+ILZnwgLBSuADj 2HpGzxix0uIoTzgcTZZINgUC23vS0vkkfkOq74dgPc0U0w7gwIVnHoQopTNQbD+YLDUE q+5k1IJ+7Gc4Y0MhVmThK8dVI1X810Lsxo1AUzOn47FZNFlE9i+TWUq9f4gg1yjt0nWt N1lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tyo1dX0e4/krx9e2lZTj/NtBJ5C9VYnXtfROtdBV5QY=; b=XuPfJ/gxdnNBcVu0PbmbCBJy1u6zsWASXeWlTNiZhEuq9BLwaNtMBPzEa6dMu2ifbe 4ebcDVIGqhrHIzu+6wp7wf954DlaXqtpa/HCQ1tIb5DKPcwjWIPfv9oVG2jTIM8VXdEv QZmVj+6o9mQtqjpiZL7OyI+TSNIATHxBRFwjtQmGJHQs9jmwdJpZKYfSECrdxWzQFRIn XDgGD77djlK4cl+U9ER2/L69bU1A5uFBlaVW6/WtKxiiDV3oIs9y7XtTH/u9LKVNDzuk 0/Sxnfwv6cgxPhtcb3s33Jy5tKDnTCm+nUCSeiZ7R3sOtNeuf+E15pBGylgXYgFCnSCw m/fQ== X-Gm-Message-State: AOAM530ye7/VXmzxIYhBcwf1F9bb0as6GuM7PPMSv0BGtu1qBN11zQwd BdZwkVP/Iah5rTlel00WCwYKjkbMlR2ayg== X-Received: by 2002:a05:6000:1b8d:b0:20c:d372:f07c with SMTP id r13-20020a0560001b8d00b0020cd372f07cmr47050648wru.607.1653926842588; Mon, 30 May 2022 09:07:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 015/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz Date: Mon, 30 May 2022 17:05:26 +0100 Message-Id: <20220530160708.726466-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Convert SVE translation functions directly using gen_gvec_ool_arg_zzzz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-13-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 47 ++++++++------------------------------ 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index cae6df705a4..f7367a4f62c 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -8302,37 +8302,15 @@ static bool trans_FMLSLT_zzxw(DisasContext *s, arg_rrxr_esz *a) return do_FMLAL_zzxw(s, a, true, true); } -static bool do_i8mm_zzzz_ool(DisasContext *s, arg_rrrr_esz *a, - gen_helper_gvec_4 *fn, int data) -{ - if (!dc_isar_feature(aa64_sve_i8mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzzz(s, fn, a, data); -} +TRANS_FEAT(SMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_smmla_b, a, 0) +TRANS_FEAT(USMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_usmmla_b, a, 0) +TRANS_FEAT(UMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_ummla_b, a, 0) -static bool trans_SMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_smmla_b, 0); -} - -static bool trans_USMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_usmmla_b, 0); -} - -static bool trans_UMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_ummla_b, 0); -} - -static bool trans_BFDOT_zzzz(DisasContext *s, arg_rrrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } - return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfdot, a, 0); -} +TRANS_FEAT(BFDOT_zzzz, aa64_sve_bf16, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_bfdot, a, 0) static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) { @@ -8343,13 +8321,8 @@ static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) a->rd, a->rn, a->rm, a->ra, a->index); } -static bool trans_BFMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } - return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfmmla, a, 0); -} +TRANS_FEAT(BFMMLA, aa64_sve_bf16, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_bfmmla, a, 0) static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) {