[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [RFC PATCH 02/30] arm: introduce ARM_V8_FP16 feature bit
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [RFC PATCH 02/30] arm: introduce ARM_V8_FP16 feature bit |
Date: |
Fri, 13 Oct 2017 13:44:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/13/2017 09:24 AM, Alex Bennée wrote:
> ---
> target/arm/cpu.h | 1 +
> target/arm/cpu64.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/target/arm/cpu.h b/target/arm/cpu.h
> index 89d49cdcb2..3a0f27c782 100644
> --- a/target/arm/cpu.h
> +++ b/target/arm/cpu.h
> @@ -1340,6 +1340,7 @@ enum arm_features {
> ARM_FEATURE_VBAR, /* has cp15 VBAR */
> ARM_FEATURE_M_SECURITY, /* M profile Security Extension */
> ARM_FEATURE_JAZELLE, /* has (trivial) Jazelle implementation */
> + ARM_FEATURE_V8_FP16, /* implements v8.2 half-precision float */
> };
>
> static inline int arm_feature(CPUARMState *env, int feature)
> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> index 670c07ab6e..973614dfc6 100644
> --- a/target/arm/cpu64.c
> +++ b/target/arm/cpu64.c
> @@ -226,6 +226,7 @@ static void aarch64_any_initfn(Object *obj)
> set_feature(&cpu->env, ARM_FEATURE_V8_SHA256);
> set_feature(&cpu->env, ARM_FEATURE_V8_PMULL);
> set_feature(&cpu->env, ARM_FEATURE_CRC);
> + set_feature(&cpu->env, ARM_FEATURE_V8_FP16);
> cpu->ctr = 0x80038003; /* 32 byte I and D cacheline size, VIPT icache */
> cpu->dcz_blocksize = 7; /* 512 bytes */
> }
>
Need to update linux-user/elfload.c, get_elf_hwcap as well (HWCAP_ASIMDHP).
I suppose that will be a separate patch, since we're missing 8 bits from
current linux/arch/arm64/include/uapi/asm/hwcap.h.
... and we probably need to report a kernel arm32 bug that there is no
equivalent bit defined there.
Anyway, as far as this goes,
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-arm] [RFC PATCH 00/30] v8.2 half-precision support (work-in-progress), Alex Bennée, 2017/10/13
- [Qemu-arm] [RFC PATCH 03/30] include/exec/helper-head.h: support f16 in helper calls, Alex Bennée, 2017/10/13
- [Qemu-arm] [RFC PATCH 04/30] target/arm/cpu.h: update comment for half-precision values, Alex Bennée, 2017/10/13
- [Qemu-arm] [RFC PATCH 02/30] arm: introduce ARM_V8_FP16 feature bit, Alex Bennée, 2017/10/13
- Re: [Qemu-arm] [RFC PATCH 02/30] arm: introduce ARM_V8_FP16 feature bit,
Richard Henderson <=
- [Qemu-arm] [RFC PATCH 01/30] linux-user/main: support dfilter, Alex Bennée, 2017/10/13
- [Qemu-arm] [RFC PATCH 06/30] fpu/softfloat: implement float16_squash_input_denormal, Alex Bennée, 2017/10/13
- [Qemu-arm] [RFC PATCH 07/30] fpu/softfloat: implement float16_abs helper, Alex Bennée, 2017/10/13
- [Qemu-arm] [RFC PATCH 08/30] softfloat: add half-precision expansions for MINMAX fns, Alex Bennée, 2017/10/13
- [Qemu-arm] [RFC PATCH 05/30] softfloat: implement propagateFloat16NaN, Alex Bennée, 2017/10/13