From nobody Fri Dec 19 04:28:26 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1598975471; cv=none; d=zohomail.com; s=zohoarc; b=KFznM9gvjcIe7woJEmogO+I7PPtbLrLqDFkDYNxfSkDn2Pvsx21S9opjD69hZL8M6uszwhZ42Q7Pw7DtMTiC8YgjYq8puD5lHVTIpfVS2JEPoMN5PxuFYNZnmCZQRMXZeqJPtCdb5oWJGrczvJDH3nPO7w959hBce3pwqezGaJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598975471; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PmeOYcAvC6VtCxfms298ylKFKv4w1tXwUMe/SRV1NTk=; b=A7JxjTcgQ+BqfMG+pFz/VDQjKY35ZkCzAE8DS0xN94l+0d98wOsjoFMIpbE3XrdMP7Wqax8J83kSnlvksuluqR9XIxMMHrTOQsF8LEoLFkRLRmyfx+SMb4rjnTOchqjzOOtvKDtoT46AqgPZlmbYpjdoBLuAoQReGIk7cwckAhw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598975471013949.5869125158999; Tue, 1 Sep 2020 08:51:11 -0700 (PDT) Received: from localhost ([::1]:44690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD8Yw-000091-9V for importer@patchew.org; Tue, 01 Sep 2020 11:51:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD83n-0008Qk-Ch for qemu-devel@nongnu.org; Tue, 01 Sep 2020 11:18:59 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kD83l-0006Ep-Bq for qemu-devel@nongnu.org; Tue, 01 Sep 2020 11:18:59 -0400 Received: by mail-wr1-x442.google.com with SMTP id m6so2003503wrn.0 for ; Tue, 01 Sep 2020 08:18:56 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z9sm2242317wma.4.2020.09.01.08.18.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 08:18:54 -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=PmeOYcAvC6VtCxfms298ylKFKv4w1tXwUMe/SRV1NTk=; b=ohypDc/ZIs1qyF4qyFFoU13k8/n0xwoQGvfN108c9Xh63XpyautojlHXIxyixdKz+0 zReoTc/lbTmldpvNIyoNVzHsqCDmZ1gfY3qjxhFEh9vLi/Zi1A+crv4LMUBESuhZoJxf mJ1+uVXV4fOp9ymYskOxxXjCrmxgUsnNUe4pSVuQMNbBBdeud7Xa+Jdm9jyHc9ZSuMn9 v39+SWf1wZEg5C5ss6VjNXAN9RsPsPsH8pC6FNJdixCFirxutSnRBdMQeVT3AgQ4cQZN 1EAnxFXM7Llixdo4zo6aNZw3ZczWioqQ20Cq1sN4DdNyefNb7WVihMIzfThDAbxjz8g4 acuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PmeOYcAvC6VtCxfms298ylKFKv4w1tXwUMe/SRV1NTk=; b=I0wXYzhgZwcbDnVm9sg3WbTHH2Us9QrO03h48C7lDuv7V52K778c5Z1S54B21MepGw r4TIiyid+UGdQRS25H8bKGaPbrYU1utlbh+mPh2WpT/HA4WSV9GidEO8r5NjvGSnQHpN y5CDK7rufCq+u+l4W+9+jVBEqXonD6DriNxQk1RjVsdEaVqI6zByuja0qSLwKZ2+rUuQ CDabcpLk0hOp7UlPAsAYfvz1Ck+3+Mj/D4ta2WzAQRuoO7taLfu8x8XI+WhnSDDhUnNR LmcZAi02HKu/2DbkFyAhpzPwVDjkJVvsVM4aji4Co9WPy4kP4zsXgn3+P6mX1zdTI2q4 rr4A== X-Gm-Message-State: AOAM53187soOJr4iM0n5fWeo3kFzyz7U3DpsDjAMVu0gIiYQYJS4Pq2m 5zzVzfbDztxhYBWXxbwhttMRwTAZDAopDdRU X-Google-Smtp-Source: ABdhPJwpJWzrOdG5JXqTb6sz3t3C5MTRFagdrc9z5ZTsleyEhYgbyHjmD4ELrd30eGyzNMTWU7cmwQ== X-Received: by 2002:a5d:4109:: with SMTP id l9mr2509135wrp.398.1598973535723; Tue, 01 Sep 2020 08:18:55 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/47] target/arm: Implement fp16 for Neon VRECPE, VRSQRTE using gvec Date: Tue, 1 Sep 2020 16:17:59 +0100 Message-Id: <20200901151823.29785-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200901151823.29785-1-peter.maydell@linaro.org> References: <20200901151823.29785-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" We already have gvec helpers for floating point VRECPE and VRQSRTE, so convert the Neon decoder to use them and add the fp16 support. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200828183354.27913-25-peter.maydell@linaro.org --- target/arm/translate-neon.c.inc | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-neon.c.inc b/target/arm/translate-neon.c.= inc index 9d0959517fa..0a96245e962 100644 --- a/target/arm/translate-neon.c.inc +++ b/target/arm/translate-neon.c.inc @@ -3857,13 +3857,40 @@ static bool do_2misc_fp(DisasContext *s, arg_2misc = *a, return do_2misc_fp(s, a, FUNC); \ } =20 -DO_2MISC_FP(VRECPE_F, gen_helper_recpe_f32) -DO_2MISC_FP(VRSQRTE_F, gen_helper_rsqrte_f32) DO_2MISC_FP(VCVT_FS, gen_helper_vfp_sitos) DO_2MISC_FP(VCVT_FU, gen_helper_vfp_uitos) DO_2MISC_FP(VCVT_SF, gen_helper_vfp_tosizs) DO_2MISC_FP(VCVT_UF, gen_helper_vfp_touizs) =20 +#define DO_2MISC_FP_VEC(INSN, HFUNC, SFUNC) \ + static void gen_##INSN(unsigned vece, uint32_t rd_ofs, \ + uint32_t rm_ofs, \ + uint32_t oprsz, uint32_t maxsz) \ + { \ + static gen_helper_gvec_2_ptr * const fns[4] =3D { \ + NULL, HFUNC, SFUNC, NULL, \ + }; \ + TCGv_ptr fpst; \ + fpst =3D fpstatus_ptr(vece =3D=3D MO_16 ? FPST_STD_F16 : FPST_STD)= ; \ + tcg_gen_gvec_2_ptr(rd_ofs, rm_ofs, fpst, oprsz, maxsz, 0, \ + fns[vece]); \ + tcg_temp_free_ptr(fpst); \ + } \ + static bool trans_##INSN(DisasContext *s, arg_2misc *a) \ + { \ + if (a->size =3D=3D MO_16) { = \ + if (!dc_isar_feature(aa32_fp16_arith, s)) { \ + return false; \ + } \ + } else if (a->size !=3D MO_32) { \ + return false; \ + } \ + return do_2misc_vec(s, a, gen_##INSN); \ + } + +DO_2MISC_FP_VEC(VRECPE_F, gen_helper_gvec_frecpe_h, gen_helper_gvec_frecpe= _s) +DO_2MISC_FP_VEC(VRSQRTE_F, gen_helper_gvec_frsqrte_h, gen_helper_gvec_frsq= rte_s) + static bool trans_VRINTX(DisasContext *s, arg_2misc *a) { if (!arm_dc_feature(s, ARM_FEATURE_V8)) { --=20 2.20.1