softfloat: Use correct type in float64_to_uint64_round_to_zero()

In float64_to_uint64_round_to_zero() a typo meant that we were
taking the uint64_t return value from float64_to_uint64() and
putting it into an int64_t variable before returning it as
uint64_t again. Use uint64_t instead of pointlessly casting it
back and forth to int64_t.

Backports commit d000b477f2693dbca97cd8ea751c2e0b71890662 from qemu
This commit is contained in:
Peter Maydell 2018-03-02 10:44:08 -05:00 committed by Lioncash
parent 0c9ef6f4b3
commit e141ea5dd2
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -7414,10 +7414,9 @@ uint64_t float64_to_uint64(float64 a, float_status *status)
uint64_t float64_to_uint64_round_to_zero(float64 a, float_status *status)
{
int64_t v;
signed char current_rounding_mode = status->float_rounding_mode;
set_float_rounding_mode(float_round_to_zero, status);
v = float64_to_uint64(a, status);
uint64_t v = float64_to_uint64(a, status);
set_float_rounding_mode(current_rounding_mode, status);
return v;
}