From patchwork Mon May 30 16:06:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577282 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp444227mag; Mon, 30 May 2022 10:39:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRJXktbNUslJQTS92LjEVS+74rQp+G2hw1DBkiBg41X71Np4GiS8lhSC12rIW30e+yKw94 X-Received: by 2002:a37:989:0:b0:6a3:4a0e:72bb with SMTP id 131-20020a370989000000b006a34a0e72bbmr34763724qkj.597.1653932342414; Mon, 30 May 2022 10:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932342; cv=none; d=google.com; s=arc-20160816; b=WR/b9GjUUETf99dCg2x8DHa6YQ1jjUFkT19xM2hHKP2E/an+//Bacr+V7Z0HQpy4dR 92VyLGhSLhv5QHMCvWaqRodRDLh0XSZrwxK82p+jO3zWUgPpI/q0ZNAr2ydOXXGTbXxY ojliF5NZIkg2Bo/sJdO8GDt0o4dGc32JXpQaaV7t5JtSOJL5OzLYxyTsKEM2X4YzNHwS WRLxwb+7Pa8KVH4T6ZrGLRdmsXVuj2fdlX51EjtqRgT6HPpgavJom9RMidi8xJREzyED WyWrKygvKjkLW2O23SKUk2NsUg6DNPYB8n8pcfeWvJkfehjZpHrDSPsREvBlsWXt+JVx g8uw== 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=nOBen4gxaB/GNQ5+tb7fMVQd27qw+i1GIkH6L4Gx19A=; b=bEwmfZIo0mkXfVAahzcKxAhzp+0vcqgxo5mrNT/LRjY8egxQnZRuB9vuNsHkN0TtBE aYnItlTV7DOWLXv1dAr3f2M+CKaoROlzUOLDPQW+MwY7LnCMROuxzFZMh2+tAvRMEzxb 1GZGabR2FSn+xNGJfjWTPOIZovN+Q0vfWrBs/XiA2cimFAHDoIrJTZqoQHhKFiY9LosR 0fvdvghuBX1KpSqjdxDNsfNrie05bnWFet/dFtMJBE1RLhmaVQabw3OQRk25o1IrVXBn SwyYcJ6o/abcFk5IgVlvZJiHmQDDSaboK52JaN5wl5WJ+ZeJSZPzv+cWhwVTVd7eneKY lhMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zXPjHzpQ; 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 n13-20020a05622a11cd00b002f917a0c393si7968527qtk.725.2022.05.30.10.39.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:39:02 -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=zXPjHzpQ; 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]:51470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjM5-0005Sh-S3 for patch@linaro.org; Mon, 30 May 2022 13:39:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwf-0004Cj-MB for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwd-0007MD-Bm for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: by mail-wr1-x434.google.com with SMTP id q21so4089541wra.2 for ; Mon, 30 May 2022 09:08:38 -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=nOBen4gxaB/GNQ5+tb7fMVQd27qw+i1GIkH6L4Gx19A=; b=zXPjHzpQNUk3Nvj6lY2UlyMjh3ldipKdyR/VVDjQSZAkyuQh4F4PmJxfJovdqWRw/N KCtqrwbJ+R9f/chQ8HBiM8ed03qKn92WJ75Fe16JAn9Qq1frJkC01LOtXA7LSG6jQ+Y3 1VqABL+IonY4g75HEyVdKyP5EcZ2Uoou5wmCv4YpL+Ga3/tlM6kimiDSBWqZ3yM1uP8J ASDuexz0iiYnaGRFgG+FJnDos72IUPA77PW8CDHe71ogkwL6ZSvXKC9oQ9IQ0UNBik8r vVSqpmcHTPgMSu74jFQqmVeELiMTMVAIG9u8zYbQjKFbS3dXAb0zMZR/tN19WkuNw6Z4 Z8rQ== 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=nOBen4gxaB/GNQ5+tb7fMVQd27qw+i1GIkH6L4Gx19A=; b=rd3Eu3ZFKQPnP/4eAnnQDzFouR8ianPZMOtlX08XG7MndGjEwQiHyOMGqJrrNBZXAe sIN6itHcVAQQ+8FwYGAZU98jtNOFUUvnRy8pufYaxywe2KjsZIyb5oVGINPKtyEpktF/ 8TGf2fWQa/t3gKSeNUs7FllL7C00LzCnPV+j+/BYf6SDKCk+/Yo5Fsbja2fogy53YapR ks3Fxo5GpufT/hCKmIqOnZJwtz87fS5oEP8Otpa8FF/7ayBNJ0KTud1Zuit9vsQ8HQ0p 1ZespGncz+RbMGXx2sXGxjdHtfWv9/QZLWFvfKi1V01G2d9hjTYlQ0oU9usenVo62c3r wu4g== X-Gm-Message-State: AOAM531HW0qcgakXOhkA10pH0mMzudbJfmPyc3MLgeGI9amxGEEBqRr2 gKcQf/rCjYz0TwldHs7EU8YqRO2ECgUpsA== X-Received: by 2002:adf:e0c3:0:b0:20c:5672:9577 with SMTP id m3-20020adfe0c3000000b0020c56729577mr45683145wri.466.1653926918497; Mon, 30 May 2022 09:08:38 -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.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 099/117] target/arm: Use TRANS_FEAT for FLOGB Date: Mon, 30 May 2022 17:06:50 +0100 Message-Id: <20220530160708.726466-100-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::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-97-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- 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 552a551fef3..2f96f52293d 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) {