[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH v2 05/32] target/arm/cpu.h: add addit
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH v2 05/32] target/arm/cpu.h: add additional float_status flags |
Date: |
Thu, 8 Feb 2018 12:42:29 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/08/2018 09:31 AM, Alex Bennée wrote:
> @@ -10750,15 +10751,22 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env,
> uint32_t val)
> }
> set_float_rounding_mode(i, &env->vfp.fp_status);
> }
> - if (changed & (1 << 24)) {
> + if (changed & (1 << 19)) { /* FPCR:FZ16 */
> + set_flush_to_zero((val & (1 << 19)) != 0, &env->vfp.fp_status_f16);
> + set_flush_inputs_to_zero((val & (1 << 19)) != 0,
> + &env->vfp.fp_status_f16);
> + }
> + if (changed & (1 << 24)) { /* FPCR:FZ */
> set_flush_to_zero((val & (1 << 24)) != 0, &env->vfp.fp_status);
> set_flush_inputs_to_zero((val & (1 << 24)) != 0,
> &env->vfp.fp_status);
> }
> - if (changed & (1 << 25))
> + if (changed & (1 << 25)) { /* FPCR:DN */
> set_default_nan_mode((val & (1 << 25)) != 0, &env->vfp.fp_status);
> + }
This misses changing rounding mode and default_nan_mode for fp_status_f16.
> set_float_exception_flags(i, &env->vfp.fp_status);
> + set_float_exception_flags(i, &env->vfp.fp_status_f16);
> set_float_exception_flags(0, &env->vfp.standard_fp_status);
I think you should store 0 into fp_status_f16 here. The exception flags are
OR'ed together when reading; there's not too much point in replicating it out.
r~
- Re: [Qemu-arm] [PATCH v2 03/32] target/arm/cpu64: allow fp16 to be disabled, (continued)
[Qemu-arm] [PATCH v2 01/32] include/exec/helper-head.h: support f16 in helper calls, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 04/32] target/arm/cpu.h: update comment for half-precision values, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 02/32] target/arm/cpu64: introduce ARM_V8_FP16 feature bit, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 06/32] target/arm/helper: pass explicit fpst to set_rmode, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 08/32] arm/translate-a64: handle_3same_64 comment fix, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 05/32] target/arm/cpu.h: add additional float_status flags, Alex Bennée, 2018/02/08
- Re: [Qemu-arm] [Qemu-devel] [PATCH v2 05/32] target/arm/cpu.h: add additional float_status flags,
Richard Henderson <=
[Qemu-arm] [PATCH v2 10/32] arm/translate-a64: add FP16 FADD/FABD/FSUB/FMUL/FDIV to simd_three_reg_same_fp16, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 11/32] arm/translate-a64: add FP16 F[A]C[EQ/GE/GT] to simd_three_reg_same_fp16, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 09/32] arm/translate-a64: initial decode for simd_three_reg_same_fp16, Alex Bennée, 2018/02/08
[Qemu-arm] [PATCH v2 07/32] arm/translate-a64: implement half-precision F(MIN|MAX)(V|NMV), Alex Bennée, 2018/02/08