From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451904; cv=none; d=zoho.com; s=zohoarc; b=RI/2o8O/gGcecHYEg0tcNcL3QXbfn/kPonVku4XLGtq3kN5It/5GbqoUfVJGAY6ul33F2PqsR85LAneFEiG66AB1uc5KHkOp58RU8Ty/LSPrvuyjeXRKthyxjfMfn01p2hvlQrqht0YSt+zIuh4PPpZeJ3B1vfRJcTNSiV3cxWY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451904; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=G+NyIHdm+2ansJRDNwYfzFl09GqHtSLyhidznXncrP4=; b=iJdp/tK8+jPf4bcZy4qgvxWi42zRG102kadEqJBv39j2EssZPgfb3aY0xAzYN38SAYyo65JRm//5LDfg3gHZj/2/YOylctYxBgFnDn0oSKHkQHRs6np0xVnsjweBoD5z1sPD7+vYvEiDe2x7LIbwfsvZ+PsTr/izUt31yasrXqY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560451904291763.8522954941108; Thu, 13 Jun 2019 11:51:44 -0700 (PDT) Received: from localhost ([::1]:43828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUp5-0003sV-2R for importer@patchew.org; Thu, 13 Jun 2019 14:51:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53762) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlI-00041N-0q for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlF-0003Jj-CM for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:39 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:46487) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlF-0001u4-2s for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:37 -0400 Received: by mail-wr1-x444.google.com with SMTP id n4so21458847wrw.13 for ; Thu, 13 Jun 2019 09:39:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:19 -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=G+NyIHdm+2ansJRDNwYfzFl09GqHtSLyhidznXncrP4=; b=EB3n0tHSeM8OdTtRCrXDwLIA7a5NtocaQAGVRmCKhr4M5z3CEraFBqaCqVh0TJGjte AC4x7VSu8/IJBL3wNKnBxSGIneUx2OE9MvwEH5aonmgt973LWwPkjyJfFRv9FL/pNwUI hHckFN02VP+lHIiZo+TOPNADPPji5waAfaNkW9QEhB/YkGIpB/4UlhSbGmFYqMGeTjeC OXGhsihjUSnE5xuYrojaF5RozvXSKz8h7qi+uAWzqH/3Fyr/10fj5LymSdLlxW0d4ycN /pBZYLx+7uEu68FlIIXPw3YAyFWKlJnOsA48mtxBZClRv9vrYWTwQJB8dZx2vdTHNTC5 nBKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G+NyIHdm+2ansJRDNwYfzFl09GqHtSLyhidznXncrP4=; b=pV2X34/STUflasNRY4wcDZOlYkofzclNODavt+xIUbtZmo9cVN9EpSY3WDzlWD4Xtk PghxZQCMJ/jJtaroU6dBqot0IvP2qYDi0ZeAa7vTbUzS5FgYmWAkjCXMqM6Ut8jXeN8U bSnGxcN8OixSOOmfHPoup8D60fj5Y6eQp7IM2ZUUTY24B3GxmQO/N5B/EWc8BrLB2Ozg uXFL9ukM+gWevmXYEy8cjNQNqSmxgiq0Ang2agxnG5juIYcC77s64rn6La0h944+cqbj 0HyvWbNcCfI+PLzzaV9QoDEMU+0f2WRoyT+BKO74tj61aplm28bN3g47Q96HOsyvUX0y yokQ== X-Gm-Message-State: APjAAAVq8mCrZWM0OMoVcb7LNf2rgoeax2nwRvkO7iVbkrBWgwQvh1am E4Wagep3uWUXgi6FJRUAfemg3jU3CW4vNA== X-Google-Smtp-Source: APXvYqz+APxGqi0dqRcvvDJLihGu9IJ7ca5IV1mDcd1rugZMQIUQ7VZhDjPjDrVyWlOSooO2BVTzGA== X-Received: by 2002:a5d:6acd:: with SMTP id u13mr14515369wrw.154.1560443960508; Thu, 13 Jun 2019 09:39:20 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:06 +0100 Message-Id: <20190613163917.28589-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 01/12] target/arm: Move vfp_expand_imm() to translate.[ch] 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" We want to use vfp_expand_imm() in the AArch32 VFP decode; move it from the a64-only header/source file to the AArch32 one (which is always compiled even for AArch64). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate-a64.h | 1 - target/arm/translate.h | 7 +++++++ target/arm/translate-a64.c | 32 -------------------------------- target/arm/translate-vfp.inc.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 33 deletions(-) diff --git a/target/arm/translate-a64.h b/target/arm/translate-a64.h index 9569bc5963d..9ab40872d85 100644 --- a/target/arm/translate-a64.h +++ b/target/arm/translate-a64.h @@ -39,7 +39,6 @@ void write_fp_dreg(DisasContext *s, int reg, TCGv_i64 v); TCGv_ptr get_fpstatus_ptr(bool); bool logic_imm_decode_wmask(uint64_t *result, unsigned int immn, unsigned int imms, unsigned int immr); -uint64_t vfp_expand_imm(int size, uint8_t imm8); bool sve_access_check(DisasContext *s); =20 /* We should have at some point before trying to access an FP register diff --git a/target/arm/translate.h b/target/arm/translate.h index dc06dce7675..bc1617809da 100644 --- a/target/arm/translate.h +++ b/target/arm/translate.h @@ -237,6 +237,13 @@ static inline void gen_ss_advance(DisasContext *s) } } =20 +/* + * Given a VFP floating point constant encoded into an 8 bit immediate in = an + * instruction, expand it to the actual constant value of the specified + * size, as per the VFPExpandImm() pseudocode in the Arm ARM. + */ +uint64_t vfp_expand_imm(int size, uint8_t imm8); + /* Vector operations shared between ARM and AArch64. */ extern const GVecGen3 mla_op[4]; extern const GVecGen3 mls_op[4]; diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index ae739f65756..97f4164fbbc 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -6380,38 +6380,6 @@ static void disas_fp_3src(DisasContext *s, uint32_t = insn) } } =20 -/* The imm8 encodes the sign bit, enough bits to represent an exponent in - * the range 01....1xx to 10....0xx, and the most significant 4 bits of - * the mantissa; see VFPExpandImm() in the v8 ARM ARM. - */ -uint64_t vfp_expand_imm(int size, uint8_t imm8) -{ - uint64_t imm; - - switch (size) { - case MO_64: - imm =3D (extract32(imm8, 7, 1) ? 0x8000 : 0) | - (extract32(imm8, 6, 1) ? 0x3fc0 : 0x4000) | - extract32(imm8, 0, 6); - imm <<=3D 48; - break; - case MO_32: - imm =3D (extract32(imm8, 7, 1) ? 0x8000 : 0) | - (extract32(imm8, 6, 1) ? 0x3e00 : 0x4000) | - (extract32(imm8, 0, 6) << 3); - imm <<=3D 16; - break; - case MO_16: - imm =3D (extract32(imm8, 7, 1) ? 0x8000 : 0) | - (extract32(imm8, 6, 1) ? 0x3000 : 0x4000) | - (extract32(imm8, 0, 6) << 6); - break; - default: - g_assert_not_reached(); - } - return imm; -} - /* Floating point immediate * 31 30 29 28 24 23 22 21 20 13 12 10 9 5 4 0 * +---+---+---+-----------+------+---+------------+-------+------+------+ diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index 709fc65374d..a66084f6e36 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -30,6 +30,39 @@ #include "decode-vfp.inc.c" #include "decode-vfp-uncond.inc.c" =20 +/* + * The imm8 encodes the sign bit, enough bits to represent an exponent in + * the range 01....1xx to 10....0xx, and the most significant 4 bits of + * the mantissa; see VFPExpandImm() in the v8 ARM ARM. + */ +uint64_t vfp_expand_imm(int size, uint8_t imm8) +{ + uint64_t imm; + + switch (size) { + case MO_64: + imm =3D (extract32(imm8, 7, 1) ? 0x8000 : 0) | + (extract32(imm8, 6, 1) ? 0x3fc0 : 0x4000) | + extract32(imm8, 0, 6); + imm <<=3D 48; + break; + case MO_32: + imm =3D (extract32(imm8, 7, 1) ? 0x8000 : 0) | + (extract32(imm8, 6, 1) ? 0x3e00 : 0x4000) | + (extract32(imm8, 0, 6) << 3); + imm <<=3D 16; + break; + case MO_16: + imm =3D (extract32(imm8, 7, 1) ? 0x8000 : 0) | + (extract32(imm8, 6, 1) ? 0x3000 : 0x4000) | + (extract32(imm8, 0, 6) << 6); + break; + default: + g_assert_not_reached(); + } + return imm; +} + /* * Return the offset of a 16-bit half of the specified VFP single-precision * register. If top is true, returns the top 16 bits; otherwise the bottom --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560452253; cv=none; d=zoho.com; s=zohoarc; b=hB+fq5icjSxKDiEgIP81d35IM71sXzhxWh5AKetyR9JWXHmZjTIEP3SAQpSPnXGDhLDDgwlzOYhzGhqgz5vFwSKX80MqqfkB3sLezSmnaSpdCOTGup0+3eKZbCtl5nD8SkztP3TzoJS+JqnOA5EzcfeAjZ+UjJJb1s2Cx4/skjg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560452253; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=Gokt4IdrDcmmQcCA2l5TV7aYVHlbnHYyswQ2I9MjocE=; b=UTQIj0sUx9yh7QZZVm2diiT6ceoV48LCxhtTysegj02rm6E78kMgunIJ/HtFiEOSSSbuJu5BY1gO9fLEbqaAqqvJ+DplIqORp58VwINyQjOCqnOEkaFVPJLf0+vAwnoX+GiCJsHR0ae7BaRTMAkYIWD/AiaX0kQgu+Vs3zb0+a0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560452252958603.4860752833495; Thu, 13 Jun 2019 11:57:32 -0700 (PDT) Received: from localhost ([::1]:43902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUug-0001rC-0W for importer@patchew.org; Thu, 13 Jun 2019 14:57:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53868) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlL-0004Bb-Gy for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlG-0003N8-Dt for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:43 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:36101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlF-0001vw-RK for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:38 -0400 Received: by mail-wr1-x443.google.com with SMTP id n4so21552176wrs.3 for ; Thu, 13 Jun 2019 09:39:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:21 -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=Gokt4IdrDcmmQcCA2l5TV7aYVHlbnHYyswQ2I9MjocE=; b=BL1q1qQed6sniZLbZricKmNJ1j42K79dZlrXG1nsxyCYust+0sy7c8/fSrz3ZFM2of jxfQ9obcZRGmAhFzeKFT+rKMv50w2O/BVEy08pWrgT/bswn5j+QjIC2n9dUHCKoHB6li cFhITtjdw3kNP3E22bhKpPJXD0fbuXa9EWRQ2jclzEIUBw/0HF4M+eOdMI9Gxzhu3S3Z dDZwFeIx/ZBEaCvWioAfoitpB5jYc9i1hYTylgnvzBokNLeLrW8oyuJCa6dGweHFEyFu Ylqq+9BwNL6sYzgUF531KKKl7PP1XxfvfrRrMH/2G+IiB+mrBM71+TNjcdqjDb4cil7f YK6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gokt4IdrDcmmQcCA2l5TV7aYVHlbnHYyswQ2I9MjocE=; b=n1hxlC5RJoRKogM6x0mGWjavN+MKjl/ngkv9ypqQ+gTj83iGW9MNwbuoI+5ruo16oV gPzJXhRAwQW6yWGoFDRQm77Xc3uB1GB89qjYkC92F/AB+IAC3194crKI8QmGzDKDp2FY GFWXDfG5W+7IireOxa0zigEjx8W/AzoY99RBJiYuaJk38WQ0cFZWu+PWxISn4N2gju/B D1IDqjD7cGPsEF1smLGc+kLmRRip6usNBtsyUyLmMnhMjiJ0Atg4pzJwA/fwQOmd3sN3 JlPgp1nk+zWxsdlPNKPipUgAx7teQD1pNp6vqPdeuBrNE7ttY9SY61xbaByy+pWs1RjL dsiA== X-Gm-Message-State: APjAAAXYrg9kwkZczQ/hhz1CxlIAsHwSu6+N8sWMIshQ1yL35cLpkQqi R8Bv85ZauC0/UWNiA1Erx8Wsiw== X-Google-Smtp-Source: APXvYqxeetYYcI0vRrNDyLLS1xmv73dkQL2Vf9Pgdz7z6srIwC8Z17sbSGoTZCaouIK2L8Yb5BdILA== X-Received: by 2002:a5d:4950:: with SMTP id r16mr15426905wrs.136.1560443961497; Thu, 13 Jun 2019 09:39:21 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:07 +0100 Message-Id: <20190613163917.28589-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH 02/12] target/arm: Use vfp_expand_imm() for AArch32 VFP VMOV_imm 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The AArch32 VMOV (immediate) instruction uses the same VFP encoded immediate format we already handle in vfp_expand_imm(). Use that function rather than hand-decoding it. Suggested-by: Richard Henderson Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate-vfp.inc.c | 28 ++++------------------------ target/arm/vfp.decode | 10 ++++++---- 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index a66084f6e36..8b732761f26 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -1842,7 +1842,7 @@ static bool trans_VMOV_imm_sp(DisasContext *s, arg_VM= OV_imm_sp *a) uint32_t delta_d =3D 0; int veclen =3D s->vec_len; TCGv_i32 fd; - uint32_t n, i, vd; + uint32_t vd; =20 vd =3D a->vd; =20 @@ -1869,17 +1869,7 @@ static bool trans_VMOV_imm_sp(DisasContext *s, arg_V= MOV_imm_sp *a) } } =20 - n =3D (a->imm4h << 28) & 0x80000000; - i =3D ((a->imm4h << 4) & 0x70) | a->imm4l; - if (i & 0x40) { - i |=3D 0x780; - } else { - i |=3D 0x800; - } - n |=3D i << 19; - - fd =3D tcg_temp_new_i32(); - tcg_gen_movi_i32(fd, n); + fd =3D tcg_const_i32(vfp_expand_imm(MO_32, a->imm)); =20 for (;;) { neon_store_reg32(fd, vd); @@ -1902,7 +1892,7 @@ static bool trans_VMOV_imm_dp(DisasContext *s, arg_VM= OV_imm_dp *a) uint32_t delta_d =3D 0; int veclen =3D s->vec_len; TCGv_i64 fd; - uint32_t n, i, vd; + uint32_t vd; =20 vd =3D a->vd; =20 @@ -1934,17 +1924,7 @@ static bool trans_VMOV_imm_dp(DisasContext *s, arg_V= MOV_imm_dp *a) } } =20 - n =3D (a->imm4h << 28) & 0x80000000; - i =3D ((a->imm4h << 4) & 0x70) | a->imm4l; - if (i & 0x40) { - i |=3D 0x3f80; - } else { - i |=3D 0x4000; - } - n |=3D i << 16; - - fd =3D tcg_temp_new_i64(); - tcg_gen_movi_i64(fd, ((uint64_t)n) << 32); + fd =3D tcg_const_i64(vfp_expand_imm(MO_64, a->imm)); =20 for (;;) { neon_store_reg64(fd, vd); diff --git a/target/arm/vfp.decode b/target/arm/vfp.decode index ea24365bb4c..a67b3f29ee5 100644 --- a/target/arm/vfp.decode +++ b/target/arm/vfp.decode @@ -44,6 +44,8 @@ %vmov_idx_b 21:1 5:2 %vmov_idx_h 21:1 6:1 =20 +%vmov_imm 16:4 0:4 + # VMOV scalar to general-purpose register; note that this does # include some Neon cases. VMOV_to_gp ---- 1110 u:1 1. 1 .... rt:4 1011 ... 1 0000 \ @@ -152,10 +154,10 @@ VFM_sp ---- 1110 1.10 .... .... 1010 . o2:1 . 0= .... \ VFM_dp ---- 1110 1.10 .... .... 1011 . o2:1 . 0 .... \ vm=3D%vm_dp vn=3D%vn_dp vd=3D%vd_dp o1=3D2 =20 -VMOV_imm_sp ---- 1110 1.11 imm4h:4 .... 1010 0000 imm4l:4 \ - vd=3D%vd_sp -VMOV_imm_dp ---- 1110 1.11 imm4h:4 .... 1011 0000 imm4l:4 \ - vd=3D%vd_dp +VMOV_imm_sp ---- 1110 1.11 .... .... 1010 0000 .... \ + vd=3D%vd_sp imm=3D%vmov_imm +VMOV_imm_dp ---- 1110 1.11 .... .... 1011 0000 .... \ + vd=3D%vd_dp imm=3D%vmov_imm =20 VMOV_reg_sp ---- 1110 1.11 0000 .... 1010 01.0 .... \ vd=3D%vd_sp vm=3D%vm_sp --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451084; cv=none; d=zoho.com; s=zohoarc; b=mOSKnMwD5zEMp/HK1+1bvmslhVH5dALwGzbq0LGKu/jNWCKacgk9Mi/Ma4E7nFVImIRk+5dde6W4Axbn+cgqQGd1qi15rPRG7gclyQ8IcKosPALboUGV5RqQMKn372cT1yUTmZ4AqDIRVeMhAtpgoZ6a8NH92eirhpfhmy4or0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451084; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=vi4fuS6trrxryGpXVQHQgicRuxlNLJ/gRR72lTmjq/A=; b=SMQ+X17ENfpGxG0hvtl3BWBAOs7+RKOvGwWVsVH62MCibzOo8n95AX8MV04YSi0uf/RKueaXYZjo6Dlad7F/2ysJPsXTS6zwAg0VkskOm9qK5x9fhcSwaUsSu5E8B2+M9Bnq+tdr8wVXIbp1J9PXSSBks8hvA9kWuvgU8v48lx4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560451084021502.41863436970664; Thu, 13 Jun 2019 11:38:04 -0700 (PDT) Received: from localhost ([::1]:43510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUbk-0008AX-Nb for importer@patchew.org; Thu, 13 Jun 2019 14:37:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53674) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlF-0003uX-6S for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlD-0003HL-78 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:36 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:32769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSl8-00025H-Sq for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:32 -0400 Received: by mail-wr1-x442.google.com with SMTP id n9so21554809wru.0 for ; Thu, 13 Jun 2019 09:39:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:22 -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=vi4fuS6trrxryGpXVQHQgicRuxlNLJ/gRR72lTmjq/A=; b=rScZ2W9YLKkFihqFm6aSR6MHhwsWKG3a37gRHHLVmhQHEveS32ARV/ikKswpYuKKlt A+CXDlcQgpn871h/qf2vl7uQXtUMgngRmdnLJnYE5jIPc1s7dAfFg+siI6SY5IV7JQvc Xn5SJnzsN+HoVI+FvfNQud7ByQqS9tgNod6xMHxzHHyYs+6q6DL3XEgJoNQPoGOq8ohT eFX5Ox7GDpJM8+Q7NQRXxc+SFf+8me5m65x8MhIpBFrEi998gj3Hdw3WzCZXnj6mQcks cyI4HImQze/Yh8tMh33t5IDuohomsO9DX/cbnyE3lDl3TAJThZu+lYow5GEfhWUMvdn1 /Htg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vi4fuS6trrxryGpXVQHQgicRuxlNLJ/gRR72lTmjq/A=; b=bEhVplDPvsDw0w7PMmOUV+iYRgFZdchyhNZ+omdm19gXUc8oxXWGYnAZMdMG+8OX4c mB+jwbtT4LXVPWM9tXMnI3xgJLIeBZv6PogHLPMQGFypJwwd5HeDJvsmfi6l1YiVrEZH 45TqyT9Lr4RVM/fgSTksnlCUcT1J9u87n2Vag7O2PAq8gTLOj0OdCONJd1bld/LXmIPE MXfYifYeSxiQ+lZx+SRqQ61aA9ZiZ9LENfng1+svzqe06b8Ifi1WkP74dnax5e6zbTpy pOi0sSW7A1rLvVldBA1ynRqj73nvZOg2sHAp0ajgo7fa9aQhVakqx6U+zRPf9c8EQJXw KooQ== X-Gm-Message-State: APjAAAUHDtZwzTIOmHUZy/TxRzKtwu+ZWX+pcQVAV9J2aMgB69qvNBH8 TPvTEeWvoVCBzYNaSMiDzKgysWbdcIdijA== X-Google-Smtp-Source: APXvYqxmBEVRIXFt8jji0O456JRNKT4j2O57MxWqCn2VVvZeZ64xFbxnj6kpCEwQfNxx5Yi8BWt/6w== X-Received: by 2002:a5d:6b12:: with SMTP id v18mr61452916wrw.306.1560443962570; Thu, 13 Jun 2019 09:39:22 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:08 +0100 Message-Id: <20190613163917.28589-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH 03/12] target/arm: Stop using cpu_F0s for NEON_2RM_VABS_F 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Where Neon instructions are floating point operations, we mostly use the old VFP utility functions like gen_vfp_abs() which work on the TCG globals cpu_F0s and cpu_F1s. The Neon for-each-element loop conditionally loads the inputs into either a plain old TCG temporary for most operations or into cpu_F0s for float operations, and similarly stores back either cpu_F0s or the temporary. Switch NEON_2RM_VABS_F away from using cpu_F0s, and update neon_2rm_is_float_op() accordingly. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index c274c8b4602..a10fded1f39 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1374,14 +1374,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } =20 -static inline void gen_vfp_abs(int dp) -{ - if (dp) - gen_helper_vfp_absd(cpu_F0d, cpu_F0d); - else - gen_helper_vfp_abss(cpu_F0s, cpu_F0s); -} - static inline void gen_vfp_neg(int dp) { if (dp) @@ -4191,8 +4183,13 @@ static const uint8_t neon_3r_sizes[] =3D { =20 static int neon_2rm_is_float_op(int op) { - /* Return true if this neon 2reg-misc op is float-to-float */ - return (op =3D=3D NEON_2RM_VABS_F || op =3D=3D NEON_2RM_VNEG_F || + /* + * Return true if this neon 2reg-misc op is float-to-float. + * This is not a property of the operation but of our code -- + * what we are asking here is "does the code for this case in + * the Neon for-each-pass loop use cpu_F0s?". + */ + return (op =3D=3D NEON_2RM_VNEG_F || (op >=3D NEON_2RM_VRINTN && op <=3D NEON_2RM_VRINTZ) || op =3D=3D NEON_2RM_VRINTM || (op >=3D NEON_2RM_VRINTP && op <=3D NEON_2RM_VCVTMS) || @@ -6761,7 +6758,7 @@ static int disas_neon_data_insn(DisasContext *s, uint= 32_t insn) break; } case NEON_2RM_VABS_F: - gen_vfp_abs(0); + gen_helper_vfp_abss(tmp, tmp); break; case NEON_2RM_VNEG_F: gen_vfp_neg(0); --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451224; cv=none; d=zoho.com; s=zohoarc; b=dz8Crvl2iXGsHasqM76buMkCMkCrSMb12H72QXIAvYEZDmamVmwSMenR70zZKahUDeDZN121IIa6yX2KUIbOLNllxE5ZhEiytnH8ok0x/HFoOq+ZkAn7b3vDQaSr+nLALZKeANqO6zXfUuw2MqoFJAcNKJdOI+5Jizza3BiUgYY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451224; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=qQmS7fDlwcZP6vIBxbHDINfjc+89reFKqPWwOYK60Kw=; b=R+sOnIelcP8gRdOHSa3rPTYj31RcsDgUBepClPGNQ5bJBZPB6qXJsB9gEREL2HpBu2J9OCKUUoKvBUI5ThP+bT0IXIpa2xzmIQGy3XEVy0+q03I3EQXZSrTTzolBnps370ixzJt9l3XCdzCjq/5MK5ZiTzM9fbeOtbfuTR0sE0k= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560451224768320.7322646725065; Thu, 13 Jun 2019 11:40:24 -0700 (PDT) Received: from localhost ([::1]:43554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUe3-0002iB-SA for importer@patchew.org; Thu, 13 Jun 2019 14:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53683) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlF-0003w4-F5 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlA-00033x-MP for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:35 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:38271) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSl6-0002Af-Ej for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:29 -0400 Received: by mail-wr1-x441.google.com with SMTP id d18so21500527wrs.5 for ; Thu, 13 Jun 2019 09:39:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:23 -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=qQmS7fDlwcZP6vIBxbHDINfjc+89reFKqPWwOYK60Kw=; b=QnQyS2gW36bnd6wnT+pgY0HZvam4SnFDo8x+J+U42SyswUpYxC5kMsF21UMuvCCjj6 YltiJgyuxWAOEI4oOA35JGtRo2UxTb7XWL3iazQgEpacyGkp1csmzew5cIPTHaQer+Na 2r5X40QFKU9XqPu9E0WP5sOHJ4ZCgFgTIUGgsyoKh+emPMB2la2bC9roKu3hDRLOWz42 CBUa1OE7r0A4jLGXByW5dlxnrm2iiQJ5NfWKgpG3AKVZLXKqjY1vEetKoH4x/wBPFNDd 0uKaT4EQSKDCvMaRxsqUgTdwIpHk1osdZKVg5tgZEg5vmi7Nt33wgzmVr4OTG1fzRKPd i2FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qQmS7fDlwcZP6vIBxbHDINfjc+89reFKqPWwOYK60Kw=; b=Lep0E6vldjO4Wm0c6Cr0L26bVqXV/xl8tPdx6L6C2YO7LhvWFYhMp1GlvSDGOANzYx tWrS5ohh/3BCglpMfxhbTcRPubSK5WPA+M1ZxW9P41QMUtfWHfPrwst4TIf/DS1k9ptN MuwHUHiHwB4AL0cQhYMJKG1CoCHJE737co+OXu0OHLv4VdiGJWzXdwrp0FBjv1hPg7rR XqK9ZABUxDmnnnJaPqe2U8JakaP/kZcK/D0nIEgqW7orUQ+a90jj5nJjxuXLtSVObLZL X3YrgHw9w0UBgSVwjw0Z53j1cbkNTqEZ4EsA2jhwWlyME73TzuQ6/TM0MBzAxCxCVXTv boNA== X-Gm-Message-State: APjAAAWDuLVBbR4JXcUR+0cNbq0xEuH11MYM77K3rYXZsW0AyZ97PeB/ oTnxtX94n52QulJu6dU5gjW5cg== X-Google-Smtp-Source: APXvYqz6QwyNRKFwz4NtEUtYtS96gWZtYLjOPQBySR1Rr2Qn/QAPAemVdAN+WM2mX4I6GlkF6Uy3Vw== X-Received: by 2002:adf:a509:: with SMTP id i9mr49822524wrb.269.1560443963612; Thu, 13 Jun 2019 09:39:23 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:09 +0100 Message-Id: <20190613163917.28589-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH 04/12] target/arm: Stop using cpu_F0s for NEON_2RM_VNEG_F 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Switch NEON_2RM_VABS_F away from using cpu_F0s. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index a10fded1f39..a006ab498e7 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1374,14 +1374,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } =20 -static inline void gen_vfp_neg(int dp) -{ - if (dp) - gen_helper_vfp_negd(cpu_F0d, cpu_F0d); - else - gen_helper_vfp_negs(cpu_F0s, cpu_F0s); -} - #define VFP_GEN_ITOF(name) \ static inline void gen_vfp_##name(int dp, int neon) \ { \ @@ -4189,8 +4181,7 @@ static int neon_2rm_is_float_op(int op) * what we are asking here is "does the code for this case in * the Neon for-each-pass loop use cpu_F0s?". */ - return (op =3D=3D NEON_2RM_VNEG_F || - (op >=3D NEON_2RM_VRINTN && op <=3D NEON_2RM_VRINTZ) || + return ((op >=3D NEON_2RM_VRINTN && op <=3D NEON_2RM_VRINTZ) || op =3D=3D NEON_2RM_VRINTM || (op >=3D NEON_2RM_VRINTP && op <=3D NEON_2RM_VCVTMS) || op >=3D NEON_2RM_VRECPE_F); @@ -6761,7 +6752,7 @@ static int disas_neon_data_insn(DisasContext *s, uint= 32_t insn) gen_helper_vfp_abss(tmp, tmp); break; case NEON_2RM_VNEG_F: - gen_vfp_neg(0); + gen_helper_vfp_negs(tmp, tmp); break; case NEON_2RM_VSWP: tmp2 =3D neon_load_reg(rd, pass); --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451498; cv=none; d=zoho.com; s=zohoarc; b=acRSOCnNkq6XPIHnCIr4pcTzdepo1AtHD3PBtzuhWmU6kS5j8tulWl06Exfbwpr5h2wayZ9+yjcdDw19Ds11bwouK2sFLHkN//19oYbefab+dfmGLGeMYe7KIQ2X07OJvpqn33KNiYt4l9ePd0rLh6tIW66BdU3a9Oc87pQeNC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451498; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=/Qc/nXAc+oP8/OzVscPUxXsnQcb6vVHyqhqGzT5AlQo=; b=m76SeaCtVIo02z9gBi072wXyQzUnd3HhFMcS3c0kGeE/pQoceKQ5mcV+X19qDQFGsOvvZSFi1iWkSlcfIUJx2HQGGqIKQA3hmdKbnKzbhLiutnQ0jigOceaLgrZ1KovxIrl+EFhiVUfL3E7ZGD27aUb63ZPs0ZyIWDNNl852Qoo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560451498851788.2346164444007; Thu, 13 Jun 2019 11:44:58 -0700 (PDT) Received: from localhost ([::1]:43660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUiU-0007dl-SD for importer@patchew.org; Thu, 13 Jun 2019 14:44:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53652) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlD-0003tp-7i for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSl8-0002o6-0G for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:32 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:37698) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSl3-0002CR-JS for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:28 -0400 Received: by mail-wr1-x443.google.com with SMTP id v14so21495324wrr.4 for ; Thu, 13 Jun 2019 09:39:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:24 -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=/Qc/nXAc+oP8/OzVscPUxXsnQcb6vVHyqhqGzT5AlQo=; b=qewI2yiuf7OxI47ViAwCrSL6vlIUMlPRphHa+CD58aPei488RRc5XnoXgsvr5q2uMY nriXpz3ZEuc/W+P5R3mhNcJOzkTFnGRlCRHHGyvOrfg7EH5XCkdlByQyhR4O0iy2dO/I Q6TF1HFG3pmKl+/tv8EokOXWkofRuOWGqey6NueS5gRUZS4iKjPVisxoASmv84ux87zG 5V1PqmXJ/nsrpcldoA8D31WtogZ5vAg3rnmLOZQ44vFDYHWei0y19qRJiL4gFo0f0uLr PdbRqERjnHlNHbO/5SN4q0DKfpntXlZtcBiAkqzIR6SNw9sloKpsWPwRJo5TBth7b8CI BoVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/Qc/nXAc+oP8/OzVscPUxXsnQcb6vVHyqhqGzT5AlQo=; b=YyyW5abrK5f9GfdsGMIYqJdeyF5r3jV23Ys5o9XZeoqfeiUUKjxOIbxUnTAZWPzBZ8 C2L+W4ewET3JMoSxz2jsc4FLlWo/9zil9LwkFRYL5y9n5LzdOGXSSNU6Avx//VV0Hehj Dqe+bS6EMdb6NyCKJmeEnEeyFHz1TfvVT6rNTccRUBkFuTXdQw27pFJ6BFU6xzwn4BV7 aNwmOVZ0oSsETu9ywIzDY2MOscGVqS7L6vQtcuf1bOxVxzybU2GvdnPqqwAC4pCsPEvA 14rSb56zBXlQCmNuYgkOXGlGZnVCVKDg1UFZWZ8to23sR2AbGUbiJIVh1llw3pabLyKk +3Eg== X-Gm-Message-State: APjAAAUxg0HZLBTBi82kVKdr4kzPK9udVl5XyC43nd0Jfi210DuRYdIo wgQJD5P9aosg4qo1anfwwGoMuQ== X-Google-Smtp-Source: APXvYqwWRhNnvZ2XzcGrbqSyIQV9EqVGDfM2SDl1uIWHMKv3hC2BFqhihgwZM5EUoFPhXuHvio43lw== X-Received: by 2002:adf:e9cc:: with SMTP id l12mr13445032wrn.29.1560443964614; Thu, 13 Jun 2019 09:39:24 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:10 +0100 Message-Id: <20190613163917.28589-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH 05/12] target/arm: Stop using cpu_F0s for NEON_2RM_VRINT* 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Switch NEON_2RM_VRINT* away from using cpu_F0s. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index a006ab498e7..243dbee8357 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4181,9 +4181,7 @@ static int neon_2rm_is_float_op(int op) * what we are asking here is "does the code for this case in * the Neon for-each-pass loop use cpu_F0s?". */ - return ((op >=3D NEON_2RM_VRINTN && op <=3D NEON_2RM_VRINTZ) || - op =3D=3D NEON_2RM_VRINTM || - (op >=3D NEON_2RM_VRINTP && op <=3D NEON_2RM_VCVTMS) || + return ((op >=3D NEON_2RM_VCVTAU && op <=3D NEON_2RM_VCVTMS) || op >=3D NEON_2RM_VRECPE_F); } =20 @@ -6786,7 +6784,7 @@ static int disas_neon_data_insn(DisasContext *s, uint= 32_t insn) tcg_rmode =3D tcg_const_i32(arm_rmode_to_sf(rm= ode)); gen_helper_set_neon_rmode(tcg_rmode, tcg_rmode, cpu_env); - gen_helper_rints(cpu_F0s, cpu_F0s, fpstatus); + gen_helper_rints(tmp, tmp, fpstatus); gen_helper_set_neon_rmode(tcg_rmode, tcg_rmode, cpu_env); tcg_temp_free_ptr(fpstatus); @@ -6796,7 +6794,7 @@ static int disas_neon_data_insn(DisasContext *s, uint= 32_t insn) case NEON_2RM_VRINTX: { TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); - gen_helper_rints_exact(cpu_F0s, cpu_F0s, fpsta= tus); + gen_helper_rints_exact(tmp, tmp, fpstatus); tcg_temp_free_ptr(fpstatus); break; } --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451787; cv=none; d=zoho.com; s=zohoarc; b=apjwOaJkyyPuCBa9ppR8+mKquPLL6zGs/rRYbDaAPXfm29DtQHH/9a6KBnACwLbyKP5ao0BlOVr5PgpUjUyq6wKxnqaIXlLJZrKuRN4tjcr9jOVmffjSL/ywjA9eWPdKw3yof5pxLKbshuaptRJ/cfyv3sHXm+LBX9tqknmglic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451787; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=rimcTwT3jseYgOecETEoK3gV+MP4oaaAWnNA90CS1sc=; b=FnzJyV3KIcPrahOhBHAykE7NXQonsn5gg6SUB9hnqIsKksMHQm8vJr3FXvI8iIp3xgq4I3GSPFTPkRSJZovU8r8jO53VdV3KTzXQ9QY4LIQzFN3QtyA7flh4rCPvSnCRy8tE0kVYNPWZVUl3c+PYMYNZ8hIdLe2/O9/AXxwsaQw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 156045178781424.5962666558745; Thu, 13 Jun 2019 11:49:47 -0700 (PDT) Received: from localhost ([::1]:43784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUn9-0002QB-Nb for importer@patchew.org; Thu, 13 Jun 2019 14:49:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53848) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlK-00049x-PM for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlG-0003OS-IX for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:42 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:45093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlG-0002Nk-0M for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:38 -0400 Received: by mail-wr1-x441.google.com with SMTP id f9so21465419wre.12 for ; Thu, 13 Jun 2019 09:39:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:25 -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=rimcTwT3jseYgOecETEoK3gV+MP4oaaAWnNA90CS1sc=; b=WUC/NR/reoeIEelJq/6TVn2rSH/Q5u9ChWO0s5e5z2VaAs/2A6a5/RRqKidEVi6T8J EeG6g1KJ3Ynlg5Cms0UYtrCGGGMty1ukQmn9FxJW6qv+RJ5vD1xcNLMPmdrHMYNjwloG e9wO83nv4MVf45s3I6/kEt8WTSY1kCjuuYWRNtn1qjUlRujjhE3Vdk0AVRwiuDQqC9gU kz8CWoLZdOY4Je9mwOORyOViqWL4xuGhLqoU5zXu2p51MJ84KWzY86jVieZJhliATfCx ZdpKJaue3OMzZ1X0eHS+8UAD8La9ESQQKAP5HbYtIuKrosQrkCbWEsOl7qZGgLDroTg7 XeEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rimcTwT3jseYgOecETEoK3gV+MP4oaaAWnNA90CS1sc=; b=A+qcaLeNkRE6uXU0OPrxh49TtSrXkF69GndC9JA5qKI4V7Yt2lmEM+ySN9ZzAgy604 Ye00uEYfTdDK0MfzAZeqOQHUb1XkmPdBsji9Iw31bFnEMSd1Tnqk4yZdKxrJ5rvQbBZc FtGcZY5ZAngNPVDIM83s+TJgzR47pj3N/XStTc0ew+6l0kbiJZS3tfl06EpReW3Px3wE wfj5aXMkBAHCuR6JjR5BCK0cK/PaeGNCFlogVpkTlqW+W3KEPaTJ+T1sd3jvId+8sj5g FQNTPYPhghP5mIpwWkYtoC5IgnKdkthENJ/6eOwVbl48smhSHiN2kOiDyyLZ1Wl/ZRkg HmJQ== X-Gm-Message-State: APjAAAUUnoaCE515yOKfCWoMxoIjWyHuQHgjbwywbxlLjAIEiQ3H+EXK xA/K4Ly8hxyoOUe/vdXyfLcg/g== X-Google-Smtp-Source: APXvYqxtdgJyxLVeVzRUIfr+SqBYq0C2qNduSAdG/izCG59yDPc2rp3Wkia+Bo0dYNKPbLshAZkIJg== X-Received: by 2002:adf:e9c3:: with SMTP id l3mr37413931wrn.148.1560443965631; Thu, 13 Jun 2019 09:39:25 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:11 +0100 Message-Id: <20190613163917.28589-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH 06/12] target/arm: Stop using cpu_F0s for NEON_2RM_VCVT[ANPM][US] 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Stop using cpu_F0s for the NEON_2RM_VCVT[ANPM][US] ops. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 243dbee8357..124045a9ef6 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4181,8 +4181,7 @@ static int neon_2rm_is_float_op(int op) * what we are asking here is "does the code for this case in * the Neon for-each-pass loop use cpu_F0s?". */ - return ((op >=3D NEON_2RM_VCVTAU && op <=3D NEON_2RM_VCVTMS) || - op >=3D NEON_2RM_VRECPE_F); + return op >=3D NEON_2RM_VRECPE_F; } =20 static bool neon_2rm_is_v8_op(int op) @@ -6818,10 +6817,10 @@ static int disas_neon_data_insn(DisasContext *s, ui= nt32_t insn) cpu_env); =20 if (is_signed) { - gen_helper_vfp_tosls(cpu_F0s, cpu_F0s, + gen_helper_vfp_tosls(tmp, tmp, tcg_shift, fpst); } else { - gen_helper_vfp_touls(cpu_F0s, cpu_F0s, + gen_helper_vfp_touls(tmp, tmp, tcg_shift, fpst); } =20 --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451378; cv=none; d=zoho.com; s=zohoarc; b=EcTlzKYOY1SXf7W7zPZ1rskhkMHv2WcBc2c1oeVACQUdLThCRWRileUJtxku2/KdDgH0TuaGJYH8bKscT94/Gd0dgCpWz2y7vKd1VPlD+eszSvZyCybTkxoCBawI9kvk+kCBFF2goMfAcFaZ+6DIssEVRyJNVKX4O3VnJo0tvSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451378; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=m4A8CkEbvWMmQVuN+nzRQmfo8pG9vjNNLIpgsnrjjCE=; b=e3m4K48+wXlUzeMxBLaVMT6Pogkkc/WqFASj+z9Hubk7PZfYCxbUbEzbSZEV2q7KX1JaIvPfDCXD8AUMnRjphOMDMrEBtCW1hg1f4yLtWNUkdh6Z78n7e3HtgjP4k+s1ZbfM+UXnLK0rIj8undL+sKCqQo7MGgS3q/aiOWfpGjk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 15604513781541.2548746199879588; Thu, 13 Jun 2019 11:42:58 -0700 (PDT) Received: from localhost ([::1]:43600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUgZ-0005il-2n for importer@patchew.org; Thu, 13 Jun 2019 14:42:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53768) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlI-00042v-Hd for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlF-0003JL-6R for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:40 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37697) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlD-0002Tk-6Q for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:36 -0400 Received: by mail-wr1-x441.google.com with SMTP id v14so21495436wrr.4 for ; Thu, 13 Jun 2019 09:39:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:26 -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=m4A8CkEbvWMmQVuN+nzRQmfo8pG9vjNNLIpgsnrjjCE=; b=Rze6OFIpxfV9Ip+R9pQrienaQuKkDljMUJrRsyXJdxi5paKGRxOQ6m1gxUOPuD7vgG V6Lhs/eJjYMwGNyq/jeJ+n+6704S9IshlaZFdy077cc0fAmzwEhJiBXDjVU5git2AeIL rNpjc4Bg5WWBPl+PEYHvAWn5YyO3JUylapDrytHxuFlweT6dzybXloOB19W+WP87rHy3 QNgwXxF1wKLlAMv3QiBbtZqDTNTqkxSS5xagkHZsI8g6CsSMGACoawYVr9w9zLInqXLj nR4hMI4ZZt7/9HInJxMTP95rUIflNk9iV5ZeW1HRICVLM1BLTrIV654ZfovF9F921SYR vgWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m4A8CkEbvWMmQVuN+nzRQmfo8pG9vjNNLIpgsnrjjCE=; b=S1RQjM87hYnem+WOT6IWOsmADTXlLMq31HOysBrbLJV1OTJEieQfXL9csX/jPLE23y HnDjFDJnij/BWIR35yfkWlM0I+8gVmPRYiZiFlTNOpwuI2ScjQXlx8YQF+53ek+WylMq EbTCb3CT6QrTQSq96/y54S+qMbmDvKAYopfk7dcqnX27aIIzkszrGfOHSK/ohPnq05Eg pu10Ow5TVD3wda8RMBi/4o1LlpnAqQ+rK5CkijM23bSIZu+qaG8v7M0C2b1GtrW0n9Hj gMdMbnjr1fXwqiuQM6zOfgeImQmVDKofmBcRq/jL/FR2PvBqxU//6S7OampYyZ+8tUE/ eYWQ== X-Gm-Message-State: APjAAAVe86oXKjO53HCOThmIlF0nelawdTOPjitQP4PH1VsNoiaMum3U e5mU+d5LlP9lFYlLyzmw19GaIf8YteOouQ== X-Google-Smtp-Source: APXvYqwYsTTXcVlDcisz0zFCsGXj1XIKEmRHnwwDQ86bg8jZmpVu7XVgmGkxKhVbu73Zwi9B2Qgb6g== X-Received: by 2002:adf:ea8b:: with SMTP id s11mr16095740wrm.100.1560443966690; Thu, 13 Jun 2019 09:39:26 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:12 +0100 Message-Id: <20190613163917.28589-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH 07/12] target/arm: Stop using cpu_F0s for NEON_2RM_VRECPE_F and NEON_2RM_VRSQRTE_F 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Stop using cpu_F0s for NEON_2RM_VRECPE_F and NEON_2RM_VRSQRTE_F. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 124045a9ef6..75ed7cc7cb0 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4181,7 +4181,7 @@ static int neon_2rm_is_float_op(int op) * what we are asking here is "does the code for this case in * the Neon for-each-pass loop use cpu_F0s?". */ - return op >=3D NEON_2RM_VRECPE_F; + return op >=3D NEON_2RM_VCVT_FS; } =20 static bool neon_2rm_is_v8_op(int op) @@ -6848,14 +6848,14 @@ static int disas_neon_data_insn(DisasContext *s, ui= nt32_t insn) case NEON_2RM_VRECPE_F: { TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); - gen_helper_recpe_f32(cpu_F0s, cpu_F0s, fpstatu= s); + gen_helper_recpe_f32(tmp, tmp, fpstatus); tcg_temp_free_ptr(fpstatus); break; } case NEON_2RM_VRSQRTE_F: { TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); - gen_helper_rsqrte_f32(cpu_F0s, cpu_F0s, fpstat= us); + gen_helper_rsqrte_f32(tmp, tmp, fpstatus); tcg_temp_free_ptr(fpstatus); break; } --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560446762; cv=none; d=zoho.com; s=zohoarc; b=HeVflmygTWOVqb3MXqgwge88g0AxC8IkJdOcxFhv5QOV2ZfxrKGasZxsDqosjkPQ6SDESkstbwt6dGhWoXAdSCASghi6xmLJchNgK1Jt4XA/MDpaHKPySBrzwfT22ddCQOvwVV39vGs5rsBMHOJ2+o1jGBT1yczWhv19ZQF8uAI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560446762; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=xAUvL5wIPadt+AYk5xwuFzGHjAUkyNHEmTy0Nk+EXUw=; b=LyYi2QM15Q1qgkSTOGNGRYJCQicKZfWFfWS2syr3m9cdf/Foxs5JM5tQMWArxSysIam0fveYRsev9x7YN/nRtLGxqn5wTBsL/FuloZ2YSw4Jfwt0l46xC1R2Ktsy7NG0XG0atzrmbmixFwfvK9TU1bR8qbEo2l4Uw7AQV26EFDU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560446761809405.84367797675316; Thu, 13 Jun 2019 10:26:01 -0700 (PDT) Received: from localhost ([::1]:42276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbTS1-0001XG-Tb for importer@patchew.org; Thu, 13 Jun 2019 13:23:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53849) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlK-0004A6-QT for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlG-0003LN-2a for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:42 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:38898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlF-0002i8-Ik for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:37 -0400 Received: by mail-wm1-x343.google.com with SMTP id s15so10830937wmj.3 for ; Thu, 13 Jun 2019 09:39:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:27 -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=xAUvL5wIPadt+AYk5xwuFzGHjAUkyNHEmTy0Nk+EXUw=; b=ZLswgCKyVPi4QedFsbO6BIUufTPtNYfbttp/XqXR6kFnC1xwd2Ev3XCGqlg6S7ociz 6EPxjqXm7ygq9L9KzDfUpR24S764HSUC7uX/Imxy6eKYnvp6l+277ekYqGKp4DZiyYcF 5d1F5bI6F+8zFJ1Y+RgyXeTVGgc3BZiwafYxsAMCeVR0hGi5EmbeedM7uyy2Fz7WG2nt 1OltkpLNNR8kKmO3zaaTNgzVblVr2BE3d1FfkIiR/G+CTO9JlD4yQiUwX+hCzkhxRw05 rEpi626NR90+D+NPLIc4FWcx5Bpam9VKE6tbrdfadnVgAKcBvjEkSL0QB8gjr39PUhOr NUdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xAUvL5wIPadt+AYk5xwuFzGHjAUkyNHEmTy0Nk+EXUw=; b=WOtw/49MKVs7lN3o+FlTT9kncc4YhSY1IRH6aDuFudGZFeg5Z0PNFgyl3f7WKVXWMs hkJ1+AkvQ03XwHUidlG8Gz9YBChWWuMpHFXPXZfsWnCJzgmd2k3VDzeyJWSsh7PF9qvZ ggBitShaI6olu2ByM69v/JdNTBP9Lr7XBhPWEXPQzs9OrUsBjJYaBBZxcHIO0mUccw+m Ok6xLLqSi0KJADl6Dcs0v5N8wfZTpVxtrQUqICWfVwASzL3wafI6j/sjtGbzACHqbqeR Vx4ZbRw5qAD6D9Vsvn1T5JVzXido145wdibIxJUl0xT92JohB44NYaLzEhay8QPqEbKd sThg== X-Gm-Message-State: APjAAAUoVYd9N1jwaFuWU8mLBOuRXr+uxfKlvAABoQDAdxcP/QVz367B oT3CMCp3CveURKhZqTyqVxPHG2Q9pC7IoQ== X-Google-Smtp-Source: APXvYqwbz91i7c5+fdlC9CwT2OCk8h4Y+EjipLLDJwwIK5gVXwYoFkPLrBuV7KE235g5lOeRBTJr+g== X-Received: by 2002:a1c:e009:: with SMTP id x9mr4445559wmg.5.1560443967753; Thu, 13 Jun 2019 09:39:27 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:13 +0100 Message-Id: <20190613163917.28589-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH 08/12] target/arm: Stop using cpu_F0s for Neon f32/s32 VCVT 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Stop using cpu_F0s for the Neon f32/s32 VCVT operations. Since this is the last user of cpu_F0s in the Neon 2rm-op loop, we can remove the handling code for it too. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 82 ++++++++++++------------------------------ 1 file changed, 22 insertions(+), 60 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 75ed7cc7cb0..0fb94b777bf 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1374,38 +1374,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } =20 -#define VFP_GEN_ITOF(name) \ -static inline void gen_vfp_##name(int dp, int neon) \ -{ \ - TCGv_ptr statusptr =3D get_fpstatus_ptr(neon); \ - if (dp) { \ - gen_helper_vfp_##name##d(cpu_F0d, cpu_F0s, statusptr); \ - } else { \ - gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, statusptr); \ - } \ - tcg_temp_free_ptr(statusptr); \ -} - -VFP_GEN_ITOF(uito) -VFP_GEN_ITOF(sito) -#undef VFP_GEN_ITOF - -#define VFP_GEN_FTOI(name) \ -static inline void gen_vfp_##name(int dp, int neon) \ -{ \ - TCGv_ptr statusptr =3D get_fpstatus_ptr(neon); \ - if (dp) { \ - gen_helper_vfp_##name##d(cpu_F0s, cpu_F0d, statusptr); \ - } else { \ - gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, statusptr); \ - } \ - tcg_temp_free_ptr(statusptr); \ -} - -VFP_GEN_FTOI(touiz) -VFP_GEN_FTOI(tosiz) -#undef VFP_GEN_FTOI - #define VFP_GEN_FIX(name, round) \ static inline void gen_vfp_##name(int dp, int shift, int neon) \ { \ @@ -4173,17 +4141,6 @@ static const uint8_t neon_3r_sizes[] =3D { #define NEON_2RM_VCVT_SF 62 #define NEON_2RM_VCVT_UF 63 =20 -static int neon_2rm_is_float_op(int op) -{ - /* - * Return true if this neon 2reg-misc op is float-to-float. - * This is not a property of the operation but of our code -- - * what we are asking here is "does the code for this case in - * the Neon for-each-pass loop use cpu_F0s?". - */ - return op >=3D NEON_2RM_VCVT_FS; -} - static bool neon_2rm_is_v8_op(int op) { /* Return true if this neon 2reg-misc op is ARMv8 and up */ @@ -6599,13 +6556,7 @@ static int disas_neon_data_insn(DisasContext *s, uin= t32_t insn) default: elementwise: for (pass =3D 0; pass < (q ? 4 : 2); pass++) { - if (neon_2rm_is_float_op(op)) { - tcg_gen_ld_f32(cpu_F0s, cpu_env, - neon_reg_offset(rm, pass)); - tmp =3D NULL; - } else { - tmp =3D neon_load_reg(rm, pass); - } + tmp =3D neon_load_reg(rm, pass); switch (op) { case NEON_2RM_VREV32: switch (size) { @@ -6860,29 +6811,40 @@ static int disas_neon_data_insn(DisasContext *s, ui= nt32_t insn) break; } case NEON_2RM_VCVT_FS: /* VCVT.F32.S32 */ - gen_vfp_sito(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_sitos(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } case NEON_2RM_VCVT_FU: /* VCVT.F32.U32 */ - gen_vfp_uito(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_uitos(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } case NEON_2RM_VCVT_SF: /* VCVT.S32.F32 */ - gen_vfp_tosiz(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_tosizs(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } case NEON_2RM_VCVT_UF: /* VCVT.U32.F32 */ - gen_vfp_touiz(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_touizs(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } default: /* Reserved op values were caught by the * neon_2rm_sizes[] check earlier. */ abort(); } - if (neon_2rm_is_float_op(op)) { - tcg_gen_st_f32(cpu_F0s, cpu_env, - neon_reg_offset(rd, pass)); - } else { - neon_store_reg(rd, pass, tmp); - } + neon_store_reg(rd, pass, tmp); } break; } --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451600; cv=none; d=zoho.com; s=zohoarc; b=eqb/KIWIFutQXVKN1jfNh+OADNU3AQeej2WhT3tjMdWQt28YRKqXJAWGFPoD8jL5S7dWz7fGxtjhhrAJgnYlTj3mQd77hf3LRqtI/etgTK+F+UlvHELoF7FNmB9A355KbYxVOna9O74EmgNLZqn1h1h/PW6mivJZICZG6JpSHN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451600; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=XGJE4iIoyDN2tN+sycnvDF5WRUBy3je+PRFryiYL8bY=; b=gETZB5Dl23CgYZMftWo8AnK0yo1rjECtHbk55789ZXrJVhOINhiDwKDeDt+kqp7+Z8LaIct9Pfg2VQf5lTJ2fLsHufIPL2o0TaBb0gatXSRgqK+dXyGb/5Ew9tkYYERTEI2C2rBwiiwgkxsuCVvVl/PTOJ/pSYTQv4ziHdHei5c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560451600645469.75385305412374; Thu, 13 Jun 2019 11:46:40 -0700 (PDT) Received: from localhost ([::1]:43764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUk6-0000E5-JC for importer@patchew.org; Thu, 13 Jun 2019 14:46:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53750) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlH-000404-C3 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlF-0003Jz-DE for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:39 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:34581) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlF-0002nU-3L for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:37 -0400 Received: by mail-wm1-x343.google.com with SMTP id w9so7014363wmd.1 for ; Thu, 13 Jun 2019 09:39:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:28 -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=XGJE4iIoyDN2tN+sycnvDF5WRUBy3je+PRFryiYL8bY=; b=JyIH9wNgMCaCsjeNgXKXY6qO5YVaQsxfCRq0Ywi0BSCT4kPClEVph/yDc0l4vbePjD KBLFUSxRcJW3oFamFyvvs9LXbLghG4W2IvuEL4fesDZl/AW2mzUSZiooBcZH4O+eObdu 94HBQMEV3zPqzP2q3Az4MgXfnPi8VdX0L7oQ9kpQgMD59HbSgqFKCNkpLnguCy0xdFwo LqUGE+YMDNyy+2QCH89IhecqB+EyHiCUWzJ+ABMOVyXO3ORupTzqUYUdPZBRGMg0IPPr wYtqh0K2iDNob6wTQ7vU15nf5IlXpgFaTMLYZsahJHRqOozsAqRVrcBxXm2FYJ+ZftHU ftBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XGJE4iIoyDN2tN+sycnvDF5WRUBy3je+PRFryiYL8bY=; b=WK2yeol/cWgIfwyRMdGhdNDMkQsDxftSrfvXozyWRNAKIXOzB6h8ktvPLuHOACtynk Tpd7DJ/QMsQOOmuTErU7pEeOsouJn1jZFOAO1K3ET8xcQix0Z5YOzwBg7DYu0IEZ8BVB I75IKPXHeUN3+SbgW1j/rpL7QYqUQks66MxDMfgtTSTz5Yv9XcJosxVVrBeRcQnpNZkG A2r+It3NhI2INeLjrIpmUIiOA84GQHKu5ZqrNa8Y6XczZT34W48QpjGpPt7fLUR6dKy1 zrHRBtCJemUQdhNPKyi4L/Nn4wgGxWmVrAcYs849ufo0+vnmxSPFUoqwX3M+I2CN+r/H pLiw== X-Gm-Message-State: APjAAAU3z3RwVKN+/wksRcIunNdvgN8woweqbPl6UP3Zd13U8o1fHqOB VliF6/qaVxhWc4YCM8U1WKyo2A== X-Google-Smtp-Source: APXvYqzFqv5g4TK37epAS+rO3iVECjyRj5ICcyTxN7hSkrzDixkhiJTFTIEU0q0WZY9850KymmY1Ew== X-Received: by 2002:a1c:7d4e:: with SMTP id y75mr4518552wmc.169.1560443968944; Thu, 13 Jun 2019 09:39:28 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:14 +0100 Message-Id: <20190613163917.28589-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH 09/12] target/arm: Stop using cpu_F0s in Neon VCVT fixed-point ops 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Stop using cpu_F0s in the Neon VCVT fixed-point operations. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 62 +++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 0fb94b777bf..d8b46130d42 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -80,6 +80,8 @@ static const char * const regnames[] =3D /* Function prototypes for gen_ functions calling Neon helpers. */ typedef void NeonGenThreeOpEnvFn(TCGv_i32, TCGv_env, TCGv_i32, TCGv_i32, TCGv_i32); +/* Function prototypes for gen_ functions for fix point conversions */ +typedef void VFPGenFixPointFn(TCGv_i32, TCGv_i32, TCGv_i32, TCGv_ptr); =20 /* initialize TCG globals. */ void arm_translate_init(void) @@ -1374,27 +1376,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } =20 -#define VFP_GEN_FIX(name, round) \ -static inline void gen_vfp_##name(int dp, int shift, int neon) \ -{ \ - TCGv_i32 tmp_shift =3D tcg_const_i32(shift); \ - TCGv_ptr statusptr =3D get_fpstatus_ptr(neon); \ - if (dp) { \ - gen_helper_vfp_##name##d##round(cpu_F0d, cpu_F0d, tmp_shift, \ - statusptr); \ - } else { \ - gen_helper_vfp_##name##s##round(cpu_F0s, cpu_F0s, tmp_shift, \ - statusptr); \ - } \ - tcg_temp_free_i32(tmp_shift); \ - tcg_temp_free_ptr(statusptr); \ -} -VFP_GEN_FIX(tosl, _round_to_zero) -VFP_GEN_FIX(toul, _round_to_zero) -VFP_GEN_FIX(slto, ) -VFP_GEN_FIX(ulto, ) -#undef VFP_GEN_FIX - static inline long vfp_reg_offset(bool dp, unsigned reg) { if (dp) { @@ -5721,28 +5702,41 @@ static int disas_neon_data_insn(DisasContext *s, ui= nt32_t insn) } } else if (op >=3D 14) { /* VCVT fixed-point. */ + TCGv_ptr fpst; + TCGv_i32 shiftv; + VFPGenFixPointFn *fn; + if (!(insn & (1 << 21)) || (q && ((rd | rm) & 1))) { return 1; } + + if (!(op & 1)) { + if (u) { + fn =3D gen_helper_vfp_ultos; + } else { + fn =3D gen_helper_vfp_sltos; + } + } else { + if (u) { + fn =3D gen_helper_vfp_touls_round_to_zero; + } else { + fn =3D gen_helper_vfp_tosls_round_to_zero; + } + } + /* We have already masked out the must-be-1 top bit of imm= 6, * hence this 32-shift where the ARM ARM has 64-imm6. */ shift =3D 32 - shift; + fpst =3D get_fpstatus_ptr(1); + shiftv =3D tcg_const_i32(shift); for (pass =3D 0; pass < (q ? 4 : 2); pass++) { - tcg_gen_ld_f32(cpu_F0s, cpu_env, neon_reg_offset(rm, p= ass)); - if (!(op & 1)) { - if (u) - gen_vfp_ulto(0, shift, 1); - else - gen_vfp_slto(0, shift, 1); - } else { - if (u) - gen_vfp_toul(0, shift, 1); - else - gen_vfp_tosl(0, shift, 1); - } - tcg_gen_st_f32(cpu_F0s, cpu_env, neon_reg_offset(rd, p= ass)); + TCGv_i32 tmpf =3D neon_load_reg(rm, pass); + fn(tmpf, tmpf, shiftv, fpst); + neon_store_reg(rd, pass, tmpf); } + tcg_temp_free_ptr(fpst); + tcg_temp_free_i32(shiftv); } else { return 1; } --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560452054; cv=none; d=zoho.com; s=zohoarc; b=Ko8hAX2okWaY7cS2Yf4L8hvsPSvYJy3kAi/ksGjZ69qr/NWJhknB4wuP+F1dzok4WMGc0eh0jlRJWzqWoQ/I5/U/DW08q1A/fPRTlGZaYNVCQrAgxb7BN9vn0zUL9/Zo9qUnCr6ptgT3rL93Jvs2BJC9r3uQGQCPgiRuW5cqGbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560452054; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=XS2MzO+cZz80eCqH3YLxLgykyR6csa7kzG0bgwV0MQs=; b=YHrCMX/URcpu+Dnxbw/0THeAAh5jgv1j6F4igQqzy0Vo/J1FarYxKQMqxVoNyYElWswRl87wEk4zsz3QeJSCwpo6DZS20ujbGplC9zqkwxQEUCTmD6mRsih71qCyfzoUzUAiQr5Mqr9tMGIhxjdJ627fnjJiBXqUxC5f74crsrc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560452054149938.0807413066951; Thu, 13 Jun 2019 11:54:14 -0700 (PDT) Received: from localhost ([::1]:43884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUrO-0007qj-Ey for importer@patchew.org; Thu, 13 Jun 2019 14:54:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53864) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlL-0004BM-CI for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlH-0003S8-6K for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:43 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:33779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlG-0002oK-JW for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:38 -0400 Received: by mail-wm1-x344.google.com with SMTP id h19so7008315wme.0 for ; Thu, 13 Jun 2019 09:39:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:29 -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=XS2MzO+cZz80eCqH3YLxLgykyR6csa7kzG0bgwV0MQs=; b=jDC2C3ucnpWxPg+WaSc54V269pFuNFIb5O964icnyjuTfv99fMovYHHGeOhZBOS83m XzJlsSCudwGb9zoTssiR6OCjK/ncKGIlw85odhbwrhbY549dsASdGmcv0uMu/FAuvdNu t6bgHxzUgjaZIXdIvdSSTUHuduxnV7K2q6h8Jc2H+hIJSeTGTZ9/DGPGJ98RM87ZaVhm drjymb3HhWo3As6kq7Lz+zNLT35gYLASdWUoK6RsoPKhyaOcZ3d3p7l/Dx3b89Nk0iMv eLg3Q8GbOI2AHbYW4Zt71LbLUMwFxZRReSoMBURpmwzuXVffxUhAg/MUwaajb5lyWppY Y7WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XS2MzO+cZz80eCqH3YLxLgykyR6csa7kzG0bgwV0MQs=; b=qUJUua1UoQz3fDTlP4akYw6X8HL46SzGJxMwz1ePFp5cHUxDF39mL1lNLvDCbm/Srz KU5Q4+p500ZRg3tk4dTWhV5aHrQOrIXPwnEo4lfo3gwJaZLdBiJCtqZiAHg08zHtNkPN 7UK6EnmRZSOcp7FVNOMXXbnyVmt6DNQV+WZVPSMrjYLCU/KoxEdFuOeue81lz+/RvNkS Z3zFP6K8zQonh6pF53OByzfK6D/xFog116QHCVT6af9lPGKxNIlj+3CkTLhDWyCauP6s Ochd1W0buStbzTSv4afMRde1cuct6uPXJsia5UwNg8EszUoG4bMIORJqd6Qd4m7yzV9J WNxQ== X-Gm-Message-State: APjAAAVspoc/NrwUtGeqoUm5vjvZFpWFxPLexHA0WGEemoCUXzFP68oV +TmyiI6nlheYqSarOcv26a8ey5fPfX11Mw== X-Google-Smtp-Source: APXvYqx4Ru4SKe7Zh+MV4lNYvP/AFw1gFyiMBU+Z5gcpnSHkszSLFyn+mMAGKarscMqJZKV0AFTAtg== X-Received: by 2002:a1c:9a05:: with SMTP id c5mr4245105wme.36.1560443970002; Thu, 13 Jun 2019 09:39:30 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:15 +0100 Message-Id: <20190613163917.28589-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH 10/12] target/arm: stop using deprecated functions in NEON_2RM_VCVT_F16_F32 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Remove some old constructs from NEON_2RM_VCVT_F16_F32 code: * don't use cpu_F0s * don't use tcg_gen_ld_f32 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index d8b46130d42..2ba620ac1e1 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1542,7 +1542,6 @@ static TCGv_ptr vfp_reg_ptr(bool dp, int reg) return ret; } =20 -#define tcg_gen_ld_f32 tcg_gen_ld_i32 #define tcg_gen_st_f32 tcg_gen_st_i32 =20 #define ARM_CP_RW_BIT (1 << 20) @@ -6425,25 +6424,23 @@ static int disas_neon_data_insn(DisasContext *s, ui= nt32_t insn) q || (rm & 1)) { return 1; } - tmp =3D tcg_temp_new_i32(); - tmp2 =3D tcg_temp_new_i32(); fpst =3D get_fpstatus_ptr(true); ahp =3D get_ahp_flag(); - tcg_gen_ld_f32(cpu_F0s, cpu_env, neon_reg_offset(rm, 0= )); - gen_helper_vfp_fcvt_f32_to_f16(tmp, cpu_F0s, fpst, ahp= ); - tcg_gen_ld_f32(cpu_F0s, cpu_env, neon_reg_offset(rm, 1= )); - gen_helper_vfp_fcvt_f32_to_f16(tmp2, cpu_F0s, fpst, ah= p); + tmp =3D neon_load_reg(rm, 0); + gen_helper_vfp_fcvt_f32_to_f16(tmp, tmp, fpst, ahp); + tmp2 =3D neon_load_reg(rm, 1); + gen_helper_vfp_fcvt_f32_to_f16(tmp2, tmp2, fpst, ahp); tcg_gen_shli_i32(tmp2, tmp2, 16); tcg_gen_or_i32(tmp2, tmp2, tmp); - tcg_gen_ld_f32(cpu_F0s, cpu_env, neon_reg_offset(rm, 2= )); - gen_helper_vfp_fcvt_f32_to_f16(tmp, cpu_F0s, fpst, ahp= ); - tcg_gen_ld_f32(cpu_F0s, cpu_env, neon_reg_offset(rm, 3= )); + tcg_temp_free_i32(tmp); + tmp =3D neon_load_reg(rm, 2); + gen_helper_vfp_fcvt_f32_to_f16(tmp, tmp, fpst, ahp); + tmp3 =3D neon_load_reg(rm, 3); neon_store_reg(rd, 0, tmp2); - tmp2 =3D tcg_temp_new_i32(); - gen_helper_vfp_fcvt_f32_to_f16(tmp2, cpu_F0s, fpst, ah= p); - tcg_gen_shli_i32(tmp2, tmp2, 16); - tcg_gen_or_i32(tmp2, tmp2, tmp); - neon_store_reg(rd, 1, tmp2); + gen_helper_vfp_fcvt_f32_to_f16(tmp3, tmp3, fpst, ahp); + tcg_gen_shli_i32(tmp3, tmp3, 16); + tcg_gen_or_i32(tmp3, tmp3, tmp); + neon_store_reg(rd, 1, tmp3); tcg_temp_free_i32(tmp); tcg_temp_free_i32(ahp); tcg_temp_free_ptr(fpst); --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560452146; cv=none; d=zoho.com; s=zohoarc; b=n4lnX8S7DiUiEoujXPjk/9hRjiwUEhX1lbQHGWBgFyN7JPZSk14Jac/Ol7J7+ufURzmSPUGOYukinBG0uIIEKSDugg5ZDMFRZM8aEcNVSszHWCgBG30QJN1bffjCgzqR3yFm8LEbjC23W9CvCggrDPc6gwvqJ+FhCGN/fal5Df0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560452146; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=GypQohw7qsarAznVOv5kE9/Dbn/Co/pX/VNOWPFpp1I=; b=Jb5zj1u71Y8ZrrG3NOBF2NHu8sdSuegTw9zfbJcr+5CnHgyRiI51oQw1VM0F3nRgEgcGiCvSBCRRWrxHDxU4BxYsOBneD1H3DB8n58C4vZbEeyo4YCTkd97UTBVQu9c6xIYSQNbcMIS8aDVcNxGCOE2LL7mrod0Pa/stVTAc7E4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 15604521465268.789992714282107; Thu, 13 Jun 2019 11:55:46 -0700 (PDT) Received: from localhost ([::1]:43890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUsw-0000P8-JX for importer@patchew.org; Thu, 13 Jun 2019 14:55:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53861) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlL-0004Ao-3N for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlG-0003R1-Ub for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:42 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:54955) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlG-0002th-EU for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:38 -0400 Received: by mail-wm1-x343.google.com with SMTP id g135so10907184wme.4 for ; Thu, 13 Jun 2019 09:39:31 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:30 -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=GypQohw7qsarAznVOv5kE9/Dbn/Co/pX/VNOWPFpp1I=; b=sGwPa0qYAx8A3PpngQfWVGz9mpF2j5DJeqqZlaQDceXHmUrCWs0Ze3fU1qmS9l4n7A kTFM/1NN6L0MtjIZxLFsRUYS1gb/TAOD2dsFDVvtxO2JGHGZiHgooKrpO7aYgq8migQG 9lG45rv8vDoHxr0JukA5MD9vXd4VrEQ+uYbgNdbRpdIlpKGD/6Bey1hpkh6NQ/Sak+Vh UFawEztJLs1YtlAYeypyjcUTFqBCLkPPx4llNvaIxLPhXYpVhoYkFvta/BYbjTD8SxmG 4+zGkIGtrOPnSDIT/J/P+JdRGQWi76EmOk8rzwf0IqUy8VFh2yY78zTV/4mgSLZtAkXA fZZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GypQohw7qsarAznVOv5kE9/Dbn/Co/pX/VNOWPFpp1I=; b=rYQ6L+alloObqBb0ckJqg6KPwXaosWkJTXoE6PmE4JoiejulbZ2wPKh/wOw/0SPth9 RbG8rbKQRYbT5SL7I6LXYHEX1Vu9xzGZaq4aOHgaSyIS4cgIfHrg7lIOdZnqsOThbcAe 1Xr7kYjDpLfKZbVFo7XGSmHJ48QLJ7wJPI/eQ2Cq/2ibLeQbktCSVTXApBruOusfIpaO SGUavEy7O6x1pMVQsdXK9Gq/gmEyLJAnnPKyG4hQ/t16Wow9wUrYnJwpN4FkJ6wcdk1Q mM18N9Y48xWaA5EL/U+eMXA4kXroxwM35m7z0ccpoya5tlYiznSaQ9DOW3RLQnZ6wA9C bVgA== X-Gm-Message-State: APjAAAUzyZoEF5n6rFRzQdU8W0JlJjZNuFnZLknIcL5fP7oC2lz2kile Slyf/oZsHWKqP5MLWJcRr9YZow== X-Google-Smtp-Source: APXvYqz3ugYljxhcVQIjfL9Awt5oXUt7a+TmclsI0uMlwSugA78s7zSj4M0goKaJcaF3GEi4y4R00g== X-Received: by 2002:a1c:9dc4:: with SMTP id g187mr4127692wme.86.1560443971105; Thu, 13 Jun 2019 09:39:31 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:16 +0100 Message-Id: <20190613163917.28589-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH 11/12] target/arm: Stop using deprecated functions in NEON_2RM_VCVT_F32_F16 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Remove some old constructns from NEON_2RM_VCVT_F16_F32 code: * don't use CPU_F0s * don't use tcg_gen_st_f32 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 2ba620ac1e1..8f124a953b6 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1542,8 +1542,6 @@ static TCGv_ptr vfp_reg_ptr(bool dp, int reg) return ret; } =20 -#define tcg_gen_st_f32 tcg_gen_st_i32 - #define ARM_CP_RW_BIT (1 << 20) =20 /* Include the VFP decoder */ @@ -6460,20 +6458,18 @@ static int disas_neon_data_insn(DisasContext *s, ui= nt32_t insn) tmp =3D neon_load_reg(rm, 0); tmp2 =3D neon_load_reg(rm, 1); tcg_gen_ext16u_i32(tmp3, tmp); - gen_helper_vfp_fcvt_f16_to_f32(cpu_F0s, tmp3, fpst, ah= p); - tcg_gen_st_f32(cpu_F0s, cpu_env, neon_reg_offset(rd, 0= )); - tcg_gen_shri_i32(tmp3, tmp, 16); - gen_helper_vfp_fcvt_f16_to_f32(cpu_F0s, tmp3, fpst, ah= p); - tcg_gen_st_f32(cpu_F0s, cpu_env, neon_reg_offset(rd, 1= )); - tcg_temp_free_i32(tmp); + gen_helper_vfp_fcvt_f16_to_f32(tmp3, tmp3, fpst, ahp); + neon_store_reg(rd, 0, tmp3); + tcg_gen_shri_i32(tmp, tmp, 16); + gen_helper_vfp_fcvt_f16_to_f32(tmp, tmp, fpst, ahp); + neon_store_reg(rd, 1, tmp); + tmp3 =3D tcg_temp_new_i32(); tcg_gen_ext16u_i32(tmp3, tmp2); - gen_helper_vfp_fcvt_f16_to_f32(cpu_F0s, tmp3, fpst, ah= p); - tcg_gen_st_f32(cpu_F0s, cpu_env, neon_reg_offset(rd, 2= )); - tcg_gen_shri_i32(tmp3, tmp2, 16); - gen_helper_vfp_fcvt_f16_to_f32(cpu_F0s, tmp3, fpst, ah= p); - tcg_gen_st_f32(cpu_F0s, cpu_env, neon_reg_offset(rd, 3= )); - tcg_temp_free_i32(tmp2); - tcg_temp_free_i32(tmp3); + gen_helper_vfp_fcvt_f16_to_f32(tmp3, tmp3, fpst, ahp); + neon_store_reg(rd, 2, tmp3); + tcg_gen_shri_i32(tmp2, tmp2, 16); + gen_helper_vfp_fcvt_f16_to_f32(tmp2, tmp2, fpst, ahp); + neon_store_reg(rd, 3, tmp2); tcg_temp_free_i32(ahp); tcg_temp_free_ptr(fpst); break; --=20 2.20.1 From nobody Wed May 8 04:08:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560451994; cv=none; d=zoho.com; s=zohoarc; b=L9nGDgphUnXwNYD1CAlf+gjxgIR4MDgr/X80ADnGq6rXCS19N1q/FDyt6an7WT7o3tS4bojz+IQF3pJeCQl9BgXpcS7t2BOERmEGSrIEYmeiom2d+QjLdIzDmufQ9yMKPbrUtPaU2Vt/v/1ZLIUu00Q8JPutj4K+H2QwXk4NSt8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560451994; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=aWvmCLU0tYg1jkOyEItQlK/WmLZzoOV611s9Hk2h2Ds=; b=V2ozMKejv9Gaw4ZnKL9BOdRPYCcx1khAxB3RXAAV99FilsYFaEjDzB6GeP9DKcjeGvO1B7nzNV/xHzB8j5zlNiWz8O2Vy5trISjT65uSfxb82ePHLxoWbvw9CT2FGiVPv5V/XlIxzNmD6MeImR7hBFNXkbivAWkqdywDk2t95PY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1560451994700991.253492591672; Thu, 13 Jun 2019 11:53:14 -0700 (PDT) Received: from localhost ([::1]:43864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUqX-0006JJ-Lz for importer@patchew.org; Thu, 13 Jun 2019 14:53:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53815) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlK-00048u-6N for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlG-0003Od-Ld for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:41 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:37699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlF-00031l-U9 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:38 -0400 Received: by mail-wr1-x442.google.com with SMTP id v14so21495718wrr.4 for ; Thu, 13 Jun 2019 09:39:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:31 -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=aWvmCLU0tYg1jkOyEItQlK/WmLZzoOV611s9Hk2h2Ds=; b=ldLozEVS5RPki2P5jzmSLxEoh2wYQ/TwkL2qq6FdwlzjiRBBxTRDfR9BnO8nTjD5PW S/5WaRq/Tf+wZfTgf5MWTqyI4Vx8pkXNZdibyZe2PRtXgYJSqp5+ZHilgC3x5RIk7I5d vVzTluaEqnNoS5b2d12rQF0627bcVCbpcBM6u9skzvOAjemRBpLnvyAO02zF7Rv9RsDw WWuD0tvLilz0KgRRN9/gswUaXGbFg96TzUzo9/NXU37WHVV8RDmcqVafOSdhr14SUTY+ s4vF2Z08eG0SUmxb71/rc0JZXDtZeFUkr/PAqpKXfJQsMns/oqf44dvvZcFi1NTcyrtC yMyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aWvmCLU0tYg1jkOyEItQlK/WmLZzoOV611s9Hk2h2Ds=; b=T/fegTrQ6zAo5WjEUNMEWAkHc41QWGEZbA7IdMuwjD1/jlTFfdszMZvSWrJwSIC491 7xsS5XjbOOBWYmCQzG8e2xeMW6pmerPJ1KujpBDBRqdYYS3ZEMYIwbhQjQjX2232KvYu kQ5+xo+z0FE5ZxDAiuilNGNVuwUIJK+4HENHLZbXokw9Aqa9RvYAVjFFE11j1VrvuhEn zkAqTeqbvoGM/WosQVP+BtaD3IWPO1bL+VsRYpMR7i9GwZcC/bGNqb1rkS9VKL1NepKJ TnvTfj4jPjXbX97TpQ4K2wJHZPGOI/NFxlFsnI62qeIjGaCOxPbtOUiQP1uiktdd0K6e 2DyQ== X-Gm-Message-State: APjAAAVAiptS2C7lMvnM/t4cTuC1unk0hw/fLLP+2EVpvDHxuaWlTnpf bY8l+bz6FoPXxe7oyezaZv8p5Q== X-Google-Smtp-Source: APXvYqze4Dv5bhuqYJA0zHEi8Th9YavrGxcIBLII9gt3+bh+1JBugjEWwszGRMZJSBRn2T4dd2uMKQ== X-Received: by 2002:a5d:63c9:: with SMTP id c9mr13593451wrw.81.1560443972149; Thu, 13 Jun 2019 09:39:32 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:17 +0100 Message-Id: <20190613163917.28589-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH 12/12] target/arm: Remove unused cpu_F0s, cpu_F0d, cpu_F1s, cpu_F1d 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Remove the now unused TCG globals cpu_F0s, cpu_F0d, cpu_F1s, cpu_F1d. cpu_M0 is still used by the iwmmxt code, and cpu_V0 and cpu_V1 are used by both iwmmxt and Neon. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/translate.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 8f124a953b6..4750b9fa1bb 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -67,10 +67,6 @@ TCGv_i32 cpu_CF, cpu_NF, cpu_VF, cpu_ZF; TCGv_i64 cpu_exclusive_addr; TCGv_i64 cpu_exclusive_val; =20 -/* FIXME: These should be removed. */ -static TCGv_i32 cpu_F0s, cpu_F1s; -static TCGv_i64 cpu_F0d, cpu_F1d; - #include "exec/gen-icount.h" =20 static const char * const regnames[] =3D @@ -11911,12 +11907,8 @@ static void arm_tr_init_disas_context(DisasContext= Base *dcbase, CPUState *cs) dc->base.max_insns =3D MIN(dc->base.max_insns, bound); } =20 - cpu_F0s =3D tcg_temp_new_i32(); - cpu_F1s =3D tcg_temp_new_i32(); - cpu_F0d =3D tcg_temp_new_i64(); - cpu_F1d =3D tcg_temp_new_i64(); - cpu_V0 =3D cpu_F0d; - cpu_V1 =3D cpu_F1d; + cpu_V0 =3D tcg_temp_new_i64(); + cpu_V1 =3D tcg_temp_new_i64(); /* FIXME: cpu_M0 can probably be the same as cpu_V0. */ cpu_M0 =3D tcg_temp_new_i64(); } --=20 2.20.1