target-arm: fix for exponent comparison in recpe_f64

f64 exponent in HELPER(recpe_f64) should be compared to 2045 rather than 1023
(FPRecipEstimate in ARMV8 spec). This fixes incorrect underflow handling when
flushing denormals to zero in the FRECPE instructions operating on 64-bit
values.

Backports commit fc1792e9aa36227ee9994757974f9397684e1a48 from qemu
This commit is contained in:
Ildar Isaev 2018-02-12 12:04:15 -05:00 committed by Lioncash
parent 30f4d72db5
commit 73fa78f0bc
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -6023,7 +6023,7 @@ float64 HELPER(recpe_f64)(float64 input, void *fpstp)
} else {
return float64_set_sign(float64_maxnorm, float64_is_neg(f64));
}
} else if (f64_exp >= 1023 && fpst->flush_to_zero) {
} else if (f64_exp >= 2045 && fpst->flush_to_zero) {
float_raise(float_flag_underflow, fpst);
return float64_set_sign(float64_zero, float64_is_neg(f64));
}