From patchwork Fri May 27 18:17:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 576549 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp882384mab; Fri, 27 May 2022 11:32:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4fe5tysipYHwM7nywP6Juk0Y5qhikytyOBuA/Nvdo0S0AY+xEtrfVWjy9c1INHW9PxJx7 X-Received: by 2002:a05:620a:2991:b0:6a0:5212:96a6 with SMTP id r17-20020a05620a299100b006a0521296a6mr29070769qkp.646.1653676341411; Fri, 27 May 2022 11:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653676341; cv=none; d=google.com; s=arc-20160816; b=ixhyOZNyoPWN71F60THvoIeEvIRVFhXH+ra5YWUjyOzoi/yBZiCG4iMPqKNLwkRYUX ciMRgT5OPmq8yYEzn+FnyGwpKswPE3V4+syTCrzy//QwsKzJxBELMbclHsgfWTtOfQRh Jllu4O5f4W5pFSQbSytpdWQDDuHCZj4n3hf6ZA54Bt13xAK0HMtbcrJdzjS3MqFBPhhJ i89GjZFkuTrFJ7jEoS5nmynYAEAAakmtRT22cGf4Amj4D76HmYUplv7ogWbayNH8/2Vq TFh/zyX9V2FnxL39/tA+j6h+2wA5TJjRdK+XfCkp416KLMT5elxS2Gwpub6HYweOP6sG 2d9g== 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:cc:to :from:dkim-signature; bh=pOFat1B1ryBBllWoHMJ+FJCh+hFLpauEM5Gtx+fR17c=; b=htJqC69mAnCBl9hXCYO6Gck6xIIrV/tU1vjtPFyQCl6MhTgE6YkveeFn0HcW5p5sXb md04W+ZZCmZZbQD2ut3iHmh7Ln/keaKcDLe5k8llVdLDDxjfYIWyDNrRlOqhXHkgZVS/ mI9bE0LrjB8X9Bz0itnMQL68dlO8XBHagUhvzxU7jw68GWj3CTXELu9Nt2H6uUVZXzGf 1s5EL/KS17Eso1jfSF/8mhgmgIpP/blHB3wHZLcyynBj7P8oltvk+n3Z9rAm+CwO5cQo XzXuR+g85Ezj7KqEdjSrXd1FXgh0usKPf5e9amD9+9PWRxd9OTh7GyJMtD40b1jZCSqC B3Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PwvjpARZ; 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 o3-20020ac87c43000000b002f932c5b25dsi3058221qtv.270.2022.05.27.11.32.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 11:32:21 -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=PwvjpARZ; 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]:47618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuel2-0001De-VX for patch@linaro.org; Fri, 27 May 2022 14:32:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nueYP-0006E7-6F for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:17 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:43836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nueYL-0003VK-BN for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:16 -0400 Received: by mail-pf1-x42a.google.com with SMTP id y189so4958536pfy.10 for ; Fri, 27 May 2022 11:19:12 -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=pOFat1B1ryBBllWoHMJ+FJCh+hFLpauEM5Gtx+fR17c=; b=PwvjpARZ+RQ6Q/zChfHSxWlyzNro+iaspdBW6loT/qzAT/Xzmv0V+DdzOVliT5v/aI i0Z/or45BiXv+l4+JooPifW5uu4EM+vd+JqsGcknHXV/UgEUSyvytHXwdnAq6YJIPOp6 wwTsuLjXteyGtZGai8AFvPos+JWOF7LWqhKQSbHENcVK+ODZrLMVNQ9xVTwn2OSSvcQV Ai/pcaGAh2gelceArWAmPhXJQYLBoUbPljaDR9aSwFHo5K9tjRFKjl7vinzNAIIOGSt0 YtF1quG5rKfsPg5/R95P9cCUPSd8teOosYzJ8SB3XNrvCtLiYRl2MCGPlmIHEHWjMIyw laXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pOFat1B1ryBBllWoHMJ+FJCh+hFLpauEM5Gtx+fR17c=; b=cT8uMC5dwpYlzxRlXux06SM8IYB+COGN+MqV/5RnMilawHlPYrFsB+Okms29BW7ytv x2Y4Tp2GGJIUpwHWPqXmJ4r82wQTZJafyP/2vyDmnprJTh6F0acJwfHLYxBvZiyjgRPV 4uY1Qc03LTYIddXgQiY/TosVkEbnWnrIIJ6rgdUYFX8dYjvG4yfxugQDDr/zOhQlXeyI bD3GwPQ/FJ5AhWbdTHVnQG8MC7jGREifNF84x4sxhDuVu/TUaILzDCjOtdte8TAr2rhQ OZhhSDHOCFQjTdZ6HY2vo3oQxh3hpmqG42nNY9DkHYSUR62dspMzk6X6gwJqv8X3/OPY b51w== X-Gm-Message-State: AOAM531ukG3aCIZq3WoYi+Vwo8k5qwoxQeulAWEhgapVgm41eXFIO9/z 3s2xeMejSooa6xG6tx/luNg9Veqc39nMKg== X-Received: by 2002:a05:6a00:1502:b0:518:d3bd:c9eb with SMTP id q2-20020a056a00150200b00518d3bdc9ebmr18382659pfu.86.1653675552060; Fri, 27 May 2022 11:19:12 -0700 (PDT) Received: from stoup.. (174-21-71-225.tukw.qwest.net. [174.21.71.225]) by smtp.gmail.com with ESMTPSA id t5-20020a17090ae50500b001deb3cbd8f1sm1911612pjy.27.2022.05.27.11.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:19:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 003/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz Date: Fri, 27 May 2022 11:17:16 -0700 Message-Id: <20220527181907.189259-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220527181907.189259-1-richard.henderson@linaro.org> References: <20220527181907.189259-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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" Convert SVE translation functions using gen_gvec_ool_zz to TRANS_FEAT. Signed-off-by: Richard Henderson --- 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 903514cb6a..f7e7a569b7 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) {