target/arm: Fix fp_status_f16 tininess before rounding

In commit d81ce0ef2c4f105 we added an extra float_status field
fp_status_fp16 for Arm, but forgot to initialize it correctly
by setting it to float_tininess_before_rounding. This currently
will only cause problems for the new V8_FP16 feature, since the
float-to-float conversion code doesn't use it yet. The effect
would be that we failed to set the Underflow IEEE exception flag
in all the cases where we should.

Add the missing initialization.

Backports commit bcc531f0364796104df4443d17f99b5fb494eca2 from qemu
This commit is contained in:
Peter Maydell 2018-05-15 21:51:46 -04:00 committed by Lioncash
parent e7656cbd7a
commit 2629c0122e
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -322,6 +322,8 @@ static void arm_cpu_reset(CPUState *s)
&env->vfp.fp_status);
set_float_detect_tininess(float_tininess_before_rounding,
&env->vfp.standard_fp_status);
set_float_detect_tininess(float_tininess_before_rounding,
&env->vfp.fp_status_f16);
hw_breakpoint_update_all(cpu);
hw_watchpoint_update_all(cpu);