]> Git Repo - qemu.git/commitdiff
target/arm: Fix fp_status_f16 tininess before rounding
authorPeter Maydell <[email protected]>
Tue, 15 May 2018 13:58:42 +0000 (14:58 +0100)
committerPeter Maydell <[email protected]>
Tue, 15 May 2018 13:58:42 +0000 (14:58 +0100)
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.

Fixes: d81ce0ef2c4f105
Cc: [email protected]
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Alex BennĂ©e <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Message-id: 20180512004311[email protected]

target/arm/cpu.c

index d175c5e94ff325b15f40640e85fc0137cf394843..7939c6b8aef3dcc4cb696b25f5617a93cf841a54 100644 (file)
@@ -324,6 +324,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);
 #ifndef CONFIG_USER_ONLY
     if (kvm_enabled()) {
         kvm_arm_reset_vcpu(cpu);
This page took 0.029191 seconds and 4 git commands to generate.