qemu-arm
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]