From nobody Tue Feb 10 02:55:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1598280002; cv=none; d=zohomail.com; s=zohoarc; b=MmXt+kvVvMxZLpQn68qdaoIhXjYddftBHzcapL47Nj+TPPudL9f2I1/SnWYw86Nr1kdvbZh0nKeeHWq41i/bQlyBWdit+E+ElK79t7+rflc8FlY66s8wmfLTNclap52eH7F5Z2WLb4uVSVtiRQitLBDNOtNfIHu5fN0m2Hj3dWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598280002; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m9CVuJMQutWMXochut4xWnb86c2y5GFee0Vhh2Rycx4=; b=bCWsmWi/R8S/qrdRn7mtTtN13+2P0hNkb9sZDsfglY2KRnShC+7xQsRLEUFWKEIKqOeF2AwqYj59li/JgFLdFzp+L9d/FFrUcFdzEUOfQ7xzhSxPk5JhVUVpVg+ke8nb0jVEQH+IaUrf4RbhSAmz/0mxkAZlvdwJQ55RwS4FtjM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159828000261898.13344718786288; Mon, 24 Aug 2020 07:40:02 -0700 (PDT) Received: from localhost ([::1]:54402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kADdh-0000yG-AJ for importer@patchew.org; Mon, 24 Aug 2020 10:40:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kADUF-0000Vz-Fg for qemu-devel@nongnu.org; Mon, 24 Aug 2020 10:30:15 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kADUD-0002lc-Ma for qemu-devel@nongnu.org; Mon, 24 Aug 2020 10:30:15 -0400 Received: by mail-wr1-x444.google.com with SMTP id x7so2846745wro.3 for ; Mon, 24 Aug 2020 07:29:58 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id b14sm24499091wrj.93.2020.08.24.07.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2020 07:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=m9CVuJMQutWMXochut4xWnb86c2y5GFee0Vhh2Rycx4=; b=Bqme4U3e5Kedmkef6fegYSh99eLn+goTZLouJB3QEp5LEOSLLmElAGLHBWEp41q17U YJ5fObPv6+avoe1IrMV26HyptLlrq/wWK+WPjPlJeykj6CBLXXsgX+Gp6267inc3I8hs CDg+5r/xJ8wefhsaMnuRn3VE2pbxVul7R9iQYl8wpOC0KEsTUofmeS4X2Ckk0uheb0lO tJaalP2eVVRDmtmvWNhsURY781bWLNdR+Wnk26X+bq4wx27h0YExPXcjDEmXj9dx0Xi5 KI+squk+4udCCLxa5T8Whc7Qfv08G4aH/IWywwL80aTN6jIiskMvPj2L+fQBgHA1rdnJ cGkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m9CVuJMQutWMXochut4xWnb86c2y5GFee0Vhh2Rycx4=; b=ZNgPEpA8Y+ghOVUJeLdR6cmLBom4StDETWhrA4cQwRGoh71pvIDq/0hIoQu2VTQCoA IqyPz4uIKy/HDBcufPeX8U7l+hX1AIBWQ44jEdwf4ARDmjto2V2gX93Wysz3a9aCNUtF p8qDp4y80c1AVXt4zLByaEQ6yMUv7lTrsFB5O9qSqEGirC+IIVBtllNDFaOy4knZoErT 6po5NLOoGnmKFrUpv3VFY054Ud4YABtzbyXCwzr4Y4/w9XAg+tDtcrztptT7o1TJpIoW bQbNCplesZaBEi4rhQAdpajPZYpCj8AWtd0OD/erkQMCC3sA47OuiPbXz67XVuAYTPx5 cR3g== X-Gm-Message-State: AOAM5330OvBudxcjc24Gb09tYFfrCdRWjyXBUH8yKtwOFkQLBvKGa58I doemwUFj5z6Fj2xRe+9uQI2kfPvcIjIa5Qcd X-Google-Smtp-Source: ABdhPJyeYxj0MJuHhqsGEraemlm4gHAksOpDGd5PP0tyughmyF21TDm5z+u4TqDSPGke8+X4uAx3yA== X-Received: by 2002:adf:d84c:: with SMTP id k12mr6108269wrl.250.1598279397884; Mon, 24 Aug 2020 07:29:57 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 20/22] target/arm: Implement new VFP fp16 insn VMOVX Date: Mon, 24 Aug 2020 15:29:32 +0100 Message-Id: <20200824142934.20850-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200824142934.20850-1-peter.maydell@linaro.org> References: <20200824142934.20850-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" The fp16 extension includes a new instruction VMOVX, which copies the upper 16 bits of a 32-bit source VFP register into the lower 16 bits of the destination and zeroes the high half of the destination. Implement it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/vfp-uncond.decode | 3 +++ target/arm/translate-vfp.c.inc | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/target/arm/vfp-uncond.decode b/target/arm/vfp-uncond.decode index 39dc8f6373a..8891ab3d549 100644 --- a/target/arm/vfp-uncond.decode +++ b/target/arm/vfp-uncond.decode @@ -75,5 +75,8 @@ VCVT 1111 1110 1.11 11 rm:2 .... 1010 op:1 1.0 ...= . \ VCVT 1111 1110 1.11 11 rm:2 .... 1011 op:1 1.0 .... \ vm=3D%vm_dp vd=3D%vd_sp sz=3D3 =20 +VMOVX 1111 1110 1.11 0000 .... 1010 01 . 0 .... \ + vd=3D%vd_sp vm=3D%vm_sp + VINS 1111 1110 1.11 0000 .... 1010 11 . 0 .... \ vd=3D%vd_sp vm=3D%vm_sp diff --git a/target/arm/translate-vfp.c.inc b/target/arm/translate-vfp.c.inc index bda3dd25136..4b26156eccc 100644 --- a/target/arm/translate-vfp.c.inc +++ b/target/arm/translate-vfp.c.inc @@ -3482,3 +3482,28 @@ static bool trans_VINS(DisasContext *s, arg_VINS *a) tcg_temp_free_i32(rd); return true; } + +static bool trans_VMOVX(DisasContext *s, arg_VINS *a) +{ + TCGv_i32 rm; + + if (!dc_isar_feature(aa32_fp16_arith, s)) { + return false; + } + + if (s->vec_len !=3D 0 || s->vec_stride !=3D 0) { + return false; + } + + if (!vfp_access_check(s)) { + return true; + } + + /* Set Vd to high half of Vm */ + rm =3D tcg_temp_new_i32(); + neon_load_reg32(rm, a->vm); + tcg_gen_shri_i32(rm, rm, 16); + neon_store_reg32(rm, a->vd); + tcg_temp_free_i32(rm); + return true; +} --=20 2.20.1