qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: Report AArch64 FP16 support via hwcap bits
@ 2018-02-27 18:39 Peter Maydell
  2018-02-27 18:57 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2018-02-27 18:39 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: patches, Richard Henderson, Alex Bennée

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 <peter.maydell@linaro.org>
---
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
 
     return hwcaps;
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Report AArch64 FP16 support via hwcap bits
  2018-02-27 18:39 [Qemu-devel] [PATCH] linux-user: Report AArch64 FP16 support via hwcap bits Peter Maydell
@ 2018-02-27 18:57 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2018-02-27 18:57 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel; +Cc: patches, Alex Bennée

On 02/27/2018 10:39 AM, Peter Maydell wrote:
> 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 <peter.maydell@linaro.org>
> ---
> 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(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-27 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-27 18:39 [Qemu-devel] [PATCH] linux-user: Report AArch64 FP16 support via hwcap bits Peter Maydell
2018-02-27 18:57 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).