From nobody Fri Oct 24 09:56:10 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; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519756879202438.49210470626485; Tue, 27 Feb 2018 10:41:19 -0800 (PST) Received: from localhost ([::1]:39366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqkBV-0004rQ-Nl for importer@patchew.org; Tue, 27 Feb 2018 13:41:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqkAc-0004QA-CP for qemu-devel@nongnu.org; Tue, 27 Feb 2018 13:40:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqkAb-0008Bu-JC for qemu-devel@nongnu.org; Tue, 27 Feb 2018 13:40:10 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:46668) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eqkAZ-00088q-LS; Tue, 27 Feb 2018 13:40:07 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1eqkAQ-0007f8-U3; Tue, 27 Feb 2018 18:39:58 +0000 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Tue, 27 Feb 2018 18:39:58 +0000 Message-Id: <20180227183958.15167-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] linux-user: Report AArch64 FP16 support via hwcap bits 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: Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Set the appropriate Linux hwcap bits to tell the guest binary if we have implemented half-precision floating point support. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- This is intended to go after Alex's FP16 stuff since it uses the ARM_FEATURE_V8_FP16 bit that defines. There is as yet no kernel definition of an AArch32 hwcap bit to report FP16. Based-on: <20180227143852.11175-1-alex.bennee@linaro.org> linux-user/elfload.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 8bb9a2c3e8..80f1b32fbe 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -551,6 +551,8 @@ static uint32_t get_elf_hwcap(void) GET_FEATURE(ARM_FEATURE_V8_SM3, ARM_HWCAP_A64_SM3); GET_FEATURE(ARM_FEATURE_V8_SM4, ARM_HWCAP_A64_SM4); GET_FEATURE(ARM_FEATURE_V8_SHA512, ARM_HWCAP_A64_SHA512); + GET_FEATURE(ARM_FEATURE_V8_FP16, + ARM_HWCAP_A64_FPHP | ARM_HWCAP_A64_ASIMDHP); #undef GET_FEATURE =20 return hwcaps; --=20 2.16.2