From nobody Wed Oct 29 09:14:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152461964156737.576331883539865; Tue, 24 Apr 2018 18:27:21 -0700 (PDT) Received: from localhost ([::1]:33320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fB9DM-0006vF-Oc for importer@patchew.org; Tue, 24 Apr 2018 21:27:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fB99N-0003yf-LP for qemu-devel@nongnu.org; Tue, 24 Apr 2018 21:23:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fB99K-000779-Co for qemu-devel@nongnu.org; Tue, 24 Apr 2018 21:23:13 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:42578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fB99K-00075J-7a for qemu-devel@nongnu.org; Tue, 24 Apr 2018 21:23:10 -0400 Received: by mail-pf0-x242.google.com with SMTP id o16so13743790pfk.9 for ; Tue, 24 Apr 2018 18:23:10 -0700 (PDT) Received: from cloudburst.twiddle.net.com (cpe-76-173-164-138.hawaii.res.rr.com. [76.173.164.138]) by smtp.gmail.com with ESMTPSA id z127sm27767966pfb.72.2018.04.24.18.23.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Apr 2018 18:23:08 -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; bh=7hCxfTsMPY3ERXMYGEDirrRU7REZtjUuU95yRA5cF34=; b=h4NZ+ZDOm7B7hntfIb14zPLSn2jaA/RuunJCpYcEtRkxVW7M9YWG1BdWix3WHCXc1R EBiOGpQz5OqbZmL2uLy1UcMwmhl0DCIqMxn0XQwPuMj2pfx+eG7SZXzri0ZkQ/IW2ME+ +2oGTjK0Mv6yA1dOUIt5sYzzzFjRC77zQkT28= 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; bh=7hCxfTsMPY3ERXMYGEDirrRU7REZtjUuU95yRA5cF34=; b=O7HCS7dCHzi96tlSPyHLxhFbnbEGof9f9V5AaKFm6pEbq8kGq8jNSeivs8cVlBl/sh bRm9xLZiYim42EWLjuWK5Wjs1SOw4Q15W/ULK69LSmWGlRUjtsbXCL0Y1wXZt895vp37 7mGDMLOJ7HdIEZ7cNaGaR0vD+copY1SImfssswlB+LtXDaFRqvIdOtEn6rES9pJI59VO W6v1ADdaJYkh+aRRbr4KR6Ax8YRLXmVKyTP4yoKLSXDGoieREOivqSeh4kXfnerdY5Kg uI07OKE1Qt4Wjhb1u1a2KcvJ2v6Fg7orFSkaI9Si6uFhuYJjXJrbppVEpjI0/UZakKnL W31g== X-Gm-Message-State: ALQs6tBaSAH2vX7iamsAjPwGulyDhbzvrpns4Ul4pUaQOAu2X1cmPVpT EsuzBgx8xGg+KLzDIxE0NQRD5FjWHNE= X-Google-Smtp-Source: AIpwx4/izWFjRA27n1lLgnqPP1YTlGlcfwVGSFIwqWghubwBQlGMBN1uRoBYdHHn4y7kX6O1gke3og== X-Received: by 10.99.115.28 with SMTP id o28mr21936360pgc.238.1524619388918; Tue, 24 Apr 2018 18:23:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 24 Apr 2018 15:22:52 -1000 Message-Id: <20180425012300.14698-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180425012300.14698-1-richard.henderson@linaro.org> References: <20180425012300.14698-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PATCH 1/9] target/arm: Implement vector shifted SCVF/UCVF for fp16 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" While we have some of the scalar paths for *CVF for fp16, we failed to decode the fp16 version of these instructions. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index b47319d437..c92e052686 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -7077,13 +7077,26 @@ static void handle_simd_shift_intfp_conv(DisasConte= xt *s, bool is_scalar, int immh, int immb, int opcode, int rn, int rd) { - bool is_double =3D extract32(immh, 3, 1); - int size =3D is_double ? MO_64 : MO_32; - int elements; + int size, elements, fracbits; int immhb =3D immh << 3 | immb; - int fracbits =3D (is_double ? 128 : 64) - immhb; =20 - if (!extract32(immh, 2, 2)) { + if (immh & 8) { + size =3D MO_64; + if (!is_scalar && !is_q) { + unallocated_encoding(s); + return; + } + } else if (immh & 4) { + size =3D MO_32; + } else if (immh & 2) { + size =3D MO_16; + if (!arm_dc_feature(s, ARM_FEATURE_V8_FP16)) { + unallocated_encoding(s); + return; + } + } else { + /* immh =3D=3D 0 would be a failure of the decode logic */ + g_assert(immh =3D=3D 1); unallocated_encoding(s); return; } @@ -7091,20 +7104,14 @@ static void handle_simd_shift_intfp_conv(DisasConte= xt *s, bool is_scalar, if (is_scalar) { elements =3D 1; } else { - elements =3D is_double ? 2 : is_q ? 4 : 2; - if (is_double && !is_q) { - unallocated_encoding(s); - return; - } + elements =3D 8 << is_q >> size; } + fracbits =3D (16 << size) - immhb; =20 if (!fp_access_check(s)) { return; } =20 - /* immh =3D=3D 0 would be a failure of the decode logic */ - g_assert(immh); - handle_simd_intfp_conv(s, rd, rn, elements, !is_u, fracbits, size); } =20 --=20 2.14.3