From patchwork Mon May 30 16:05:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577201 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp385666mag; Mon, 30 May 2022 09:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4XDE/b2tDq9Mp8THhebFVtkfttd9jAJzi/DASnwOsTBTIEjoI40geWXXHwf6auzT+/a5Y X-Received: by 2002:a05:620a:e0f:b0:6a5:e7fb:5d74 with SMTP id y15-20020a05620a0e0f00b006a5e7fb5d74mr10596252qkm.46.1653927803568; Mon, 30 May 2022 09:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927803; cv=none; d=google.com; s=arc-20160816; b=GZnWodPhJos0dECZvItcKjOfSMQXgidOJi7Rc01yNbOP/hvoIh7hMYRJ04LLdmgYSg /ugpf8A/K7yFZmVYXA048ZQ1zWXFzWBJjVVQGkPXFXy4TroZth/LqpQ69PsS57THNq9y qCgsGvmQCAK1yOGg00smsEYJ6N1P3SkumMkxHK9Hpf1rCLHxIJRBK5o9WZFd3GGIKXAC jk977669rtAUTpIKYf7YHR1GReCKvUDv8l0Y1ybF/kvzWDF7dYJgW+O0d73oz4p24hrd PU6tPyBEbMVn1pyTEcPOf+2dzGawD1xlenuplYPvkZRXLbtMRwVMnZ3+e5h8ksT6XTyg 8nzw== 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=F7D5A4jK2slAbzXLwOeiXimVOY+Rz3I47iq2p6PuNZA=; b=IqIo3kRBgGaRq6qHhsgPFkC133cjRkza/3DbpGXofQWddsbFVLanNrnzL59LR+or7B TEbWhGe9/SP+ZnFfzDJrmv+tbu/hlDODOGtdlDeitqg3yiT50h9lg+AwlULESy1zsPvL 44CAw+7lh7r9ZG8+HUMKV0A58D+MlxhOUL04vp8okbBrWQVSaAct6WVqkETi0Oyh49nb 3Rf2MCqQ/M0h8cPtdwcWIxAd1jrEsZ32ykq4f3MBKn3QLZNAa5DrUT4fdb3dGe//zu+F uTITKtfc1l6rfaeHKDSS8gYnyfT73f2JGcFfInWebGy0BiC9eFOmoU2oqezVRP6OO9Dq z8uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Te0kRqsO; 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 r125-20020a37a883000000b006a106586d8bsi6874344qke.608.2022.05.30.09.23.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:23:23 -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=Te0kRqsO; 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]:39342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviAt-0004yX-6F for patch@linaro.org; Mon, 30 May 2022 12:23:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvN-0002e4-3g for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:21 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvK-0007Aw-HI for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:20 -0400 Received: by mail-wr1-x436.google.com with SMTP id q7so4314885wrg.5 for ; Mon, 30 May 2022 09:07:15 -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=F7D5A4jK2slAbzXLwOeiXimVOY+Rz3I47iq2p6PuNZA=; b=Te0kRqsOBh0senBIW5ECaxO+cTprzFMD6sxjkvcCNF/5e8sE2emPJ7ewspA0HoEl0A CYsEbE1xfzrfX7nBgInFY4eQSMAuUPttuVpv12aFFueTk43PKqDL+KZ/8ZZxpwYYcXKd ZIRg1W8eTlGLes7vuTs7LvsvcOzAE1rT7aoV+xQ9L+z3OEsnQ74kVcUtmJP4Trx4fET4 B8BZFg6TldWstpGKy/1u80pcowmZlADShxxPHfQVzswvSgXmVao5k8ZYSEjck4Zq3Qhj MhX4J30JVI4XjPOj0tcqUZ6q05GO+DyAY+xqRwhgGm/kcKOjR6Tb3oH/hjIo6Zi52PRD Dl5A== 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=F7D5A4jK2slAbzXLwOeiXimVOY+Rz3I47iq2p6PuNZA=; b=3euv9MnwQBVXj++eBI48DRoy0CLD8ydDUpxzwPKMLpHLnxqBVEU+9s4Isk/yKMpbXd df/98Y3/r2IAypjRJ1HzvSnOccCA1jIcf/jbq2DFdUoveOaJHiByFIhWz1mYYuWiwaQH NvbtpJxupYV6fHBJcIpIH9nJH/5ozRlceuZm0H7njs355jwVPfdTCSWyfXdDMrmHOSaZ 45m9ooLO4+eR1xE0XUKHWxOrkn2jUzISfdXr/qexva2XepWdBk48czAqcw2Oohl50DZH AYteyYUk79Pg5CiYMmVKM2uyK4q/ppY7yI7snf8xvJTe6kiNbV4q7InyQj17RPE4rAYS RdYw== X-Gm-Message-State: AOAM5336Qe0pVG4tUoZqH+uE561yVXGsZaxPv6nstEmkgT3PIclwS3DT fVoKeN2G5dDuMNKJi+yZH2RW9dk/Zzf+XA== X-Received: by 2002:a5d:6847:0:b0:20f:c0b6:d783 with SMTP id o7-20020a5d6847000000b0020fc0b6d783mr40461499wrw.101.1653926834974; Mon, 30 May 2022 09:07:14 -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.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 006/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz Date: Mon, 30 May 2022 17:05:17 +0100 Message-Id: <20220530160708.726466-7-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::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 using gen_gvec_ool_zz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-4-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 39 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 903514cb6a8..f7e7a569b7a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1375,16 +1375,12 @@ static bool trans_ADR_u32(DisasContext *s, arg_rrri *a) *** SVE Integer Misc - Unpredicated Group */ -static bool trans_FEXPA(DisasContext *s, arg_rr_esz *a) -{ - static gen_helper_gvec_2 * const fns[4] = { - NULL, - gen_helper_sve_fexpa_h, - gen_helper_sve_fexpa_s, - gen_helper_sve_fexpa_d, - }; - return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); -} +static gen_helper_gvec_2 * const fexpa_fns[4] = { + NULL, gen_helper_sve_fexpa_h, + gen_helper_sve_fexpa_s, gen_helper_sve_fexpa_d, +}; +TRANS_FEAT(FEXPA, aa64_sve, gen_gvec_ool_zz, + fexpa_fns[a->esz], a->rd, a->rn, 0) static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) { @@ -2418,14 +2414,11 @@ static bool trans_INSR_r(DisasContext *s, arg_rrr_esz *a) return true; } -static bool trans_REV_v(DisasContext *s, arg_rr_esz *a) -{ - static gen_helper_gvec_2 * const fns[4] = { - gen_helper_sve_rev_b, gen_helper_sve_rev_h, - gen_helper_sve_rev_s, gen_helper_sve_rev_d - }; - return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); -} +static gen_helper_gvec_2 * const rev_fns[4] = { + gen_helper_sve_rev_b, gen_helper_sve_rev_h, + gen_helper_sve_rev_s, gen_helper_sve_rev_d +}; +TRANS_FEAT(REV_v, aa64_sve, gen_gvec_ool_zz, rev_fns[a->esz], a->rd, a->rn, 0) static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) { @@ -8376,14 +8369,8 @@ static bool trans_USDOT_zzzz(DisasContext *s, arg_USDOT_zzzz *a) return true; } -static bool trans_AESMC(DisasContext *s, arg_AESMC *a) -{ - if (!dc_isar_feature(aa64_sve2_aes, s)) { - return false; - } - return gen_gvec_ool_zz(s, gen_helper_crypto_aesmc, - a->rd, a->rd, a->decrypt); -} +TRANS_FEAT(AESMC, aa64_sve2_aes, gen_gvec_ool_zz, + gen_helper_crypto_aesmc, a->rd, a->rd, a->decrypt) static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt) {