From patchwork Fri May 27 18:18:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 576625 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp936425mab; Fri, 27 May 2022 12:53:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIRS2824U7a5yEDekRJG+KGpH5GIEz+kZML/KNFXCafjfm9vMU3MsWp6KsYGBlCxspmbd1 X-Received: by 2002:ac8:5cd3:0:b0:2f9:3083:763c with SMTP id s19-20020ac85cd3000000b002f93083763cmr24767948qta.63.1653681239235; Fri, 27 May 2022 12:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653681239; cv=none; d=google.com; s=arc-20160816; b=fzASeNq9pcpMHVmVnYpQCVnTHu2wQtrqT7UVFILyQB7arpTwOSUyOjWL+t0CdfBBBH g5wFJfmDRDnDgm1uhlCCii6JAElFWiaO8jTWQa6P9o6ZuYI3Kurj/H07ug1EHa+zt128 pkSU/JLZ35gqSFY2Le7X95aEN+XpEvaGMhvF+Ce57HzrEO8P7UQikkBsGOvi3EWGOqPU g9XpL3FIwhQol8V5goZonhSNiCW0Zm3jPm3euC4EcVgeEyspuvSapnEG3gbSBwMQ9C9Z ZDLXt5XwH4uXY1qSvjmE0r1KkG9sTXLhGSHZrsjI2ZhhxBIp2gioDMRqah1BCsmdc/ee iD4g== 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=+cYk0Y2yjz0a0skyvalYNOV9Wt9osqE9+bFCpo/MGis=; b=ei/hZDDRZPiGX3G9hFBPvHDM3fmvoZeJkpTl1fzTS+yEShcDM18eG3E96LTmYb40nb 38FWsaMpE6MxMQ08PujWz1CZo+/vR28pRUtgly1CqBjMICGZyxPlvrNeUEXDAhkZylNy 6DrNTvAcCIRj+UGoZZ9v4yPtPLvigYblE6KmWsnA5eJ72v9XENbV96R7R2jYlZH/eMIq OvIva1yR8cDtS1WPnGZhxEwoGyVGPEuOhSAyhXhNfTCAsYrpiimJwUNj2XHfeYj6KyYv fki0YaY7zAI6qOOfsiWhQkUtn24pd+nbqqFEdPKUM1pupy6usUfhmNAh1+NgbEbuCg77 wRUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BDD86Cxw; 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 3-20020ac85743000000b002f93ab6a4a3si3425036qtx.211.2022.05.27.12.53.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 12:53:59 -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=BDD86Cxw; 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]:37156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nug22-00089T-ON for patch@linaro.org; Fri, 27 May 2022 15:53:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuefb-0001q5-5T for qemu-devel@nongnu.org; Fri, 27 May 2022 14:26:43 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:43773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuefX-0005Mn-Um for qemu-devel@nongnu.org; Fri, 27 May 2022 14:26:42 -0400 Received: by mail-pj1-x1029.google.com with SMTP id l7-20020a17090aaa8700b001dd1a5b9965so5042139pjq.2 for ; Fri, 27 May 2022 11:26:39 -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=+cYk0Y2yjz0a0skyvalYNOV9Wt9osqE9+bFCpo/MGis=; b=BDD86CxwJEk+0KrjaUJNNTz6/IHklPBvnzP1JdWsoiDNvhTuJ8SPMLnCEg57dqeU5a o4y6W8fvUrXTv7ok3ZNGWXYG9A9koYzASZQ0q0YWe1CH2/xUIcXWnIRsT1KWFwar0jbY RQYecqiolgXKtpugZZ8kgO4ifxmcGnEMo9p8yUx9EPxh7vL9TAOvVopaxxlwlqy0xwkh Mr/GOWnQyLt6gQCRklsAEF9lJOWNyOHiRTDltJTQHLveRGjYV6Orvw7CjxCTtCOdL2SS uQRXO7a+s1zAUCv/b8JhepMbeDjiMCD9NmE/LNaYTaP0Bui7l0f2vTef4UzdbaTfS8M6 Ia+Q== 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=+cYk0Y2yjz0a0skyvalYNOV9Wt9osqE9+bFCpo/MGis=; b=j7Tyt3VY65hIqo099FQgpXmRD6LWe4r3UAjd+rgXnWv26AtUtt9HdyeIwbG4mCFqMB p6JfZsh8Io+MetFrmle9lsTL2tWwKL2c9YqEyQau2c/eAF90FZUnuOe8gwUeQrdNWZUX dYRVBrw7hq3N/b6eWlcSeZehQrORFMr9R5Qs0jUgvE9DQ8SsL2c+8b7AjFbV5GUMofk6 AbDU/KIAQUnVsDz8P89Vnqi6k5xVZO4ASpmhr7GopZ+WLZNe83qJML1uj+/fUlnUfmzz K4ReNz2ZEQoHneEkFPThMIAA7esKzmezvkw7B6r461Qf8cK6cOHlYnbLNX61CYNd3/pf +sTw== X-Gm-Message-State: AOAM530sA06qYRqUEZCP56bMxXysxcticiRNLRaQTVknSbrDdUWzn8fn asPL1fVnEaDBoC5u66VXE8h5jkc4PO+XpA== X-Received: by 2002:a17:902:7048:b0:15f:34c1:bae0 with SMTP id h8-20020a170902704800b0015f34c1bae0mr43773273plt.71.1653675998639; Fri, 27 May 2022 11:26:38 -0700 (PDT) Received: from stoup.. (174-21-71-225.tukw.qwest.net. [174.21.71.225]) by smtp.gmail.com with ESMTPSA id g13-20020aa7874d000000b0050dc762816fsm3781539pfo.73.2022.05.27.11.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:26:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 096/114] target/arm: Use TRANS_FEAT for FLOGB Date: Fri, 27 May 2022 11:18:49 -0700 Message-Id: <20220527181907.189259-97-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::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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" Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 552a551fef..2f96f52293 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7280,29 +7280,12 @@ TRANS_FEAT(FCVTX_ds, aa64_sve2, do_frint_mode, a, TRANS_FEAT(FCVTXNT_ds, aa64_sve2, do_frint_mode, a, float_round_to_odd, gen_helper_sve2_fcvtnt_ds) -static bool trans_FLOGB(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3_ptr * const fns[] = { - NULL, gen_helper_flogb_h, - gen_helper_flogb_s, gen_helper_flogb_d - }; - - if (!dc_isar_feature(aa64_sve2, s) || fns[a->esz] == NULL) { - return false; - } - if (sve_access_check(s)) { - TCGv_ptr status = - fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - unsigned vsz = vec_full_reg_size(s); - - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - pred_full_reg_offset(s, a->pg), - status, vsz, vsz, 0, fns[a->esz]); - tcg_temp_free_ptr(status); - } - return true; -} +static gen_helper_gvec_3_ptr * const flogb_fns[] = { + NULL, gen_helper_flogb_h, + gen_helper_flogb_s, gen_helper_flogb_d +}; +TRANS_FEAT(FLOGB, aa64_sve2, gen_gvec_fpst_arg_zpz, flogb_fns[a->esz], + a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR) static bool do_FMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sub, bool sel) {