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~